What is the injection sequence of bean in springboot?

this is a business logic class that uses the properties in the application.yml file (see figure queueNum)
clipboard.png
application.yml
clipboard.png

I expect the springboot application to output "maxCost = 5" when it runs, but actually output "maxCost = 0". I think this may be due to the different instantiation and injection order of bean, but I did not find the relevant code. does anyone know why? How can I solve this problem?

Aug.11,2021

@ Value and @ Autowired belong to setter injection. When Spring is equipped with Bean, it first creates an object (executes the constructor), and then performs setter injection.


solved, as shown in the figure, you can use @ PostConstruct

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b875-2baf3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b875-2baf3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?