关注互联网应用及运维技术的个人博客

springboot maven打包生成build-info.properties

项目启动报错

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-07-17 15:58:45.217 ERROR 27292 --- [main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field buildProperties in cn.yepk.tool.web.config.ToolConfiguration required a bean of type 'org.springframework.boot.info.BuildProperties' that could not be found.

The following candidates were found but could not be injected:
	- Bean method 'buildProperties' in 'ProjectInfoAutoConfiguration' not loaded because @ConditionalOnResource did not find resource '${spring.info.build.location:classpath:META-INF/build-info.properties}'


Action:

Consider revisiting the entries above or defining a bean of type 'org.springframework.boot.info.BuildProperties' in your configuration.

解决办法

<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>build-info</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
赞(0)
未经允许不得转载:飞天狒狒 » springboot maven打包生成build-info.properties

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址