Spring boot (3) 썸네일형 리스트형 [Spring Boot] CKEditor 이미지 업로드 구현하기 게시판을 이용할 때 글씨에 색을 변경하고 이미지도 업로드하여 게시글을 작성합니다. 이것을 위지윅 에디터(WYSIWYG Editor)라고 하는데, 저는 무료 위지윅 에디터인 CKEditor를 이용하여 Spring Boot에 이미지 업로드를 구현해보겠습니다. 1. CKEditor Download 아래의 경로에서 CKEditor를 다운로드합니다. https://ckeditor.com/ckeditor-4/ CKEditor 4 | Visual Text Editor for HTML Fully Customizable WYSIWYG HTML Editor with the biggest number of Rich Text features. Enterprise-grade with 70 languages and the app.. [Spring Boot] yml, properties 여러개 등록하기 저와 같은 경우 이미지 파일을 저장 할 때 이미지 저장 경로를 깃허브나 외부에 노출하지 않고 싶었기 때문에 properties파일을 여러개를 두어서 gitignore를 하고자 했습니다. 우선 resources파일 아래에 application.yml과 같이 파일을 만들어 줍니다. @SpringBootApplication @EnableJpaAuditing @PropertySource(value = {"classpath:image.properties"}) public class WhiteApplication { public static void main(String[] args) { SpringApplication.run(WhiteApplication.class, args); } } 그리고 @PropertyS.. [JPA] 영속성 컨텍스트 JPA에서 가장 중요한 것이 2가지 있습니다. 1. 객체와 관계형 데이트베이스 매핑 2. 연속성 컨텍스트 입니다. EntityManagerFactory 요청이 들어올 때마다 EntityManager를 생성해 줍니다. EntityManager 내부적으로 DatabaseConnection을 사용하여 DB에 접근하게 됩니다. 영속성 컨텍스트에 접근할 수 있습니다. 영속성 컨텍스트 JPA를 이해하는데 가장 중요한 용어입니다. 엔티티를 영구 저장하는 환경이라는 뜻입니다. EntityManager.persist (entity); DB에 저장한다는 것이 아니라 persist는 영속성 컨텍스트에 저장합니다. 영속성 컨텍스트는 논리적인 개념입니다. 엔티티 매니저를 통해서 영속성 컨텍스트에 접근합니다. 엔티티 생명주기 비.. 이전 1 다음