- maven pom.xml
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
- logback.xml
<!--如果继承了springboot的parent-->
<property name="log.home_dir" value="logs/@project.artifactId@"/>
<!--如果没继承springboot的parent-->
<property name="log.home_dir" value="logs/${project.artifactId}"/>