사용자 도구

사이트 도구


wiki:springboot

SpringBoot

설정 파일

Spring Boot Batch

Jpa(Java 퍼시스턴스 API)

Annotation

Batch

Tasklet VS Chunk

Tasklet Chunk
When to use 작업을 단일 세부 작업으로 실행 한 다음 태스크 릿 처리를 사용 실행할 작업이 복잡하고 읽기, 처리 및 쓰기와 관련된 작업을 실행한다고 가정하자. 청크 지향 처리를 사용합니다.
How it works 집계가 없으면 작업 만 실행됩니다. 입력을 읽은 다음 비즈니스 로직을 기반으로 처리 한 다음 커밋 간격에 도달 할 때까지 집계하고 마지막으로 데이터 출력 청크를 파일 또는 데이터베이스 테이블에 쓰는 작업이 포함됩니다.
Usage 일반적으로 사용되지 않습니다. Step을 실행하는 가장 일반적인 방법.
Use Case 일반적으로 리소스를 삭제하거나 쿼리를 실행하는 것과 같은 단일 태스크를 호출하는 시나리오에 사용됩니다. 일반적으로 여러 집계 된 단계를 복사, 처리 및 데이터 전송과 같이 실행해야하는 경우에 사용됩니다

Scheduler (스케줄러) 사용하기

Troubleshooting

1. Run As 실행시에 Spring Boot App 이 없을 경우 구동 방법

Steps: 1. go to Run->Run configuration -> Maven Build -> New configuration
Steps: 2. set base directory of you project ie.${workspace_loc:/${프로젝트명}}
Steps: 3. set goal spring-boot:run
Steps: 4. Run project from Run->${프로젝트명}

How to run Spring Boot web application in Eclipse itself?

2. pom.xml Error 표시: Plugin execution not covered by lifecycle configuration

In Eclipse Luna 4.4.0, you can chose to ignore this error in preferences

Window > Preferences > Maven > Errors/Warnings > Plugin execution not covered by lifecycle configuration. Select Ignore / Warning / Error as you wish. Also, in the quick fix (Ctrl + 1) for this error, it gives an option to mark goal as ignored in Eclipse build in Eclipse preferences (experimental) This is a cleaner way, as it doesn't modify your pom.xml. You will need to do a Maven > Update project to fix the same error in any other project as well.


3.failed to lazily initialize a collection of role or could not initialize proxy - no Session
repo를 호출하는 메소드에 @Transactional를 선언해주면 됩니다.
Tip:JPA의 영속성을 이해해야 됩니다. failed to lazily initialize a collection of role 오류 관련 문의
JPA 영속성 이해

How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds

/var/services/web/dokuwiki/data/pages/wiki/springboot.txt · 마지막으로 수정됨: 2023/01/26 10:24 저자 dhan