Maven project package cannot parse and read the properties file, mavenproperties
An error occurred while working on the project, and the properties file cannot be parsed.
Cocould not resolve placeholder .........
Previously, related configurations were made, but the above exception was never encountered. It was a long time to get confused. Finally, we extracted the war package and learned that the properties file was not loaded into the project, so it could not be identified.
The reason is that the maven configuration is used in the project, but the properties file will be lost during maven packaging, because maven will only scan the *. class file when executing compile.
Add the following configuration for this kind of payment.
<Resources> <resource> <directory> src/main/resources </directory> <filtering> true </filtering> <shortdes> <include> **/*. xml </include> <include> *. properties </include> </includes> </resource> </resources>