问题描述:
启动spring boot项目时报错:Circular placeholder reference 'server.port' in property definitions
解决过程:
首先问题描述报出的错误是端口在配置文件中没有找到,推测出配置文件没有被正常加载,所以直接看pom.xml文件
增加配置如下:
<resource> <directory>src/main/resources</directory> <includes> <include>config.properties</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>application.properties</include> </includes> <filtering>true</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>log4j.properties</include> </includes> <filtering>true</filtering> </resource>