티스토리 뷰

728x90

티베로를 사용하면 스프링 배치를 사용하려해도 영 시원치 않다.

스프링 배치가 지원하는 표준 데이터 베이스가 아니기 때문에 아래 오류가 나타나느데..

 

비표준 데이터베이스를 등록하는 방법이다...

@EnableBatchProcessing
public class TiberoBatchConfigurer extends DefaultBatchConfigurer {

  @Autowired
  private DataSource dataSource;
  @Autowired
  private PlatformTransactionManager transactionManager;

  public TiberoBatchConfigurer() {
      super();
  }

  public TiberoBatchConfigurer(DataSource dataSource) {
      super(dataSource);
  }

  @Override
  protected JobRepository createJobRepository() throws Exception {
    JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean();
    factory.setDataSource(dataSource);
    factory.setDatabaseType("ORACLE");
    factory.setTransactionManager(transactionManager);
    factory.afterPropertiesSet();
    return factory.getObject();
  }
}

 

그냥 아래 stackoverflow를 보면 될 것 같다.

스프링 공식 문서도 첨부

참고

https://docs.spring.io/spring-batch/docs/current/reference/html/index-single.html#nonStandardDatabaseTypesInRepository

 

Spring Batch - Reference Documentation

If a group of Steps share similar configurations, then it may be helpful to define a “parent” Step from which the concrete Steps may inherit properties. Similar to class inheritance in Java, the “child” Step combines its elements and attributes wit

docs.spring.io

https://stackoverflow.com/questions/61266208/databasetype-not-found-for-product-name-tibero

 

DatabaseType not found for product name: [Tibero]

While trying to setup a Spring boot - spring batch project, I am running into an error stating: I have checked the spring batch supported database but Tibero is not in the list. Is there any othe...

stackoverflow.com

 

728x90
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
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
글 보관함