SpringBoot에서 마스터로 입문 - JwtUser`(no Creators, like default construct, exist): cannot deserialize from Objec

2366 단어
[ERROR] 2020-07-09 19:19:18,057 [http-nio-8889-exec-15] c.c.c.e.BusinessExceptionHandler - [192.168.60.80]:[/]:[/woportalapi/cuuser/auth/userinfo GET] org.springframework.security.authentication.InternalAuthenticationServiceException: Could not read JSON: Cannot construct instance of `com.정보 n.security.user.JwtUser` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)  at [Source: (byte[])"{"@class":"co1.11.security.user.JwtUser","username":"11","authorities":["java.util.ArrayList",[]]}"; line: 1, column: 49]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.1on.security.user.JwtUser` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)  at [Source: (byte[])"{"@class":"co1.common.security.user.JwtUser","username":"11","authorities":["java.util.ArrayList",[]]}"; line: 1, column: 49]         at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:123)         at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:144)         at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:175)         at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:200)         at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter$AuthenticationManagerDelegator.authenticate(WebSecurityConfigurerAdapter.java:503)         at com.1n.ztauth.impl.AuthServiceImpl.login(AuthServiceImpl.java:77)         at com1n.ztauth.UserAuth2Controller.loginAccessToken(UserAuth2Controller.java:97)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
왜냐하면 JwtUser에 구조되지 않은 함수가 없어요.
추가하면 됩니다.
private JwtUser(){
    // empty Constructor
}

좋은 웹페이지 즐겨찾기