본문 바로가기

개발36

9. Annotation 설정 1. Interface 만들기 package com.kangong.common.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface LogExecutionTime { } 2. Aspect 구현체 만들기 @Around("@annotation(com.kangong.common.annotation.LogExecut.. 2021. 2. 12.
8. Spring Security 설정 1. pom.xml 설정 org.springframework.boot spring-boot-starter-security org.springframework.security spring-security-taglibs 5.4.2 2. Config 설정 package com.kangong.common.security.config; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import or.. 2021. 2. 12.
7.aop 설정 1. pom.xml 설정 org.springframework.boot spring-boot-starter-aop 2. LogAdvice 설정 package com.kangong.common.aop; import java.util.Arrays; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.springframework.stereotype... 2021. 2. 11.
6.thymeleaf 설정 1. pom.xml 설정 org.springframework.boot spring-boot-starter-thymeleaf 2. applicatoin.properties 설정 spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.html spring.thymeleaf.cache=false spring.thymeleaf.view-names=thymeleaf/* 3. vo 설정 package com.kangong.sample.model; import java.time.LocalDateTime; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; i.. 2021. 2. 11.