sts 에서 bean 에러 발생시
페이지 정보

본문
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of method productJob in com.example.batchmybatis.config.ProductJobConfig required a single bean, but 2 were found:
- insertProductStep: defined by method 'insertProductStep' in class path resource [com/example/batchmybatis/config/ProductJobConfig.class]
- updateProductStep: defined by method 'updateProductStep' in class path resource [com/example/batchmybatis/config/ProductJobConfig.class]
This may be due to missing parameter name information
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
Ensure that your compiler is configured to use the '-parameters' flag.
You may need to update both your build tool settings as well as your IDE.
(See https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.1-Release-Notes#parameter-name-retention)
소스 바꾼거 없고 자바 버전만 바꿨는데 오류나면 실행 자바와 gradle 연동 버전이 잘못된거
properties 환경설정 가서 gradle -> override workspace settings (체크)-> advanced options 에 java home 을 바뀐 자바 위치로 변경.
보통 Spring(특히 Spring 6.x / Spring Boot 3.x 이상)에서 파라미터 이름을 인식하지 못할 때(-parameters 컴파일러 옵션 누락 등) 뜨는 안내 문구입니다. 빌드 도구(Gradle/Maven)와 STS(Eclipse 기반 IDE) 양쪽 모두에 옵션을 반영해야 합니다.
1. 빌드 도구 설정 업데이트
Gradle (build.gradle)
java 컴파일 태스크에 -parameters 옵션을 추가합니다.
groovy
tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
}
STS IDE 설정 업데이트
빌드 도구만 수정하면 STS 내부 컴파일러에는 바로 적용되지 않을 수 있습니다.
1. 프로젝트 우클릭 → Properties 진입
2. Java Compiler 선택
3. Store information about method parameters (usable via reflection) 항목 체크
4. Apply and Close 클릭
5. 상단 메뉴 Project → Clean... 실행 후 프로젝트 선택하여 클린 빌드
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of method productJob in com.example.batchmybatis.config.ProductJobConfig required a single bean, but 2 were found:
- insertProductStep: defined by method 'insertProductStep' in class path resource [com/example/batchmybatis/config/ProductJobConfig.class]
- updateProductStep: defined by method 'updateProductStep' in class path resource [com/example/batchmybatis/config/ProductJobConfig.class]
This may be due to missing parameter name information
Action:
Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed
Ensure that your compiler is configured to use the '-parameters' flag.
You may need to update both your build tool settings as well as your IDE.
(See https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.1-Release-Notes#parameter-name-retention)
소스 바꾼거 없고 자바 버전만 바꿨는데 오류나면 실행 자바와 gradle 연동 버전이 잘못된거
properties 환경설정 가서 gradle -> override workspace settings (체크)-> advanced options 에 java home 을 바뀐 자바 위치로 변경.
보통 Spring(특히 Spring 6.x / Spring Boot 3.x 이상)에서 파라미터 이름을 인식하지 못할 때(-parameters 컴파일러 옵션 누락 등) 뜨는 안내 문구입니다. 빌드 도구(Gradle/Maven)와 STS(Eclipse 기반 IDE) 양쪽 모두에 옵션을 반영해야 합니다.
1. 빌드 도구 설정 업데이트
Gradle (build.gradle)
java 컴파일 태스크에 -parameters 옵션을 추가합니다.
groovy
tasks.withType(JavaCompile) {
options.compilerArgs << '-parameters'
}
STS IDE 설정 업데이트
빌드 도구만 수정하면 STS 내부 컴파일러에는 바로 적용되지 않을 수 있습니다.
1. 프로젝트 우클릭 → Properties 진입
2. Java Compiler 선택
3. Store information about method parameters (usable via reflection) 항목 체크
4. Apply and Close 클릭
5. 상단 메뉴 Project → Clean... 실행 후 프로젝트 선택하여 클린 빌드
- 다음글PHP2Shell 보안 취약점(CVE-2026-109618, CVE-2026-109619)을 해결하기 위해 공식 지원이 종료(EOL)된 PHP 7.4 버전에 대한 긴급 보안 패치 패키지 26.10.23
댓글목록
등록된 댓글이 없습니다.
