解决方法
    https://www.baeldung.com/spring-profiles
    build加入一下代码

    1. <build>
    2. <resources>
    3. <resource>
    4. <directory>src/main/resources</directory>
    5. <filtering>true</filtering>
    6. </resource>
    7. </resources>
    8. </build>