nested exception is java.lang.IllegalStateException: Cannot load environment] with root cause
程序员文章站
2022-06-19 15:44:18
Spring Cloud Config报错异常异性如下: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception isjava.lang.IllegalStateException: Cannot load environment] with root cause在Spring Cl...
Spring Cloud Config报错异常异性如下:
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Cannot load environment] with root cause在Spring Cloud Config项目当中的application.properties配置文件相关信息:
#内嵌tomcat
server.port=3721
#服务名称
spring.application.name=07springcloudconfigserver
spring.cloud.config.server.git.uri=https://github.com/nanxiaojiang/spring-cloud-config.git
spring.cloud.config.server.git.search-paths=config-center
spring.cloud.config.label=master
spring.cloud.config.server.git.username=username
spring.cloud.config.server.git.password=password
spring.cloud.config.server.git.passphrase=password
特别注意:
上面红色的配置是正确的蓝色是错误的,个人写代码时候不仔细造成错误 如果你也遇见了此问题希望可以帮到你。
这样获取配置信息就可以正常查看啦:
本文地址:https://blog.csdn.net/nan1996jiang/article/details/112576688
上一篇: 在vue中使用better-scroll,完成平滑滚动效果
下一篇: uniapp 自定义校验