본문 바로가기

개발 및 운영/Spring6

sqlite-jdbc inmemory could not prepare statement 오류 sqlite jdbc driver 랑 Spring-boot 를 같이 사용하면서, inmemory database를 사용할 때 DDL-Auto를 통해 자동으로 테이블을 생성하게 하였지만 쿼리를 날리면 Caused by: org.hibernate.exception.GenericJDBCException: could not prepare statement Caused by: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: ...) 이런 오류가 발생하는 문제가 있었다. https://www.baeldung.com/spring-boot-sqlite 에도 별 설정 없이 jdbc url 을 memory 로 주.. 2021. 10. 19.
Spring-boot: Error during WebSocket handshake: Unexpected response code: 404 ResourceHandlerRegistry의 setOrder(0)을 줬더니 이걸 먼저 타버린다...ㅠㅠ 덕분에 몇시간동안 삽질을.. 2020. 1. 16.
jsonrpc4j Exception이 UndeclaredThrowableException 뜰 때 저는 Spring-boot에서 jsonrpc4j Client을 사용할 때 서버쪽에서 Exception을 throw하면 Client쪽에서는 제대로 된 Exception을 받지 못하고 UndeclaredThrowableException이 발생되며 해당 UndeclaredThrowableException의 getCause()을 통해 진짜 Exception을 받아와도 진짜 Exception Class으로 Casting하려고 하면 ClassCastException이 발생했습니다. 이에 대한 원인은 RPC을 호출하는 쪽(Spring-boot)의 ClassLoader는 RestartClassLoader인데 반에jsonrpc4j에서 Exception을 resovle하는 쪽은 LauncherClassLoader이었기 때.. 2019. 1. 11.
spring-cloud Zuul 사용시 매번 Set-Cookie하는 경우 spring-cloud-starter-netflix-zuul 을 이용하여 Gateway 사용시 매번 Request마다 Set-Cookie: SESSION=YjlmYjEzNzgtZTAzYy00NjEzLWJkYzItYTY5YTFiY2I3NDQy Set-Cookie: SESSION=NDg1NGYwZDktYTM5ZC00YjBjLThiNDMtZjA0ZWZkYmFjYjQ1 이런식으로 세션 쿠키가 한개 이상이 매번 새로 생성되는 문제가 있었습니다.. 일단 설정은...sessionCreationPolicy은 Gateway에서만 ALWAYS으로, 나머지 Endpoint service에서는 NEVER으로 되어있고 Gateway에서 Zuul Filter으로 아래와 같이 Session ID을 넘겨주도록 했습니다. public.. 2018. 12. 26.
springBootAdminVersion='2.0.4' 에서 reactor 오류날때 spring-boot-admin내부에서 dependency가 제대로 설정되어있지 않는듯 하다... implementation('org.springframework.boot:spring-boot-starter-reactor-netty') 추가해주면 해결된다...^^ 2018. 11. 27.
[Spring-boot] OAuth2 인증 과정 정리 1. @EnableResourceServer 어노테이션을 설정하면 ResourceServerConfiguration.class 을 Import하게 됩니다. * 어디선가 authenticationManager가 OAuth2AuthenticationManager 클래스로 설정됩니다. 2. tokenService와 tokenStore을 가져옵니다. 3. 인증시OAuth2AuthenticationProcessingFilter -> doFilter -> tokenExtractor = new BearerTokenExtractor(); Authentication authentication = tokenExtractor.extract(request); // new PreAuthenticatedAuthentication.. 2018. 10. 22.
반응형