▼ Backend/스프링 (Spring)
-
Spring Boot | 웹 프로젝트 만들기 (Thymeleaf, Jar, Gradle, Eclipse)▼ Backend/스프링 (Spring) 2021. 7. 19. 11:55
▶ Spring Boot 웹 프로젝트 만들기 # Step 프로젝트 생성 Thymeleaf(Template Engine) 설정 Controller, html 생성 서버 실행 테스트 1. New > Project... 2. 프로젝트 설정 # 설정에 대한 설명 이름 설명 Service URL start springboot 서비스 URL이다. *변경하지 않는다. Name 프로젝트명 Type 프로젝트 빌드 및 의존성 관리 Maven 또는 Gradle Packaging 패키징을 Jar 또는 War를 선택한다. Java Version 8은 자바버전 1.8을 의미한다. Language Java, Kotlin Group 원하는 값을 넣으면 된다. 보통 도메인을 사용한다.. Artifact 아티팩트명인데, 이것이 프로젝트..
-
Spring Boot | Gradle Tooling version 3.x is not installed▼ Backend/스프링 (Spring) 2021. 7. 19. 10:34
Can not import using Gradle because Buildship Gradle Tolling version 3.x is not installed. You can install it from Eclipse Marketplace. 이클립스에서 Gradle를 사용하려는데, Buildship Gradle가 설치되어 있지 않거나, 버전이 낮은 경우 나타나는 메시지 Help > Eclipse Marketplace... Find > Gradle 이미 설치가 되어있는 경우 Installed를 선택한다. Update license accept > Finish 적용하기 위해 재시작한다. Marketplace에서 정상적으로 설치, 업데이트가 안될 경우 이클립스를 재실행 후 다시 시도해본다.
-
Spring Boot | 내장 톰캣 실행 시 Path with "WEB-INF" or "META-INF"▼ Backend/스프링 (Spring) 2021. 7. 7. 11:27
Console Log Path with "WEB-INF" or "META-INF" 발생 WARN 6868 --- [io-8080-exec-10] o.s.w.s.r.ResourceHttpRequestHandler: Path with "WEB-INF" or "META-INF": [WEB-INF/jsp/login/index.jsp] WARN 252200 --- [nio-8080-exec-1] o.s.w.s.r.ResourceHttpRequestHandler: Path with "WEB-INF" or "META-INF":[WEB-INF/jsp/login/index.jsp] pom.xml tomcat-embed-jasper 추가 org.apache.tomcat.embed tomcat-embed-jasper
-
Spring Boot | Tiles (타일즈) 적용하기▼ Backend/스프링 (Spring) 2021. 6. 30. 15:28
▶ Tiles 란? 웹 페이지의 상단(Header)이나 하단(Footer)과 같이 반복적으로 사용되는 부분들에 대한 코드를 분리하여, 한 곳에서 관리를 가능하게 해 준다. 1. pom.xml javax.servlet jstl org.apache.tiles tiles-jsp 3.0.7 2. WebConfig.java package com.sample.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import..
-
Spring Boot | 메일 발송하기 (Google SMTP)▼ Backend/스프링 (Spring) 2021. 6. 1. 11:09
▶ 스프링부트 메일 발송하기 (Google SMTP) 1. Google 홈페이지 → Google 계정 관리(우측상단) 2. 보안 → 앱 비밀번호 앱 비밀번호는 위에 2단계 인증을 해야 생성됩니다. 3. 메일 → Windows 컴퓨터 선택 4. 생성된 앱 비밀번호를 메모해둔다. (smtp 설정에 사용될 예정) 5. 빠른 설정(우측상단 톱니바퀴) → 모든 설정 보기 6. 전달 및 POP/IMAP(탭) → 모든 메일에 POP 사용하기 → IMAP 사용 → 변경사항 저장 7. pom.xml spring-boot-starter-mail 추가 org.springframework.boot spring-boot-starter-mail 8. SMTP 설정 - application.properties # spring-bo..
-
Spring Boot | Scheduler 설정하기▼ Backend/스프링 (Spring) 2021. 5. 17. 14:47
package com.sample.web; import java.util.Date; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; // 스케줄링을 사용한다는 것을 알린다. @EnableScheduling // 개발자가 직접 작성한 Class를 Bean으로 등록하여 사용하기 위함 @Component public class SampleScheduler { /* 초 분 시 일 월 주(년) @Scheduled(cron = "0/30 * * * * ..
-
Spring-loaded 적용하기▼ Backend/스프링 (Spring) 2021. 5. 14. 14:52
Class를 변경할 때마다 서버를 재시작하는 일은 매우 번거롭다. 따라서, 서버의 재시작 없이 적용할 수 있는 Springloaded를 적용해본다. 1. Springloaded를 다운로드한다. https://mvnrepository.com/artifact/org.springframework/springloaded 2. Eclipse > Window > Show View > Server > Servers에서 해당 Tomcat 선택하여 환경 파일 연다. 2-1) Open launch configuration 설정을 연다. 3. Arguments 탭으로 이동 후 VM arguments에서 한 칸 띄고 아래 내용을 추가한다. -javaagent:C:\eGovFrameDev-3.9.0\program\apache-..