[javax] import 문제

Juju·2022년 10월 28일
0

https://rachyoo.tistory.com/33

setting 설정값 바꿔줬숑

<groupId>jakarta.validation</groupId>
 <artifactId>jakarta.validation-api</artifactId>
 <version>2.0.2</version>

안먹힘

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

안먹힘2

   <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

기존에 내꺼 pom

메이븐에 디펜던시 추가해야할꺼같은데 javax 구조를 모르겠음 어떻게 넣는거

https://cheershennah.tistory.com/151

구조

https://people.apache.org/~ltheussl/maven-stage-site/guides/mini/guide-coping-with-sun-jars.html

이거보고 임포트하라고 하는데 어떻게 함?

https://mvnrepository.com/search?q=javax

이것도 잇음

!-- validation-api는 생략 가능 -->
<dependency>
  <groupId>javax.validation</groupId>
  <artifactId>validation-api</artifactId>
  <version>2.0.1.Final</version>
</dependency>
<dependency>
  <groupId>org.hibernate.validator</groupId>
  <artifactId>hibernate-validator</artifactId>
  <version>6.0.7.Final</version>
</dependency>

이 코드 pom.xml 에 넣으니까 해결됨.

https://javacan.tistory.com/entry/Bean-Validation-2-Spring-5-valiidatiion

참조함

profile
수정중

0개의 댓글

관련 채용 정보