반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- parse
- Java 1.8
- aws
- log error
- 스프링부트테스트
- LeetCode
- java 여러개 버전
- el1008e
- java 1.8 11
- springboottest
- java version
- springbatch error
- OpenFeign
- No tests found for given includes
- springboot
- querydsl no sources given
- yum install java
- JUnit
- easy
- xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- java 버전 변경
- no sources given
- maybe not public or not valid?
- java 11
- error
- java
- property or field 'jobparameters' cannot be found on object of type
- mac os git error
- AWS CLI
- Medium
Archives
- Today
- Total
쩨이엠 개발 블로그
[spring batch] EL1008E: Property or field 'jobParameters' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid? 본문
개발/Spring
[spring batch] EL1008E: Property or field 'jobParameters' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid?
쩨이엠 2024. 12. 30. 14:07728x90
반응형
Spring batch에서 ItemReader를 쓰다 발견한 에러
EL1008E: Property or field 'jobParameters' cannot be found on object of type 'org.springframework.beans.factory.config.BeanExpressionContext' - maybe not public or not valid?
이 경우엔 jobParameters를 받는 bean의 scope를 지정해주지 않아 발생하는 에러로
@StepScope @JobScope를 넣어주면 된다
@Bean
@StepScope
public RepositoryItemReader<Trx> trxReader(@Value("#{jobParameters[targetDate]}") LocalDateTime targetDate) {
log.info("startDt : {}, endDt : {}", targetDate.minusMinutes(5), targetDate);
return new RepositoryItemReaderBuilder<Trx>()
.name("trxReader")
.repository(TrxRepository)
.methodName("findByCreatedDtBetween")
.pageSize(CHUNK_SIZE)
.arguments(targetDate.minusMinutes(5), targetDate)
.sorts(Map.of())
.build();
}
끝 !
728x90
반응형
'개발 > Spring' 카테고리의 다른 글
Comments