spring
-
Spring swagger 3.x openapi Authorization header 설정하기 예제 코드spring 2023. 2. 26. 22:03
@Bean public OpenAPI customOpenAPI() { OpenAPI openAPI = new OpenAPI(); openAPI.components(new Components() .addSecuritySchemes("Authorization", new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("bearer"))); return openAPI; } @Controller @SecurityRequirement(name = "Authorization") public class Controller { @GetMapping("/") public String getMain() { return ""; } } 이렇게 하면 Authorization: ..
-
Spring cache abstraction 에 대한 간단한 예제spring 2023. 2. 26. 15:42
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#io.caching Spring Boot Reference Documentation This section goes into more detail about how you should use Spring Boot. It covers topics such as build systems, auto-configuration, and how to run your applications. We also cover some Spring Boot best practices. Although there is nothing particularly spe docs.spring.io spring-bo..
-
-
Spring boot vs spring + tomcatspring 2023. 1. 1. 18:22
Tomcat 은 서블릿 컨테이너인데, HTTP request 를 받아서 멀티스레딩으로 처리해 주는 기능을 가지고있다. 스프링부트 어플리케이션을 그냥 켜보면, 이런 로그가 찍힌다. INFO o.s.b.w.e.tomcat.TomcatWebServer.start 204 - Tomcat started on port(s): 8080 (http) with context path '' 따로 설정해주지 않았는데 Tomcat 로그가 찍힌다. Spring 이란 무엇인가? 는 토비의 스프링에 이렇게 나온다. 스프링은 자바 엔터프라이즈 애플리케이션 개발에 사용되는 애플리케이션 프레임워크다. Spring boot 란 스프링 프로젝트 중 하나로, 설정을 편하게 하고 내장 WAS 를 포함해서 개발 편의성을 향상시킨 프로젝트이다. ..
-
Spring security authorization (servlet)spring 2022. 12. 14. 14:33
(세번째로 spring security 를 쓰고 있다. 첫번째는 소셜로그인, 두번째는 oauth api 풀링, 세번째는 mfa) Spring security 아키텍처는 앞의 필터들을 통해 Authentication 을 결정하고, 그 다음에 interceptor 에서 Authorization 을 결정한다. (Authentication 과 Authorization 이 무엇인지는 cs 를 공부해 보자.) https://docs.spring.io/spring-security/reference/servlet/authorization/architecture.html Authorization Architecture :: Spring Security It is a common requirement that a part..