请帮忙,我在点击 URL java melody 时遇到了一些问题,
我已经使用以下库配置了应用程序:
- 春季启动 2.0.4.RELEASE
- spring-security-oauth2 2.3.3.RELEASE
- spring-security-jwt 1.0.9.RELEASE
- 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 ?
非常感谢您。:)