小编nmy*_*myk的帖子

无法使用Spring Cloud Config和Discovery获取logback-spring.xml属性文件

我正在使用Discovery的第一个bootstrap功能和Consul作为Discovery Server,Config Server的URL位于启动期间,我能够获得application.properties.我还需要logback-spring.xml从Config服务器获取配置,我不知道如何.

我应该在logging.config={???}logback-spring.xml属性中指定什么不将URL硬编码到Config Server?

在Consul集成之前,我使用根据Serving Plain文本文档形成的url和属性中的硬编码配置服务器URL,它工作正常,但现在我们想避免这种情况.

从我调试的内容来看,在重新初始化日志系统期间没有使用Discovery客户端PropertySourceBootstrapConfiguration.

logback spring-boot spring-cloud-config spring-cloud-consul spring-logback

4
推荐指数
1
解决办法
921
查看次数

javax.servlet.ServletException: Circular view path [error]: 将再次调度回当前处理程序 URL [/error] - Spring Cloud

我正在使用基于 Git 的 Spring Cloud项目。在这个项目中,我指出了https://github.com/rseroter/pluralsight-spring-cloudconfig-wa-tolls

当我简单地启动 URL 时:http://localhost:8888/actuator/s1rates/defaulthttp://localhost:8888/s1rates/default,得到以下错误。

你能指导为什么会出现这个错误吗?

我已经通过以下网址:

  1. https://github.com/spring-projects/spring-boot/issues/2001
  2. 圆形视图路径错误 Spring boot

但它也没有帮助我。

错误

javax.servlet.ServletException: Circular view path [error]: would dispatch back to the current handler URL [/error] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
    at org.springframework.web.servlet.view.InternalResourceView.prepareForRendering(InternalResourceView.java:209) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:147) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:314) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1325) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1069) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1008) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE] …
Run Code Online (Sandbox Code Playgroud)

spring spring-boot microservices spring-cloud-netflix spring-cloud-config

4
推荐指数
1
解决办法
3194
查看次数