springboot 2.2.4-RELEASE * pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- database start -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- database end -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
- application.yml
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/auth8?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: 123456
````
* bootstrap.java
@SpringBootApplication public class SessionBootstrap {
public static void main(String[] args) {
SpringApplication.run(SessionBootstrap.class, args);
}
}
* But why ???
2020-02-12 00:54:42.986 INFO 95047 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-12 00:54:43.359 INFO 95047 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
**Comment From: snicoll**
@cubita-io thanks for the report. Can you please turn this text into an actual project (zip or github repo url) we can use to reproduce the issue?
**Comment From: cubita-io**
> @cubita-io thanks for the report. Can you please turn this text into an actual project (zip or github repo url) we can use to reproduce the issue?
https://github.com/cubita-io/springboot-issue.git
**Comment From: cubita-io**
Also use JPA
Comment From: cubita-io
Also use JPA
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>runtime</scope> </dependency>
https://github.com/cubita-io/springboot-issue-jpa.git
Comment From: snicoll
Thanks for the sample. The actuator alone is enough to reproduce the problem as indicated in your sample (but not in the original description). The same setup does work in 2.1.x
.
Comment From: mbhave
Wonder if this is related to #19625.
Comment From: snicoll
Good catch Madhura, this is an early init caused by MeterRegistryPostProcessor
indeed.
Duplicate of #19625