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>
# java   code   maven  

评论

企鹅群:39438021

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×