Java Melody-击中命中URL时错误解决了模板“错误”

时间:2018-09-18 11:58:15

标签: java spring spring-boot spring-security java-melody

请帮助,点击URL Java旋律时遇到一些问题,

我已使用以下库配置应用程序:

  1. 春季靴2.0.4.RELEASE
  2. spring-security-oauth2 2.3.3。发布
  3. spring-security-jwt 1.0.9.RELEASE
  4. javamelody-spring-boot-starter 1.74.0

我正在通过https://github.com/javamelody/javamelody/wiki/SpringBootStarter遵循Spring Boot和Java旋律指南

javamelody.init-parameters.monitoring-path=/admin/monitoring

这是我的春季安全配置,

@Override
public void configure(final WebSecurity web) throws Exception {
    web.ignoring().antMatchers("/api/v1/login/*", "/api/v1/batch/*","/api/v1/*/init*", "/error", "/v2/api-docs",
            "/configuration/ui","/swagger-resources", "/configuration/security", "/webjars/**",
            "/swagger-resources/configuration/ui","/swagger-resources/configuration/security",
            "/swagger-ui.html", "/admin/*", "/*.html", "/favicon.ico", "//*.html", "//*.css", "//*.js",
            "/proxy.jsp", "/api/v1/version");
}

,当点击localhost:8080 / admin / monitoring

 HTTP Status 500 - Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "error", template might not exist or might not be accessible by any of the configured Template Resolvers
 type Exception report

 message Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "error", template might not exist or might not be accessible by any of the configured Template Resolvers

 description The server encountered an internal error that prevented it from fulfilling this request.

 exception

 org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "error", template might not exist or might not be accessible by any of the configured Template Resolvers
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.boot.web.servlet.support.ErrorPageFilter.forwardToErrorPage(ErrorPageFilter.java:197)
org.springframework.boot.web.servlet.support.ErrorPageFilter.handleException(ErrorPageFilter.java:180)
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:145)
org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:105)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:123)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
id.com.tri.bonstri.filter.CorsConfig.doFilter(CorsConfig.java:92)
 root cause

 org.thymeleaf.exceptions.TemplateInputException: Error resolving template "error", template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:870)
org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072)
org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:354)
org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:187)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1325)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1069)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1008)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.boot.web.servlet.support.ErrorPageFilter.forwardToErrorPage(ErrorPageFilter.java:197)
org.springframework.boot.web.servlet.support.ErrorPageFilter.handleException(ErrorPageFilter.java:180)
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:145)
org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:105)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:123)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
id.com.tri.bonstri.filter.CorsConfig.doFilter(CorsConfig.java:92)

配置Java Melody或Spring Security是否有任何遗漏?

非常感谢。 :)

0 个答案:

没有答案