본문 바로가기
728x90
반응형

Spring4

springboot logback - mongodb appender정의하기 1. 설정 1. build.gradle plugins { id 'org.springframework.boot' version '2.5.7' id 'io.spring.dependency-management' version '1.0.9.RELEASE' id 'java' } group = 'kr.co.finotek.demo' version = '1.0' sourceCompatibility = '8' configurations { compileOnly { extendsFrom annotationProcessor } compile.exclude group: "org.slf4j", module: "slf4j-log4j12" } repositories { mavenCentral() } dependencies { //.. 2022. 4. 5.
Spring scheduling + cron Spring scheduling spring 내의 스케줄링 기능 cron등의 기능도 사용 가능 설정 build.gradle plugins { id 'org.springframework.boot' version '2.4.3' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } group = 'com.example' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter' testImplement.. 2021. 4. 7.
jwt 설정하기 (spring boot) build.gradle dependencies 에 추가 ... dependencies { // jwt implementation 'io.jsonwebtoken:jjwt:0.9.1' } JwtTokenUtil.java import java.time.LocalDateTime; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.function.Function; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import kr.co.finotek.finomo.. 2021. 4. 1.
jpa Converter를 이용한 암복호화 1. converter/ model 설정 1. EncryptConverter.java .... import org.springframework.util.StringUtils; import javax.persistence.AttributeConverter; public abstract class EncryptConverter implements AttributeConverter { private final String encryptKey; // 암호화 컬럼 private final boolean oneWayEncrypt; // 단방향 암호화 여부 public EncryptConverter(String encryptKey) { this(encryptKey, false); } public EncryptConv.. 2021. 3. 30.
728x90