SPRING 8

Mongo DB - 다중 Config 설정

개요 : Mongo DB의 DataBase가 늘어나면서 Spring Boot의 application.yml에 default config 세팅으로는 여러 DataBase를 연결 할 수 없었다. 다중 Config 설정을 위해 CustomConfig의 생성이 필요하다. -- 변경 전 예시 (applicationl.yml) - 1개의 애플리케이션당 1개의 connection만 연결 가능했었다. spring: data: mongodb: host: demo_host port: 27017 authentication-database: demo_auth username: demo_username password: demo_password database: demo_database -- 1. 변경 후 (Java 8 버전 ..

SPRING 2024.03.20

spring boot Gradle 버전 이슈

JDK 8 -> JDK 17 업그레이드시 Your build is currently configured to use Java 17.0.3 and Gradle 6.8.2. 에러 발생 JDK 17은 gradle 버전 7.3이상부터 지원한다고 한다. - 해결방법 : 1. 프로젝트 경로 - gradle - gradle-wrapper.properties 2. 하단의 스샷과 같이 변경 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=w..

SPRING 2022.12.13

Spring MAVEN 프로젝트 생성 - IntelliJ (초기세팅)

1. New Project 생성 2. Maven 메뉴 클릭 후 Next 3. 프로젝트 Name 및 저장경로(Location) 지정 4. Spring Framework 라이브러리 추가 5. src - main 하단으로 생성된 web폴더 이동 및 이름변경(webapp) 6. (applicationContext.xml -> root-context.xml 및 dispatcher-servlet.xml -> servlet-context.xml) 이름 변경 및 경로 변경 7. web.xml 설정 contextConfigLocation classpath:/spring/appServlet/root-context.xml org.springframework.web.context.ContextLoaderListener dis..

SPRING 2022.08.17