[Error] import javax.validation 문제 해결 방법

    javax.validation이 import 되지 않길래 이것 저것 찾아보다가.. 결국 알아냈다!

    2.3.x버전대부터는 Validation starter가 빠져서 pom.xml의 dependency 부분에 다음과 같이 추가해주면 된다고 한다!

     

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>

     

    이런 식으로 추가하고 변경사항을 저장해주면 해결된다 !

     

     

    참고 ) 

    결론 : 만능 스택오버플로우 ㅎㅎ

     

    https://stackoverflow.com/questions/61959918/spring-boot-validations-stopped-working-after-upgrade-from-2-2-5-to-2-3-0

     

    Spring Boot - Validations stopped working after upgrade from 2.2.5 to 2.3.0

    I've migrated a Spring Boot project from 2.2.5 to 2.3.0 and after that, Validations stopped to work (they aren't invoked at all). I read in changelog documentation (https://github.com/spring-proje...

    stackoverflow.com

     

    댓글