본문 바로가기

개발세상/java

Java, Eclipse(STS) :: PostConstruct cannot be resolved to a type

728x90
반응형

Java, Eclipse(STS) :: PostConstruct cannot be resolved to a type

 

노트북이 몇일간 말썽이여서 어제 포맷을 했당 ㅋㅋㅋㅋ

그래서 프로젝트 다시 세팅하고 있는데, 이클립스(STS)에서 발견한 에러 

PostConstruct cannot be resolved to a type

 

 

 

바로 위와 같이 에러가 발생.

해결하려고 보니 되게 간단하게 해결해줄 수 있었다.

내 프로젝트는 maven으로 되어있어서 pom.xml에 dependency를 추가해주면 끝

 

 

<dependency>   
	<groupId>javax.annotation</groupId>   
    <artifactId>javax.annotation-api</artifactId>   
    <version>1.3.2</version> 
</dependency>

 

 

위 소스를 pom.xml에 추가 해줬다.

 

 

 

 

그러면 이클립스(STS)가 알아서 pom.xml을 읽어 build 한다.

해당 dependency를 설치한다?라고 보면 될듯

 

 

그러고 나니 PostConstruct 어찌구 에러는 사라졌고

이제 남은 에러들을 해결해서 돌리면 끝이당 캬캬

 

728x90
반응형