개발/Spring Boot12 4. log4j2 설정 1. pom.xml 설정 org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-logging org.springframework.boot spring-boot-starter-log4j2 2. /resoruce/log4j2.xml %d{yyyy-MM-dd HH:mm:ss} %p %m%n 3. Log 출력 package com.kangong.sample.controller; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory... 2021. 2. 7. 3. jsp 연동 1) Spring Boot 동적 파일 반영 (pom.xml) org.springframework.boot spring-boot-devtools runtime true 2) Servlet 엔진 + jstl 연동 (pom.xml) org.apache.tomcat.embed tomcat-embed-jasper provided javax.servlet jstl 3) Controller 설정 @GetMapping("/main") public String main() { System.out.println("main===="); return "/views/common/main.jsp"; } 4) jsp 설정 Hello World!! 5) http://localhost:8080/main 호출 정상화면 ^^ 6) app.. 2021. 2. 7. 2. MySql 연결 MySql 연결 1. pom.xml 설정 org.mybatis.spring.boot mybatis-spring-boot-starter 2.1.4 mysql mysql-connector-java 8.0.22 2. application.properties 설정 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://127.0.0.1:3306/SECKIMDB?useSSL=false&serverTimezone=UTC spring.datasource.username=SECKIM spring.datasource.password=1234 mybatis.mapper-locations=classpath:m.. 2021. 2. 6. 1.Spring Boot 환경 셋팅 1. Eclipse Download 2. Eclipse 환경설정 Preference > Maven > User Settings create Maven Project 3. Spring Boot Web 설정 확인 0) pom.xml 4.0.0 com.kangong boot-kangong 0.0.1-SNAPSHOT war boot-kangong Kangong Project org.springframework.boot spring-boot-starter-parent 2.4.2 15 org.springframework.boot spring-boot-starter-web 1) Spring Boot Application package com.kangong; import org.springframework.boot.S.. 2021. 2. 6. 이전 1 2 3 다음