본문 바로가기

SpringBoot

(5)
1) 스프링부트 초기세팅 1. New - Spring Starter Project를 클릭합니다. 2. Name(프로젝트 이름), Type에 Gradle, Java Version 8을 선택, Group에 자신이 원하는 패키지명을 정하고 Next를 눌러줍니다. # Maven대신 Gradle을 사용하는 이유 1. 스크립트의 길이가 짧고, 가독성이 좋다. 2. 빌드와 테스트 실행 결과 Gradle이 더 빠르다. (캐시를 사용하기 때문에 반복 테스트 시 성능 차이는 더 커진다.) 3. spring boot version 중 m2와 snapshot은 아직 실험 버전이므로 가장 최신인 2.5.3을 선택합니다. Lombok(Getter, Setter 등.. 어노테이션을 통해 쉽게 사용 가능) MariaDB Driver(무료인 MariaDB) ..
DeleteMapping "Request method 'POST' not supported" 오류 HTML Form에서는 GET과 POST방식의 Methods만 지원하기 때문에 오류가 생긴다. 해결방법 -> POST를 PUT으로 해석해주는 역할이 HiddenHttpMethodFilter를 yml에 등록해준다. spring: mvc: hiddenmethod: filter: enabled: true spring.mvc.hidden method.filter.enabled=true HiddenHttpMethodFilter란? Hidden 타입의 input 태그의 속성들을 읽어서 HttpServletRequestWrapper.getMethod() 반환 값을 변경해 요청된 HTTP 메소드의 타입을 PUT, DELETE, PATCH로 변경해주는 필터이다. Spring의 HiddenHttpMethodFilter에 ..
repository @AutoWired injection 에러 Field accountRepository in org.hch.auth.service.UserServiceImpl required a bean of type 'org.hch.auth.repository.AccountRepository' that could not be found. The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true) Action: Consider defining a bean of type 'org.hch.auth.repository.AccountRepository' in your configuration. @Reposito..
SpringBoot 2.5.0 For Jackson Kotlin classes support please add “com.fasterxml.jackson.module: jackson-module-kotlin” to the classpath 경고 SpringBoot 2.5.0 For Jackson Kotlin classes support please add “com.fasterxml.jackson.module: jackson-module-kotlin” to the classpath 경고 해결방법 build.gradle SpringBoot 2.5.0 For Jackson Kotlin classes support please add "com.fasterxml.jackson.module: jackson-module-kotlin" to the clas Small question about a warning I am receiving please. After the release of 2.5.0 of SpringBoot, I just did a versi..
LoggingFailureAnalysisReporter 에러 처음 빌드 해서 실행시키면 LoggingFailureAnalysisReporter 에러 발생. 해결방법 -properties일 경우 spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration -yml일 경우 spring: autoconfigure: exclude: - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration