02.07 TIL
2023. 2. 7. 09:57ㆍ개발일지
Spring Boot에서 새 프로젝트를 켰는데
버젼오류가 나와서 build.gradle에 가서
plugins{
id 'java'
id 'org.springframework.boot' version '3.0.2' // 이부분
id 'io.spring.dependency-management' version '1.1.0'
}
이렇게 바꾸고 오른쪽 옆에 코끼리 새로고침 모양 있는거 눌러주면 정상작동!
그 다음 @NotBlank 설정 방법
build.gradle가서
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
implementation 'org.springframework.boot:spring-boot-starter-validation' 추가해주면
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
이렇게 어노테이션 가능!
'개발일지' 카테고리의 다른 글
02.09 TIL (0) | 2023.02.09 |
---|---|
02.08 JPA 심화 (0) | 2023.02.08 |
02.06 JPA 기초 (0) | 2023.02.06 |
02.04 HTTP, OSI, TCP/IP 특강 (TIL) (0) | 2023.02.04 |
02.03 Database 와 SQL (0) | 2023.02.03 |