junhkang의 개발 블로그
close
프로필 배경
프로필 로고

junhkang의 개발 블로그

  • DEV (103)
    • Postgresql (47)
    • Linux (4)
    • AWS (4)
    • 운영체제(OS) (1)
    • Spring (19)
    • 네트워크 (3)
    • Java (4)
    • WEB (2)
    • Elastic Search (1)
    • 이펙티브 자바 (10)
    • 디자인패턴 (5)
    • GitHub (1)
    • LLM (2)
  • 홈
  • 태그
  • 방명록
[Spring] Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection, 데이터베이스 접속 에러

[Spring] Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection, 데이터베이스 접속 에러

Amazon RDS and Amazon Aurora SSL/TLS 인증서를 업데이트 후 별다른 설정 변경을 하지 않았지만, 오랜만에 빌드하는 스프링부트 프로젝트의 데이터베이스 연결이 되지 않는 현상 발생하였다. ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "{host}", user "{user}", database "{database}", no encryption ..

  • format_list_bulleted Spring
  • · 2024. 7. 25.
  • textsms
[Spring] 스프링부트 3, 스프링 시큐리티 6, 로그인 세션 유지, 로그인 풀림

[Spring] 스프링부트 3, 스프링 시큐리티 6, 로그인 세션 유지, 로그인 풀림

1. 문제 상황 스프링 부트 3, 스프링 시큐리티 6 업데이트가 되며 기존에 사용 중인 WebSecurityConfigurerAdapter를 더 이상 지원하지 않기에 기존의 WebSecurityConfigurerAdapter를 상속받아 기능을 구현하는 대신 컴포넌트화 시켜서 구현해야한다. SecurityFilterChain으로 스프링 시큐리티를 구현 중 (antMacher -> requestMacher, dispatcherTypeMatcher설정 등 기본 Spring Security6.0 마이그레이션 가이드는 적용 완료 https://docs.spring.io/spring-security/reference/5.8/migration/index.html) Preparing for 6.0 :: Spring S..

  • format_list_bulleted Spring
  • · 2024. 2. 2.
  • textsms

[Spring] 스프링부트 3 jstl 적용(maven), (절대 URI인 [http://java.sun.com/jsp/jstl/core]을(를), web.xml 또는 이 애플리케이션과 함께 배치된 JAR 파일 내에서 찾을 수 없습니다.)

1. 문제 상황 스프링부트 3 버전 업데이트 중 jstl URI / 라이브러리를 찾지 못하는 현상 발생 http://java.sun.com/jsp/jstl/core]을(를), web.xml 또는 이 애플리케이션과 함께 배치된 JAR 파일 내에서 찾을 수 없습니다. 2. 해결 타 라이브러리와 동일하게 javax -> jakarta 기반 jstl maven dependency를 추가해주면 된다. jakarta.servlet.jsp.jstl jakarta.servlet.jsp.jstl-api 3.0.0 jakarta.servlet jakarta.servlet-api 6.0.0 jakarta.servlet.jsp jakarta.servlet.jsp-api 3.1.0 provided jakarta.el jakar..

  • format_list_bulleted Spring
  • · 2024. 1. 31.
  • textsms

[Spring] Java 21 롬복(lombok) 버전 설정 (java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid')

1. 문제 상황 JDK21 버전 업 중 java: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' 라는 에러와 함께 빌드 실패 2. 해결 JDK21과 호환되지 않는 롬복(lombok) 버전 문제로 확인, (JDK21과 호환되는 최소 롬복(lombok) 버전은 1.18.30이다.) org.projectlombok lombok 1.18.30 provided 기존 사용 중인 구버전 롬복(lombok)을 작성일 기준 최신버전이자 JDK21 호환 최소 버전인 1.18.30으로 변경해 주면 정상적으로 빌드가 된..

  • format_list_bulleted Spring
  • · 2024. 1. 31.
  • textsms
[Spring] Java 21 외장 톰캣 버전 설정

[Spring] Java 21 외장 톰캣 버전 설정

1. 문제 상황 Java21 버전 업 중, 인텔리제이 내장 톰캣으로는 정상적으로 실행되지만, 커스텀 옵션을 사용 중인 외장톰캣을 그대로 사용 시 정상적으로 구동되지 않는 현상이 발견되었다. 2. 해결 먼저, 빌드 및 path 등 기존 설정들은 문제가 없는 것을 확인하였고, 로컬 톰캣에서 정상적으로 구동됨을 확인하였기에 다른 부분을 추가로 확인해 보았다. 버전업 영향도 파악기간 중 기존에 톰캣 8.5 버전과 호환되는 것을 확인하였으나, 공식 홈페이지에서 재확인해보았다. 톰캣 8.5 버전의 자바 지원버전을 보면 "7 and later"로 되어있어 7 이후 버전을 다 사용 가능한 것으로 이해했었으나, 다른 버전을 시도. 그중 jdk21 버전과 정확히 일치하는 최신 톰캣 11.0.x 버전을 시도하였고, 톰캣을 ..

  • format_list_bulleted Spring
  • · 2023. 12. 18.
  • textsms

[Spring] Spring Security6 filterchain 사용시 jsp 뷰 렌더링 설정

1. 현상 스프링부트 3.*.* 버전 업을 하며 Spring Security6으로 업데이트 중이다. 더 이상 지원하지 않는 WebSecurityConfigurerAdapter를 SecurityFilterChain으로 변경 시 포워딩되는 jsp 파일 경로가 필터에 걸려 노출되지 않는 현상이 발생하였다. 1-1. 기존 샘플 소스 @Configuration public class SecurityConfig { @Bean public SecurityFilterChain config(HttpSecurity http) throws Exception { http.authorizeHttpRequests((auth) -> auth .requestMatchers("/").permitAll() .anyRequest().au..

  • format_list_bulleted Spring
  • · 2023. 12. 18.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • navigate_next
전체 방문자
오늘
어제
전체
전체 카테고리
  • DEV (103)
    • Postgresql (47)
    • Linux (4)
    • AWS (4)
    • 운영체제(OS) (1)
    • Spring (19)
    • 네트워크 (3)
    • Java (4)
    • WEB (2)
    • Elastic Search (1)
    • 이펙티브 자바 (10)
    • 디자인패턴 (5)
    • GitHub (1)
    • LLM (2)
최근 글
인기 글
태그
  • #디자인패턴
  • #spring
  • #오블완
  • #Index
  • #이펙티브자바
  • #AWS
  • #test
  • #티스토리챌린지
  • #PostgreSQL
  • #Effective Java
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바