반응형
pom.xml을 변경하고 maven update 시 프로젝트 자바 버전이 1.6으로 변경되는 현상
pom.xml 내 properteis 태그 내 java-version을 1.8(해당 자바버전으로)로 수정
<properties>
<java-version>1.8</java-version>
<org.springframework-version>3.1.1.RELEASE</org.springframework-version>
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.6.6</org.slf4j-version>
</properties>
그리고 build 태그 내 org.apache.maven.pugins의 source와 target 버전 또한 고쳐야 함.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
이렇게 pom.xml 수정 후 maven update 하게 되면 오류 사라짐.
반응형
'Spring > 오류' 카테고리의 다른 글
[Spring] Log4j cannot be resolved to a type 에러 (0) | 2023.07.27 |
---|