spring-boot-properties-migrator不起作用

问题描述

您好,春季2移民。

我一直试图让它记录警告或错误,但无济于事。

我在pom.xml中添加了它

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-properties-migrator</artifactId>
    <scope>runtime</scope>
</dependency>

根据https://github.com/snicoll/demo-properties-migrator

,当前正在Spring Boot 2.3.4.RELEASE上运行,但是没有警告或错误日志,例如PropertiesMigrationListener,即使我的application.properties包含错误的字段,例如server.contextpath,也应重命名server.servlet.contextpath;我在做什么错了?

该应用程序正在运行,因为它在根目录/而不是我在server.contextpath中放置的自定义上下文路径发布了端点,而且我可以访问/ actuator / health,但迁移器工具没有警告...?

我使用mvn spring-boot:run的任何想法来运行它吗?

附加信息:

2020-10-15T02:49:08,028Z [main] INFO APP=acme-service | ENV=local | CORRELATION_ID= | o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 9091 (http) with context path ''
2020-10-15T02:49:10,317Z [main] INFO APP=acme-service | ENV=local | CORRELATION_ID= | o.a.c.s.f.ReflectionServicefactorybean - Creating Service {urn:suncorp-com-au:service:insurance:npr:ciw:reference:data}ReferenceDataPortTypeService from class au.com.suncorp.insurance.commercial.common.domain.nicheprotect.reference.data.service.ReferenceDataPortType
2020-10-15T02:49:10,678Z [main] INFO APP=acme-service | ENV=local | CORRELATION_ID= | a.c.s.i.c.o.WebApplication - Started WebApplication in 21.691 seconds (JVM running for 24.278)
2020-10-15T02:49:11,160Z [RMI TCP Connection(3)-10.75.16.227] INFO APP=acme-service | ENV=local | CORRELATION_ID= | o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring dispatcherServlet 'dispatcherServlet'
2020-10-15T02:49:11,162Z [RMI TCP Connection(3)-10.75.16.227] INFO APP=acme-service | ENV=local | CORRELATION_ID= | o.s.web.servlet.dispatcherServlet - Initializing Servlet 'dispatcherServlet'
2020-10-15T02:49:11,178Z [RMI TCP Connection(3)-10.75.16.227] INFO APP=acme-service | ENV=local | CORRELATION_ID= | o.s.web.servlet.dispatcherServlet - Completed initialization in 16 ms
2020-10-15T02:49:11,298Z [RMI TCP Connection(2)-10.75.16.227] INFO APP=acme-service | ENV=local | CORRELATION_ID= | o.s.c.c.c.ConfigServicePropertySourceLocator - Fetching config from server at : http://localhost:8888
2020-10-15T02:49:12,308Z [RMI TCP Connection(2)-10.75.16.227] INFO APP=acme-service | ENV=local | CORRELATION_ID= | o.s.c.c.c.ConfigServicePropertySourceLocator - Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available
2020-10-15T02:49:12,309Z [RMI TCP Connection(2)-10.75.16.227] WARN APP=acme-service | ENV=local | CORRELATION_ID= | o.s.c.c.c.ConfigServicePropertySourceLocator - Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/Packages%20acme%20Service/default": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect

IntelliJ也显示了一些警告:

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)