After Maven has set SpringBoot Profile, the @ Value ("${xx}") value cannot be accessed. How to solve this problem?

Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder "alipay.app_id" in value "${alipay.app_id}"

Project structure

clipboard.png

clipboard.png

I wrote it in application.properties before it was not configured. I can get the value by using @ Value ("${xx}"), but now I have configured a different profile. After I put the value in application-*.properties, I failed to get it.


have you chosen which profile to use?


has been solved. The reason for the problem is that the constructor executes @ Value first, so you can't get the value in @ Value

.
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-1bee5be-30f4c.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-1bee5be-30f4c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?