0

I have an annotation-configured Spring web app, I need to alter bean creation order to define what is the very first bean loaded during context boot up. Is it possible without switching to xml configuration?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Tobia
  • 9,165
  • 28
  • 114
  • 219
  • See [Spring: Make sure a particular bean gets initialized first](http://stackoverflow.com/q/7868335/5221149). – Andreas May 19 '16 at 04:22
  • you can check [this](http://stackoverflow.com/questions/31692905/spring-boot-auto-configuration-order) – ypp May 19 '16 at 04:22
  • You say you have to but don't say why. There are ways to do this, but you shouldn't have to. Please post a relevant sample of your configuration and indicate which beans have to be created first. – Sotirios Delimanolis May 19 '16 at 04:39
  • If no database is ready i have to set it up, therefore I have to be sure that the database service should start for first because many other services need the database. – Tobia May 19 '16 at 06:07

0 Answers0