I read the following issue on jira:
https://jira.springsource.org/browse/SPR-2740
Basically, I want my spring MVC application to load some data from a database on initialization. As the init method / @Preconstruct is invoked before any AOP proxying is done there is no transaction advice applied.
Is there an elegant pattern to follow so once proxying has taken place I can configure something similar to the init method?
If you only need the autowired resource for this single initialization point you can simply @Autowire a method with the resource needed.
This will autowire the Database instance to this method after
Databaseis finishing initializing.