Spring Boot 3 및 Spring Batch 5에서 배치 테이블 자동 생성 문제 해결하기
·
Spring 기초/Spring 오류해결
SpringBoot3에서 배치를 사용할 때 왜 테이블을 자동으로 만들어 주지 않을지 알아보고 이것을 해결해 보자 1. 배치를 사용할 때 자동으로 테이블을 생성해 주지 않는 문제 1-1. 테이블이 생성되지 않는 원인 파악하기 Spring Boot 3에서 Spring Batch를 사용할 때 'application.yml'에 batch.jdbc.initialize-schema: ALWAYS와 job.enabled: true를 설정했는데도 불구하고 자동으로 DB 테이블이 생성되지 않는 문제가 있다. 이 문제의 원인은 Spring Boot 3에서 일부 자동 구성 변경 사항 때문이다. batch: jdbc: initialize-schema: ALWAYS job: enabled: true 원인1: 자동 구성 방법의 ..
[스프링, 스프링부트] Spring - 게시글 삭제중 발생한 오류 해결
·
Spring 기초/Spring 오류해결
게시글 삭제를 하던중에 오류가 발생했다. 이유를 알아보자 1. 상황 설명 아래와 같은 게시글 상세보기 페이지에서 대댓글이 달린 댓글을 삭제했을때 오류가 발생했다. 에러 메시지 확인 {"errorMessage":"could not execute statement [Cannot delete or update a parent row: a foreign key constraint fails (profile.board_sub_comment, CONSTRAINT FK_BOARD_SUB_COMMENT_board_comment_id_BOARD_COMMENT_board_commen FOREIGN KEY (board_comment_id) REFERENCES board_comment (board_comment_id) ON)..
사용법 미숙지로 인한 controller test - 오류해결
·
Spring 기초/Spring 오류해결
컨트롤러 관련 테스트를 진행하다 Thymeleaf와 관련된 에러를 만났다. 1. 에러 코드타임리프 관련 에러가 있다고 표시되고 있다.jakarta.servlet.ServletException: Request processing failed: org.thymeleaf.exceptions.TemplateInputException: Error resolving template [board/save], template might not exist or might not be accessible by any of the configured Template Resolvers Caused by: org.thymeleaf.exceptions.TemplateInputException: Error resolving tem..