In the above class if I've autowired annotation on the "filed" without SET method, the autowiring is not working.
But I've read the documentation, setting @Autowired on the filed shoudl work fine.
Can you please tell me if there is anything being done incorrectly?
You shouldn;t create an instance of TestSpringAutowireyourself. Spring can only autowire into beans that it has created itself. When you load your application context, spring will create an instance of TestSpringAutowire. That spring created instance will be wired correctly. You should get that instance from Spring instead of creating your own instance
So, change line 20 to
BTW, your code is seriously messed up. Generally you don;t put setter methods around static members. You might want to look at Spring's code samples, or get a good book