我使用jhipster生成了一个整体应用程序。创建后尝试访问http:// localhost:8080 /。但是出现错误无法处理您的请求 我正在使用JWT身份验证(无状态,带有令牌)。使用以下命令运行应用程序
./mvnw
我启用了以下调试日志记录
<logger name="io.undertow" level="DEBUG"/>
<logger name="io.undertow.websockets.jsr" level="DEBUG"/>
以下是我在日志中观察到的情况
:: JHipster ? :: Running Spring Boot 2.2.7.RELEASE ::
:: https://www.jhipster.tech ::
2020-08-28 14:19:30.606 WARN 3822 --- [ restartedMain] o.s.boot.StartupInfoLogger : InetAddress.getLocalHost().getHostName() took 5006 milliseconds to respond. Please verify your network configuration (macOS machines may need to add entries to /etc/hosts).
2020-08-28 14:19:35.620 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : Starting MonolithicApp on Maheshs-MacBook-Pro.local with PID 3822
2020-08-28 14:19:35.621 DEBUG 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : Running with Spring Boot v2.2.7.RELEASE, Spring v5.2.6.RELEASE
2020-08-28 14:19:35.621 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : The following profiles are active: dev,swagger
2020-08-28 14:19:37.545 WARN 3822 --- [ restartedMain] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2020-08-28 14:19:37.558 DEBUG 3822 --- [ restartedMain] io.undertow.session : Setting default session timeout to 1800
2020-08-28 14:19:37.567 INFO 3822 --- [ restartedMain] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2020-08-28 14:19:37.567 DEBUG 3822 --- [ restartedMain] o.s.web.context.ContextLoader : Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
2020-08-28 14:19:37.567 INFO 3822 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1909 ms
2020-08-28 14:19:37.666 DEBUG 3822 --- [ restartedMain] i.m.c.u.i.logging.InternalLoggerFactory : Using SLF4J as the default logging framework
2020-08-28 14:19:38.003 DEBUG 3822 --- [ restartedMain] c.cj.microservices.config.WebConfigurer : Registering CORS filter
2020-08-28 14:19:38.036 INFO 3822 --- [ restartedMain] c.cj.microservices.config.WebConfigurer : Web application configuration, using profiles: dev
2020-08-28 14:19:38.036 INFO 3822 --- [ restartedMain] c.cj.microservices.config.WebConfigurer : Web application fully configured
2020-08-28 14:19:38.040 DEBUG 3822 --- [ restartedMain] io.undertow.session : Registered session listener io.undertow.servlet.core.SessionListenerBridge@57176fb8
2020-08-28 14:19:38.067 DEBUG 3822 --- [ restartedMain] io.undertow.session : Setting default session timeout to 1800
2020-08-28 14:19:38.227 DEBUG 3822 --- [ restartedMain] c.ehcache.core.Ehcache-usersByLogin : Initialize successful.
2020-08-28 14:19:38.245 DEBUG 3822 --- [ restartedMain] c.ehcache.core.Ehcache-usersByEmail : Initialize successful.
2020-08-28 14:19:38.248 DEBUG 3822 --- [ restartedMain] c.e.c.E.cj.microservices.domain.User : Initialize successful.
2020-08-28 14:19:38.251 DEBUG 3822 --- [ restartedMain] c.e.c.E.c.m.domain.Authority : Initialize successful.
2020-08-28 14:19:38.254 DEBUG 3822 --- [ restartedMain] c.e.c.E.c.m.domain.User.authorities : Initialize successful.
2020-08-28 14:19:38.269 DEBUG 3822 --- [ restartedMain] c.c.m.config.AsyncConfiguration : Creating Async Task Executor
2020-08-28 14:19:38.283 DEBUG 3822 --- [ restartedMain] c.c.m.config.LiquibaseConfiguration : Configuring Liquibase
2020-08-28 14:19:38.419 WARN 3822 --- [nolithic-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!
2020-08-28 14:19:39.834 DEBUG 3822 --- [ restartedMain] c.c.m.security.jwt.TokenProvider : Using a Base64-encoded JWT secret key
2020-08-28 14:19:40.083 DEBUG 3822 --- [ restartedMain] .m.m.a.ExceptionHandlerExceptionResolver : ControllerAdvice beans: 1 @ExceptionHandler, 1 ResponseBodyAdvice
2020-08-28 14:19:40.692 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : @org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public java.util.List com.cj.microservices.web.rest.UserResource.getAuthorities()
2020-08-28 14:19:40.694 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public java.util.List com.cj.microservices.web.rest.UserResource.getAuthorities()]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:40.705 DEBUG 3822 --- [ restartedMain] o.s.s.a.i.a.MethodSecurityInterceptor : Validated configuration attributes
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : @org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.createUser(com.cj.microservices.service.dto.UserDTO) throws java.net.URISyntaxException
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.createUser(com.cj.microservices.service.dto.UserDTO) throws java.net.URISyntaxException]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : @org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.updateUser(com.cj.microservices.service.dto.UserDTO)
2020-08-28 14:19:40.707 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.updateUser(com.cj.microservices.service.dto.UserDTO)]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:40.708 DEBUG 3822 --- [ restartedMain] .PrePostAnnotationSecurityMetadataSource : @org.springframework.security.access.prepost.PreAuthorize(value=hasAuthority("ROLE_ADMIN")) found on specific method: public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.deleteUser(java.lang.String)
2020-08-28 14:19:40.708 DEBUG 3822 --- [ restartedMain] m.DelegatingMethodSecurityMetadataSource : Caching method [CacheKey[com.cj.microservices.web.rest.UserResource; public org.springframework.http.ResponseEntity com.cj.microservices.web.rest.UserResource.deleteUser(java.lang.String)]] with attributes [[authorize: 'hasAuthority("ROLE_ADMIN")', filter: 'null', filterTarget: 'null']]
2020-08-28 14:19:41.386 DEBUG 3822 --- [nolithic-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase has updated your database in 2966 ms
2020-08-28 14:19:41.519 DEBUG 3822 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : 23 mappings in 'requestMappingHandlerMapping'
2020-08-28 14:19:41.735 DEBUG 3822 --- [ restartedMain] eGlobalAuthenticationAutowiredConfigurer : Eagerly initializing {securityConfiguration=com.cj.microservices.config.SecurityConfiguration$$EnhancerBySpringCGLIB$$c9b9cb10@5078c229}
2020-08-28 14:19:41.783 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/**', OPTIONS], []
2020-08-28 14:19:41.783 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/swagger-ui/index.html'], []
2020-08-28 14:19:41.783 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/test/**'], []
2020-08-28 14:19:41.826 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/authenticate']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/register']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/activate']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/account/reset-password/init']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/api/account/reset-password/finish']
2020-08-28 14:19:41.828 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'authenticated', for Ant [pattern='/api/**']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/management/health']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/management/info']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'permitAll', for Ant [pattern='/management/prometheus']
2020-08-28 14:19:41.829 DEBUG 3822 --- [ restartedMain] edFilterInvocationSecurityMetadataSource : Adding web access control expression 'hasAuthority('ROLE_ADMIN')', for Ant [pattern='/management/**']
2020-08-28 14:19:41.832 DEBUG 3822 --- [ restartedMain] o.s.s.w.a.i.FilterSecurityInterceptor : Validated configuration attributes
2020-08-28 14:19:41.832 DEBUG 3822 --- [ restartedMain] o.s.s.w.a.i.FilterSecurityInterceptor : Validated configuration attributes
2020-08-28 14:19:41.842 INFO 3822 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6edb1674, org.springframework.security.web.context.SecurityContextPersistenceFilter@7380c01e, org.springframework.security.web.header.HeaderWriterFilter@4077fd58, org.springframework.security.web.authentication.logout.LogoutFilter@37034f72, org.springframework.web.filter.CorsFilter@705407b6, com.cj.microservices.security.jwt.JWTFilter@9cd8d0b, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@3119b323, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@40a22f8a, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@19c12ba1, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@75b1b7ba, org.springframework.security.web.session.SessionManagementFilter@53397be6, org.springframework.security.web.access.ExceptionTranslationFilter@4baec252, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3e63cd6d]
2020-08-28 14:19:42.098 DEBUG 3822 --- [ restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : ControllerAdvice beans: 0 @ModelAttribute, 0 @InitBinder, 1 RequestBodyAdvice, 1 ResponseBodyAdvice
2020-08-28 14:19:42.156 DEBUG 3822 --- [ restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping : Patterns [/webjars/**, /**] in 'resourceHandlerMapping'
2020-08-28 14:19:42.242 DEBUG 3822 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Starting Swagger
2020-08-28 14:19:42.250 DEBUG 3822 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Started Swagger in 6 ms
2020-08-28 14:19:42.802 DEBUG 3822 --- [ restartedMain] o.springframework.web.filter.CorsFilter : Filter 'corsFilter' configured for use
2020-08-28 14:19:42.804 INFO 3822 --- [ restartedMain] io.undertow : starting server: Undertow - 2.0.30.Final
2020-08-28 14:19:42.842 DEBUG 3822 --- [ restartedMain] io.undertow : Configuring listener with protocol HTTP for interface 0.0.0.0 and port 8080
2020-08-28 14:19:42.880 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp : Started MonolithicApp in 27.954 seconds (JVM running for 28.489)
2020-08-28 14:19:47.891 INFO 3822 --- [ restartedMain] com.cj.microservices.MonolithicApp :
----------------------------------------------------------
Application 'monolithic' is running! Access URLs:
Local: http://localhost:8080/
External: http://192.168.1.11:8080/
Profile(s): [dev, swagger]
----------------------------------------------------------
2020-08-28 14:19:51.830 DEBUG 3822 --- [ XNIO-1 task-1] io.undertow.request.security : Attempting to authenticate /, authentication required: false
2020-08-28 14:19:51.832 DEBUG 3822 --- [ XNIO-1 task-1] io.undertow.request.security : Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism@28928814 for /
2020-08-28 14:19:51.832 DEBUG 3822 --- [ XNIO-1 task-1] io.undertow.request.security : Authentication result was ATTEMPTED for /
2020-08-28 14:19:51.835 INFO 3822 --- [ XNIO-1 task-1] io.undertow.servlet : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-08-28 14:19:51.835 INFO 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2020-08-28 14:19:51.835 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Detected StandardServletMultipartResolver
2020-08-28 14:19:51.835 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Detected AngularCookieLocaleResolver
2020-08-28 14:19:51.847 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : enableLoggingRequestDetails='false': request parameters and headers will be masked to prevent unsafe logging of potentially sensitive data
2020-08-28 14:19:51.847 INFO 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 12 ms
2020-08-28 14:19:51.858 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'OPTIONS /**'
2020-08-28 14:19:51.859 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/swagger-ui/index.html'
2020-08-28 14:19:51.859 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/test/**'
2020-08-28 14:19:51.860 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 1 of 13 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
2020-08-28 14:19:51.861 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 2 of 13 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2020-08-28 14:19:51.863 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 3 of 13 in additional filter chain; firing Filter: 'HeaderWriterFilter'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 4 of 13 in additional filter chain; firing Filter: 'LogoutFilter'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', GET]
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/logout'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', POST]
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'POST /logout'
2020-08-28 14:19:51.864 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', PUT]
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'PUT /logout'
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', DELETE]
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /' doesn't match 'DELETE /logout'
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : No matches found
2020-08-28 14:19:51.865 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 5 of 13 in additional filter chain; firing Filter: 'CorsFilter'
2020-08-28 14:19:51.866 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 6 of 13 in additional filter chain; firing Filter: 'JWTFilter'
2020-08-28 14:19:51.867 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 7 of 13 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
2020-08-28 14:19:51.867 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 8 of 13 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2020-08-28 14:19:51.867 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 9 of 13 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2020-08-28 14:19:51.869 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 10 of 13 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2020-08-28 14:19:51.870 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.AnonymousAuthenticationFilter : Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@3d9ea918: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 11 of 13 in additional filter chain; firing Filter: 'SessionManagementFilter'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 12 of 13 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / at position 13 of 13 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2020-08-28 14:19:51.871 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/authenticate'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/register'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/activate'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/account/reset-password/init'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/account/reset-password/finish'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/api/**'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/health'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/info'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/prometheus'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/'; against '/management/**'
2020-08-28 14:19:51.872 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.i.FilterSecurityInterceptor : Public object - authentication not attempted
2020-08-28 14:19:51.873 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : / reached end of additional filter chain; proceeding with original chain
2020-08-28 14:19:51.875 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : GET "/", parameters={}
2020-08-28 14:19:51.882 DEBUG 3822 --- [ XNIO-1 task-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped to ResourceHttpRequestHandler ["classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/public/", "/"]
2020-08-28 14:19:51.885 DEBUG 3822 --- [ XNIO-1 task-1] o.s.w.s.r.ResourceHttpRequestHandler : Resource not found
2020-08-28 14:19:51.885 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.header.writers.HstsHeaderWriter : Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@7d053c15
2020-08-28 14:19:51.887 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Completed 404 NOT_FOUND
2020-08-28 14:19:51.888 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.ExceptionTranslationFilter : Chain processed normally
2020-08-28 14:19:51.888 DEBUG 3822 --- [ XNIO-1 task-1] s.s.w.c.SecurityContextPersistenceFilter : SecurityContextHolder now cleared, as request processing completed
2020-08-28 14:19:51.892 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'OPTIONS /**'
2020-08-28 14:19:51.892 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/error'; against '/swagger-ui/index.html'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/error'; against '/test/**'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 1 of 13 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 2 of 13 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 3 of 13 in additional filter chain; firing Filter: 'HeaderWriterFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 4 of 13 in additional filter chain; firing Filter: 'LogoutFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', GET]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Checking match of request : '/error'; against '/logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', POST]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'POST /logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', PUT]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'PUT /logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : Trying to match using Ant [pattern='/logout', DELETE]
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher : Request 'GET /error' doesn't match 'DELETE /logout'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.web.util.matcher.OrRequestMatcher : No matches found
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 5 of 13 in additional filter chain; firing Filter: 'CorsFilter'
2020-08-28 14:19:51.893 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 6 of 13 in additional filter chain; firing Filter: 'JWTFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 7 of 13 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 8 of 13 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 9 of 13 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 10 of 13 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.AnonymousAuthenticationFilter : Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@3d9ea918: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 11 of 13 in additional filter chain; firing Filter: 'SessionManagementFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 12 of 13 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error at position 13 of 13 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.security.web.FilterChainProxy : /error reached end of additional filter chain; proceeding with original chain
2020-08-28 14:19:51.894 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : "ERROR" dispatch for GET "/error", parameters={}
2020-08-28 14:19:51.897 DEBUG 3822 --- [ XNIO-1 task-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#errorHtml(HttpServletRequest, HttpServletResponse)
2020-08-28 14:19:51.926 DEBUG 3822 --- [ XNIO-1 task-1] o.s.w.s.v.ContentNegotiatingViewResolver : Selected 'text/html' given [text/html, text/html;q=0.8]
2020-08-28 14:19:52.191 DEBUG 3822 --- [ XNIO-1 task-1] o.s.web.servlet.DispatcherServlet : Exiting from "ERROR" dispatch, status 404
2020-08-28 14:19:52.192 DEBUG 3822 --- [ XNIO-1 task-1] o.s.s.w.a.ExceptionTranslationFilter : Chain processed normally
2020-08-28 14:19:52.192 DEBUG 3822 --- [ XNIO-1 task-1] s.s.w.c.SecurityContextPersistenceFilter : SecurityContextHolder now cleared, as request processing completed
请帮助
答案 0 :(得分:1)
您使用--skip-client生成了带有客户端代码的服务器,那么访问http://localhost:8080/
时会有什么期望?当然,没有index.html可以提供服务,如果您想进行测试,则应在http://localhost:8080/api/<something>
您没有swagger-ui,因为您跳过了客户端,因此您应该仅在浏览器中尝试GET或使用curl或Postman。