전체 글 30

[SpringBoot] 오라클 데이터베이스 연동하기!

# OracleXE, hikariCP, MyBatis 연동하기 기존코드 그대로 사용하면 좋겠지만, document나 example code 찾아보면서 하나하나 맞춘 코드.(힘들었음,,,ㅠ) Spring Boot 2.7.5 버전에서 OracleXE(11g) 연동 및 hikariCP, MyBatis 연동. # 환경 tool : STS 4.13.0 ver : 2.7.5 [GA] java : 11 repo : MAVEN DB : ORACLE XE (11g) type : server # 참고 페이지 블로그 글 안보고 아래 있는 참조 페이지가서 연동하는게 제일 좋을 수도,, 제 블로그 글은 허점이 있을 수도 있어요,,, oracle example code: https://www.baeldung.com/spring-..

데이터베이스 2023.01.15

[SpringBoot] OpenAPI 3.0 추가 구성 해보기! (swagger-ui)

# OpenAPI 3.0 example code - 3 (swagger-ui) https://hjho95.tistory.com/39 는 OpenAPI를 사용하기 위한 설정. https://hjho95.tistory.com/40 은 Annotation을 이용한 Document작성. https://hjho95.tistory.com/41 은 ApiResponse의 ref 구현. 이번에 쓸 내용은 @ApiResponse에 ref 는 뭔가 찾아보고,, 확인하고,,, 설정하고,,,근데 그냥 내가 해봄.. 구현한 내용이 올바르지 않은 구현 일수 있음... 도큐먼트를 찾아봐도 쉽게 설정할수 있는 샘플코드가 없으니 뭐ㅏ,,ㅠ # Refference document: https://springdoc.org example-..

스프링 부트 2023.01.15

[SpringBoot] OpenAPI 3.0 구성하기! (swagger-ui)

# OpenAPI 3.0 example code - 2 (swagger-ui) 이전 설정인 https://hjho95.tistory.com/39 에서 OpenAPI에 대한 pom.xml, application.yml, Configuration을 작성하여 기동해보는 걸 해보았다. 이번에는 Document 내에 들어가는 해당 API의 설명, 정의 등 작성해보는 시간이다. https://hjho95.tistory.com/39 는 OpenAPI를 사용하기 위한 설정. https://hjho95.tistory.com/40 은 Annotation을 이용한 Document작성. https://hjho95.tistory.com/41 은 ApiResponse의 ref 구현. # Refference document: ht..

스프링 부트 2023.01.14

[SpringBoot] OpenAPI 3.0 설정하기! (swagger-ui)

# OpenAPI 3.0 example code (swagger-ui) swagger가 3.0으로 업데이트 되면서 명칭도 바뀌고 어노테이션도 바뀌었다. 그래서 한번 해보는 OpenAPI 3.0 설정하기! https://hjho95.tistory.com/39 는 OpenAPI를 사용하기 위한 설정. https://hjho95.tistory.com/40 은 Annotation을 이용한 Document작성. https://hjho95.tistory.com/41 은 ApiResponse의 ref 구현. Unable to render this definition Error 해결 맨 밑에 있음. # Refference document: https://springdoc.org example-ui: http://158..

스프링 부트 2023.01.14

[SpringBoot] RestTemplate 구성하기!

# RestTemplate - @Configuration 스프링 부트에서 사용하는 RestTemplate 설정 예제 코드 입니다. # 환경 Tool : STS 4.13.0 Ver : 2.7.5 [GA] JDK : 11 Repo : MAVEN DB : ORACLE XE (11g) View : Thymeleaf jQuery: 3.6.0 # Configuration @Configuration public class RestTemplateConfig { private final int TIMEOUT = 10 * 1000; private final int MAX_CONN_TOTAL_VALUE = 30; private final int MAX_CONN_PER_ROUTE_VALUE = 5; @Bean(name = "..

스프링 부트 2022.11.27

[SpringBoot] RestTemplate - exchange (POST, PUT, DELETE) 로 통신하기!

# RestTemplate - exchange (POST, PUT, DELETE) RestTemplate에서 HttpMethod와 관계없이 전체적으로 사용할 수 있는 exchange 를 사용하여 POST, PUT, DELETE 요청하기! [통신 프로세스] View ↔ [ ajax ] ↔ Controller ↔ [ RestTemplate ] ↔ RestController ↔ Service ↔ Mapper ↔ DataBase 1. exchange POST 통신, ContentType: application/x-www-form-urlencoded 2. exchange PUT 통신 3. exchange DELETE 통신 # 환경 Tool : STS 4.13.0 Ver : 2.7.5 [GA] java : 11 R..

스프링 부트 2022.11.19

[SpringBoot] RestTemplate - getForObject, postForObject 로 통신하기!

# RestTemplate - getForObject, postForObject RestTemplate의 가장 기본적인 getForObject와 postForObject 예제 코드 입니다! 통신 프로세스 View ↔ [ ajax ] ↔ Controller ↔ [ RestTemplate ] ↔ RestController ↔ Service ↔ Mapper ↔ DataBase 1. getForObject 통신 2. postForObject 통신, ContentType: application/json 3. postForObject 통신, ContentType: application/x-www-form-urlencoded # 환경 Tool : STS 4.13.0 Ver : 2.7.5 [GA] java : 11 R..

스프링 부트 2022.11.19

[SpringBoot] 스프링 부트 프로젝트 생성하기

# [SpringBoot] 스프링 부트 프로젝트 생성하기 sts tool 4.13 버전에서 spring boot 2.7.5 버전으로 서버 프로젝트 생성하기..! # 환경 tool : STS 4.13.0 ver : 2.7.5 [GA] java : 11 repo : MAVEN DB : ORACLE XE (11g) type : server # 준비물(?) STS 4.13 버전 (꼭 아니여도 됨..) https://spring.io/tools Spring Tools 4 is the next generation of Spring tooling Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-..

스프링 부트 2022.11.06

[SpringBoot] 필터를 이용하여 요청 로그 남기기! (CommonsRequestLoggingFilter)

# [SpringBoot] CommonsRequestLoggingFilter example code 스프링 부트의 CommonsRequestLoggingFilter 를 이용하여 client, header, querystring, payload 로그 남기기 # 환경 tool : STS 4.13.0 ver : 2.7.3-SNAPSHOT java : 11 repo : MAVEN view : THYMELEAF jQuery: 3.6.0 # Filter public class CommonLoggingFilter extends CommonsRequestLoggingFilter { @Override protected void doFilterInternal(HttpServletRequest request, HttpSer..

스프링 부트 2022.10.22

[SpringBoot] Encrypt - SHA256(with salt) MessageDigest example code

# Encrypt - SHA256(with salt) MessageDigest example code 스프링 부트로 작성해보는 MessageDigest 를 이용한 sha-256 암호화 (+ salt) example code # 참조 sha-256: http://wiki.hash.kr/index.php/SHA256#cite_note-8 SHA-256 SHA(Secure Hash Algorithm) 알고리즘의 한 종류로서 256비트로 구성되며 64자리 문자열을 반환한다. SHA-256은 미국의 국립표준기술연구소 (NIST; National Institute of Standards and Technology)에 의해 공표된 표준 해시 알고리즘인 SHA-2 계열 중 하나이며 블록체인에서 가장 많이 채택하여 사용..

스프링 부트 2022.10.03