求助,用最新的2.3.9-SNAPSHOT nutzboot-demo-simple-jetty-nacos-config-client版本来测试(已经改过pom配置),无法自动加载application.properties,导致nacos配置取不到,以下为现象及配置
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>nutzboot-demo-simple</artifactId>
<groupId>org.nutz</groupId>
<version>2.3.9-SNAPSHOT</version>
</parent>
<artifactId>nutzboot-demo-simple-jetty-nacos-config-client</artifactId>
<dependencies>
<dependency>
<groupId>org.nutz</groupId>
<artifactId>nutzboot-starter-nutz-mvc</artifactId>
</dependency>
<dependency>
<groupId>org.nutz</groupId>
<artifactId>nutzboot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>org.nutz</groupId>
<artifactId>nutzboot-starter-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
</dependencies>
</project>
nacos.config.server-addr=192.168.71:8848
nacos.config.data_id=wk-nb-service-cms
nacos.config.group=DEFAULT_GROUP
nacos.config.data_type=properties
/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java "-javaagent:/Users/baocj/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/193.6494.35/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=54483:/Users/baocj/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/193.6494.35/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/lib/tools.jar:/Users/baocj/IdeaProjects/nutzboot/nutzboot-demo/nutzboot-demo-simple/nutzboot-demo-simple-jetty-nacos-config-client/target/classes:/Users/baocj/IdeaProjects/nutzboot/nutzboot-starter/nutzboot-starter-nutz-mvc/target/classes:/Users/baocj/IdeaProjects/nutzboot/nutzboot-starter/nutzboot-starter-jetty/target/classes:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-servlets/9.4.27.v20200227/jetty-servlets-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-continuation/9.4.27.v20200227/jetty-continuation-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-http/9.4.27.v20200227/jetty-http-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-util/9.4.27.v20200227/jetty-util-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-io/9.4.27.v20200227/jetty-io-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-webapp/9.4.27.v20200227/jetty-webapp-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-xml/9.4.27.v20200227/jetty-xml-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-servlet/9.4.27.v20200227/jetty-servlet-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-security/9.4.27.v20200227/jetty-security-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-server/9.4.27.v20200227/jetty-server-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/websocket/websocket-server/9.4.27.v20200227/websocket-server-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.4.27.v20200227/websocket-common-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.4.27.v20200227/websocket-api-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.4.27.v20200227/websocket-client-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-client/9.4.27.v20200227/jetty-client-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/9.4.27.v20200227/websocket-servlet-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-server-impl/9.4.27.v20200227/javax-websocket-server-impl-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-annotations/9.4.27.v20200227/jetty-annotations-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/jetty-plus/9.4.27.v20200227/jetty-plus-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/org/ow2/asm/asm-commons/6.1.1/asm-commons-6.1.1.jar:/Users/baocj/.m2/repository/org/ow2/asm/asm-tree/6.1.1/asm-tree-6.1.1.jar:/Users/baocj/.m2/repository/org/ow2/asm/asm-analysis/6.1.1/asm-analysis-6.1.1.jar:/Users/baocj/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-client-impl/9.4.27.v20200227/javax-websocket-client-impl-9.4.27.v20200227.jar:/Users/baocj/.m2/repository/javax/websocket/javax.websocket-client-api/1.0/javax.websocket-client-api-1.0.jar:/Users/baocj/.m2/repository/javax/websocket/javax.websocket-api/1.0/javax.websocket-api-1.0.jar:/Users/baocj/.m2/repository/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar:/Users/baocj/.m2/repository/org/nutz/nutz-plugins-websocket/1.r.68-SNAPSHOT/nutz-plugins-websocket-1.r.68-20200306.120058-52.jar:/Users/baocj/IdeaProjects/nutzboot/nutzboot-starter/nutzboot-servlet3/target/classes:/Users/baocj/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar:/Users/baocj/.m2/repository/org/ow2/asm/asm/6.1.1/asm-6.1.1.jar:/Users/baocj/IdeaProjects/nutzboot/nutzboot-starter/nutzboot-starter-nacos-config/target/classes:/Users/baocj/.m2/repository/com/alibaba/nacos/nacos-client/1.1.4/nacos-client-1.1.4.jar:/Users/baocj/.m2/repository/com/alibaba/nacos/nacos-common/1.1.4/nacos-common-1.1.4.jar:/Users/baocj/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar:/Users/baocj/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar:/Users/baocj/.m2/repository/com/alibaba/nacos/nacos-api/1.1.4/nacos-api-1.1.4.jar:/Users/baocj/.m2/repository/com/alibaba/fastjson/1.2.58/fastjson-1.2.58.jar:/Users/baocj/.m2/repository/com/google/guava/guava/22.0/guava-22.0.jar:/Users/baocj/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/baocj/.m2/repository/com/google/errorprone/error_prone_annotations/2.0.18/error_prone_annotations-2.0.18.jar:/Users/baocj/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar:/Users/baocj/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar:/Users/baocj/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/baocj/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.10/jackson-core-2.9.10.jar:/Users/baocj/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.10/jackson-databind-2.9.10.jar:/Users/baocj/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.10/jackson-annotations-2.9.10.jar:/Users/baocj/.m2/repository/io/prometheus/simpleclient/0.5.0/simpleclient-0.5.0.jar:/Users/baocj/.m2/repository/org/slf4j/slf4j-log4j12/1.7.30/slf4j-log4j12-1.7.30.jar:/Users/baocj/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/Users/baocj/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/baocj/IdeaProjects/nutzboot/nutzboot-core/target/classes:/Users/baocj/.m2/repository/org/nutz/nutz/1.r.68-SNAPSHOT/nutz-1.r.68-20200224.073715-91.jar:/Users/baocj/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar io.nutz.demo.simple.MainLauncher
[INFO ] 11:30:10.898 org.nutz.boot.banner.SimpleBannerPrinter.printBanner(SimpleBannerPrinter.java:34) -
_ _ ______ ___
| \ | || ___ \ ______ ______ ______ ______ ______| \ \
| \| || |_/ / |______|______|______|______|______| |\ \
| . ` || ___ \ ______ ______ ______ ______ ______| | > >
| |\ || |_/ / |______|______|______|______|______| |/ /
\_| \_/\____/ |_/_/
:: Nutz Boot :: (2.3.8.v20191031)
[DEBUG] 11:30:10.911 org.nutz.boot.NbApp.prepareConfigureLoader(NbApp.java:359) - using org.nutz.boot.starter.nacos.NacosConfigureLoader as ConfigureLoader
[WARN ] 11:30:10.939 com.alibaba.nacos.client.utils.LogUtils.<clinit>(LogUtils.java:53) - Load Log4j Configuration of Nacos fail, message: org/apache/logging/log4j/LogManager
[INFO ] 11:30:10.972 com.alibaba.nacos.client.utils.ParamUtil.<clinit>(ParamUtil.java:57) - [settings] [req-serv] nacos-server port:8848
[INFO ] 11:30:10.973 com.alibaba.nacos.client.utils.ParamUtil.<clinit>(ParamUtil.java:68) - [settings] [http-client] connect timeout:1000
[INFO ] 11:30:10.977 com.alibaba.nacos.client.utils.ParamUtil.<clinit>(ParamUtil.java:80) - NACOS_CLIENT_VERSION: unknown
[INFO ] 11:30:10.978 com.alibaba.nacos.client.utils.ParamUtil.<clinit>(ParamUtil.java:87) - PER_TASK_CONFIG_SIZE: 3000.0
[INFO ] 11:30:11.044 com.alibaba.nacos.client.identify.CredentialWatcher.loadCredential(CredentialWatcher.java:150) - null No credential found
[INFO ] 11:30:11.066 com.alibaba.nacos.client.config.impl.LocalConfigInfoProcessor.<clinit>(LocalConfigInfoProcessor.java:195) - LOCAL_SNAPSHOT_PATH:/Users/baocj/nacos/config
[INFO ] 11:30:11.253 com.alibaba.nacos.client.config.impl.Limiter.<clinit>(Limiter.java:53) - limitTime:5.0
[ERROR] 11:30:11.334 com.alibaba.nacos.client.config.http.ServerHttpAgent.httpGet(ServerHttpAgent.java:94) - [NACOS ConnectException httpGet] currentServerAddr:http://127.0.0.1:8848, err : Connection refused (Connection refused)
[ERROR] 11:30:11.508 com.alibaba.nacos.client.config.http.ServerHttpAgent.httpGet(ServerHttpAgent.java:94) - [NACOS ConnectException httpGet] currentServerAddr:http://127.0.0.1:8848, err : Connection refused (Connection refused)
[ERROR] 11:30:11.705 com.alibaba.nacos.client.config.http.ServerHttpAgent.httpGet(ServerHttpAgent.java:94) - [NACOS ConnectException httpGet] currentServerAddr:http://127.0.0.1:8848, err : Connection refused (Connection refused)
[ERROR] 11:30:11.906 com.alibaba.nacos.client.config.http.ServerHttpAgent.httpGet(ServerHttpAgent.java:94) - [NACOS ConnectException httpGet] currentServerAddr:http://127.0.0.1:8848, err : Connection refused (Connection refused)
[ERROR] 11:30:11.907 com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:239) - [fixed-127.0.0.1_8848] [sub-server] get server config exception, dataId=nutzboot, group=DEFAULT_GROUP, tenant=
java.net.ConnectException: [NACOS HTTP-GET] The maximum number of tolerable server reconnection errors has been reached
at com.alibaba.nacos.client.config.http.ServerHttpAgent.httpGet(ServerHttpAgent.java:107)
at com.alibaba.nacos.client.config.http.MetricsHttpAgent.httpGet(MetricsHttpAgent.java:48)
at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:234)
at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:173)
at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:122)
at org.nutz.boot.starter.nacos.NacosConfigureLoader.init(NacosConfigureLoader.java:132)
at org.nutz.boot.NbApp.prepareConfigureLoader(NbApp.java:370)
at org.nutz.boot.NbApp.prepare(NbApp.java:268)
at org.nutz.boot.NbApp.execute(NbApp.java:201)
at org.nutz.boot.NbApp.run(NbApp.java:182)
at io.nutz.demo.simple.MainLauncher.main(MainLauncher.java:30)
[WARN ] 11:30:11.913 com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:185) - [fixed-127.0.0.1_8848] [get-config] get from server error, dataId=nutzboot, group=DEFAULT_GROUP, tenant=, msg=ErrCode:500, ErrMsg:[NACOS HTTP-GET] The maximum number of tolerable server reconnection errors has been reached