Egg fried rice

250g long grain rice

3 tbsp vegetable oil
1 onion

, finely chopped
4 eggs

, beaten
2 spring onions

, sliced, to serve