대머리개발자

Dialect org.springframework.data.r2dbc.dialect.MySqlDialect does not support array columns 본문

개발이야기/예외

Dialect org.springframework.data.r2dbc.dialect.MySqlDialect does not support array columns

대머리개발자 2023. 2. 1. 21:20
728x90

등록할 때 실제 필드가 아니기 때문에 @Transient 삽입. 그럼 깔끔s 하게 등록 OK

    @Transient
    @Setter
    public List<Scope> scopeList;

 

But 가져올 때 오류가 발생한다. 

 

Caused by: java.lang.IllegalStateException
: Required property scopeList not found for class com.oauth.client.Client

 

@Transient 제외하면 정상적으로 조회도 잘 된다.

 

 

 

결론은 scopeList를 변수로 쓸 방도가 없다.!

 

DTO 만들때 scopeList 직접 삽입!!

 

    public ClientGrpc.Client toProto(List<Scope> list){
        return ClientGrpc.Client.newBuilder()
                .setId(this.id)
                .setSecret(this.secret)
                .setName(this.name)
                .setAuthorizedGrantTypes(this.authorizedGrantTypes)
                .setAccessTokenValidity(this.accessTokenValidity)
                .setRefreshTokenValidity(this.refreshTokenValidity)
                .setRedirectUri(this.redirectUri)
                .setAllowedIps(this.allowedIPs)
                .addAllScopes(list.stream().map(Scope::toProto).collect(Collectors.toList()))
                .setCode(Constants.Response.OK)
                .build();
    }

 

아.. 인증서버 괜히 gRpc, webflux 적용 했니 ㅠㅠ .. 아르메리아 도와줘!!

 

리액티브 스타일 적응 안된다잉!!아아...

 

 

728x90