일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- STS
- IntelliJ
- Docker
- Open Source
- Thymeleaf
- SpringBoot
- maven
- oracle
- JDBC
- 오픈소스
- ubuntu
- JavaScript
- Python
- git
- 문서
- myBatis
- Spring Boot
- Eclipse
- Exception
- PostgreSQL
- error
- spring
- Source
- Core Java
- 설정
- MSSQL
- Tomcat
- jpa
- MySQL
- AJAX
- Today
- Total
목록Spring Boot Framework (61)
헤르메스 LIFE
Inteceptor 에서 Log를 찍고 싶은데, 찍을 수가 없습니다. logback.xml 은 정상적으로 Log가 찍힙니다. 하지만 logback의 확장기능을 사용하고 싶어서 포기가 안되네요. package com.study.wings.interceptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.HandlerInterceptor; import javax.servlet.http.HttpServl..
Interceptor 구현 Interceptor는 HandlerInterceptor 인터페이스를 구현하거나, HandlerInterceptorAdapter를 상속받은 클래스를 만들고 다음의 메소드를 구현합니다. preHandler - Controller의 메서드가 호출되기 전 호출됩니다. 이 메서드가 false 를 반환하면 코드의 흐름이 중단됩니다. postHandler - Controller의 메서드의 수행이 완료되고, view 처리를 수행하기 전에 호출됩니다. afterCompletion - view 처리까지 완료되고 응답결과가 브라우저로 전달되기 전에 호출됩니다. package com.study.myweb.interceptor; import org.springframework.stereotype.C..

개발환경 JDK : OpenJDK 11 IDE : IntelliJ Framework : Spring Boot 2.5.2 Tools : Lombok Spring Boot 프로젝트 생성 시 packaging 방법 중 jar 와 war 방식을 선택해야 합니다. Tomcat 과 같은 웹 컨테이너에 애플리케이션을 배포할 계획이라면 war 방식을 선택해야 합니다. 따라서 JSP 그리고, 임배디드 Sevlet 컨테이너의 Spring Boot를 사용할 경우 jar 를 사용할 수 없습니다. https://www.baeldung.com/spring-boot-jsp https://www.baeldung.com/spring-boot-run-maven-vs-executable-jar JSP 파일 경로 설정 application..
LOCAL_SAVE_URL 에서 오류가 발생하면 4xx번, 5xx번대 오류가 넘어옵니다. try { ResponseEntity response = restTemplate.postForEntity( LOCAL_SAVE_URL, entity, String.class ); logger.debug( "response :: {}", response ); logger.debug( "result :: {}", response.getStatusCodeValue() ); logger.debug( "result :: {}", response.getBody() ); //logger.debug( "result :: {}", (List) response.getBody().get( "list" ) ); } catch ( Http..
개발환경 Spring Boot 2.2.4 JDK 1.8.0_202 REST Postman : REST Client 목표 1. Spring Boot REST 환경 2. JWT + Spring Security 를 통한 인증 3. Resttemplate 조회, 저장 조회 package rest.boot.test; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.Ht..
개발환경 Spring Boot 2.2.4 JDK 1.8.0_202 REST Postman : REST Client 목표 1. Spring Boot REST 환경 2. Log4j2 추가 3. JWT + Spring Security 를 통한 인증 4. DB 연결 ( Hibernate 제거 )을 통한 사용자 인증 5. TDD 인증 테스트 import org.junit.*; import org.junit.runner.*; import org.springframework.beans.factory.annotation.*; import org.springframework.boot.test.autoconfigure.web.servlet.*; import org.springframework.boot.test.contex..

개발환경 Spring Boot 2.2.4 JDK 1.8.0_202 REST Postman : REST Client 목표 1. Spring Boot REST 환경 2. Log4j2 추가 3. JWT + Spring Security 를 통한 인증 4. DB 연결 ( Hibernate 제거 )을 통한 사용자 인증 어쩌다 제가 원하는 프로젝트를 찾았습니다. 소스까지 오픈 해주셔서 제 입맛에 맞게 수정을 했습니다. 출처 : daddyprogrammer.org/post/636/springboot2-springsecurity-authentication-authorization/ SpringBoot2로 Rest api 만들기(8) – SpringSecurity 를 이용한 인증 및 권한부여 - 아빠프로그래머의 좌충 이번..

개발환경 Spring Boot 2.2.4 JDK 1.8.0_202 REST Postman : REST Client 목표 1. Spring Boot REST 환경 2. Log4j2 추가 3. JWT 기능 테스트 Spring Security를 준비하면서, JWT ( JSON Web Token ) 에 대해 테스트를 해봤습니다. 기존 프로젝트( hermeslog.tistory.com/449?category=530345 )에 JWT 기능 테스트를 해봤습니다. 1. pom.xml 수정 javax.xml.bind jaxb-api 2.3.1 io.jsonwebtoken jjwt 0.9.1 import com.sample.service.UserService; import com.sample.web.base.service..
개발환경 Spring Boot 2.2.4 JDK 1.8.0_202 REST Postman : REST Client 목표 1. Spring Boot REST 환경 2. Log4j2 추가 기존 프로젝트( https://hermeslog.tistory.com/445?category=530345 )에 Logging 설정을 추가했습니다. 1. pom.xml 수정 4.0.0 org.example SpringBootSample 1.0-SNAPSHOT 8 8 org.springframework.boot spring-boot-starter-parent 2.2.4.RELEASE org.springframework.boot spring-boot-starter-web org.springframework.boot spring-..

개발환경 Spring Boot 2.2.4 JDK 1.8.0_202 REST Postman : REST Client 목표 1. Spring Boot REST 환경 import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import javax.annotation.PostConstruct; import java.util.TimeZone; @SpringBootApplication public class Application { @PostConstruct void init() { TimeZone.setDefault(TimeZone.getTimeZone("U..