반응형

Spring 6

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

Spring boot에서 com.mysql.jdbc.Driver 드라이브를 사용하지 않는데 아래와 같이 로그에서 오류가 발생 하여 처리하는 방법을 정리 해본다. Loading class `cohttp://m.mysql.jdbc.Driver'. This is deprecated. The new driver class is `cohttp://m.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. 프로젝트/resources 폴더 안에 log4jdbc.log4j2.properties 파일을 작성 한 후 아래 소스 추가..

Spring 2024.03.14

gradle를 이용한 원격서버 배포하기

build.gradle 파일 열어서 아래 소스를 추가한다. 아래 소스는 plugins 위에 작성해야 한다. 그냥 멘 위에 작성. buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.2.RELEASE") classpath("org.hidetake:gradle-ssh-plugin:2.2.0") } } plugin 다음에 아래 소스 추가 apply plugin: 'org.hidetake.ssh' build.gradle 파일 끝부분에 아래 부분 추가 remotes { dev_server { host = "XXX.XXX.XXX.XXX" po..

Spring 2024.03.07

Feign Client 'Could not write request: no suitable HttpMessageConverter found for request type' 오류

Feign Client 개발을 하다가 아래와 같은 오류가 발생하면 'Could not write request: no suitable HttpMessageConverter found for request type' spring-boot-start-web dependency가 없어서 발생하는 에러다 즉, feign client 쓰기 위해서는 spring-boot-start-web 필요하다는 뜻이다. https://stackoverflow.com/questions/67376764/could-not-write-request-no-suitable-httpmessageconverter-found-for-request-type

Spring 2024.02.29

Spring .. has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource 오류

CORS CORS(Cross-Origin Resource Sharing) 란, 웹 서버 도메인간 액세스 제어 기능을 제공하여 보안 도메인간 데이터 전송을 가능하게 해준다. #해결방법 @Configuration @EnableWebMvc public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedMethods("PUT", "DELETE", "POST", "GET", "OPTION", "PATCH") .allowCredentials(false).maxAge(3600); } }

Spring 2021.02.04

lombook설치

lombook이란 Model(VO)에서 변수위에 어노테이션을 사용하면 getter,settter을 자동으로 만들어주는 java 라이브러리다. 사용법은 아래와 같이 하면 된다. 1. 다운로드 - https://mvnrepository.com/artifact/org.projectlombok/lombok/1.16.10 접속하여 jar파일 다운로드 2. lombok-1.16.10 실행 * 사전에 java가 설치되어 있어야 한다. 1- lombok-1.16.10 마우스로 더블클릭 하거나 콘솔에서 java lombok-1.16.10.jar 실행 후 아래와 같은 화면이 나오면 Specify location... 클릭 2- 이클립스 선택 3- 이클립스 선택 후 아래와 같은 화면이 나오면 Install / Update ..

Spring 2019.03.01
반응형