AnnotationConfigurationException 에러 질문드려요
907
작성한 질문수 9
첫번째
package me.practice;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
소스를 실행시키니 맨 아래와 같은 메시지가 나왔습니다.
pom.xml 은 아래와 같습니다. 검색해봐도 새로운 spring boot버전에 proxyBeanMethods가
추가되어서 변경해야한다고 하는데 spring은 처음이라 잘 모르겠습니다.ㅠ 어떻게 해야할까요?
개발환경은 Window 입니다.
----------------------------- 에러 수정했습니다. 아래 spring boot 버전을 올리니 해결이 되네요 ㅠㅠ
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>SpringBoot Practice</artifactId>
<version>1.0-SNAPSHOT</version>
<!-- Inherit defaults from Spring Boot -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.3.RELEASE</version>
</parent>
<!-- Add typical dependencies for a web application -->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.2.5.RELEASE</version>
</dependency>
</dependencies>
<!-- Package as an executable jar -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
org.springframework.core.annotation.AnnotationConfigurationException: Attribute 'proxyBeanMethods' in annotation [org.springframework.boot.autoconfigure.SpringBootApplication] is declared as an @AliasFor nonexistent attribute 'proxyBeanMethods' in annotation [org.springframework.context.annotation.Configuration].; nested exception is java.lang.NoSuchMethodException: org.springframework.context.annotation.Configuration.proxyBeanMethods()
at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.<init>(AnnotationUtils.java:2180) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.from(AnnotationUtils.java:2148) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.getOtherDescriptors(AnnotationUtils.java:2312) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.getAttributeAliasNames(AnnotationUtils.java:2299) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.annotation.AnnotationUtils.getAttributeAliasNames(AnnotationUtils.java:1813) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.annotation.AnnotationUtils.getAttributeAliasMap(AnnotationUtils.java:1722) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.annotation.AnnotationUtils.postProcessAnnotationAttributes(AnnotationUtils.java:1335) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.annotation.AnnotatedElementUtils.getMergedAnnotationAttributes(AnnotatedElementUtils.java:365) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotationAttributes(StandardAnnotationMetadata.java:121) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.annotation.AnnotationConfigUtils.attributesFor(AnnotationConfigUtils.java:285) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:93) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:72) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.doRegisterBean(AnnotatedBeanDefinitionReader.java:224) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:145) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register(AnnotatedBeanDefinitionReader.java:135) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:158) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:135) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.BeanDefinitionLoader.load(BeanDefinitionLoader.java:127) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.load(SpringApplication.java:717) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:392) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
at me.practice.Application.main(Application.java:8) ~[classes/:na]
Caused by: java.lang.NoSuchMethodException: org.springframework.context.annotation.Configuration.proxyBeanMethods()
at java.base/java.lang.Class.getDeclaredMethod(Class.java:2475) ~[na:na]
at org.springframework.core.annotation.AnnotationUtils$AliasDescriptor.<init>(AnnotationUtils.java:2173) ~[spring-core-5.1.5.RELEASE.jar:5.1.5.RELEASE]
... 23 common frames omitted
답변 1
1
Caused by: java.lang.NoSuchMethodException 이 에러는 보통 라이브러리 간의 버전이 안맞아서 발생하는 에런데.. 스프링 부트가 의존성 관리를 해주기 때문에 좀처럼 이런 에러는 볼 수가 없는데 보신 이유는..
이런식으로 버전으로 명시해 주셨기 때문입니다. parent의 버전은 2.1.3.RELEASE니까 맞지가 않겠네요.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.2.5.RELEASE</version>
</dependency>
자동설정 만들기 1부의 Holoman 관련 문의 드립니다.
0
84
1
라이브러리 개발 예제 강의를 찾습니다 !!!
0
225
2
강의 진행되로 똑같이 했는데 jquery가 실행되지 않았는데
0
310
1
HateOas 가 업데이트가 되어서, "Spring HATEOAS" 코드를 아래처럼 하셔야 될겁니다.
0
364
2
springSecurit jwt에 대해서 질문드립니다.
0
343
1
섹션2 자동설정 부분 질문있습니다.
0
249
1
mongo shell 명령어 대체 mongo -> mongosh
0
1012
1
데이터베이스 마이그레이션 강의에서 질문 있습니다
0
707
0
자동 설정 만들기 2부에서 질문 있습니다
0
413
1
의존성 관리 응용 부분에서 질문 있습니다
0
321
0
Intellij 에서 빈 주입할때 계속 빨간줄이 뜨는데 어떻게 고쳐야 할까요
0
1183
1
자동설정으로 다른 프로젝트 빈 사용(번외질문)
0
363
0
CREATE TABLE 예제 따라하다가 'expected "identifier"; SQL statement:' 오류나는 경우
2
2212
2
junit5 관련하여 질문드립니다.
0
307
2
맨 처음 프로젝트 생성 후 Run 시 에러
0
535
2
외부 설정과 관련된 질문입니다.
0
255
1
test와 runner account.setEmail에 동일한 값 입력
0
323
1
컨트롤러 view 호출
0
265
1
JVM 과 arguments 는 뭔가요???
0
1170
1
pom 테그 에러
0
355
1
안녕하십니까 기선님!!!!! webclient와 비동기관련 질문요청드립니다
0
1554
1
webEnvironment 내장 톰캣
0
228
1
application.yml 파일 분리
0
393
1
안녕하세요 기선님 서블릿 어플리케이션 구조에 대해 질문드립니다
0
281
1





