์ต์ ๋ฒ์ ํ์ธ์ ์ํ ๊ณต์๋ฌธ์ ๋งํฌ
implementation "org.springdoc:springdoc-openapi-ui:1.7.0"
// spring-boot-starter-data-rest ์ฌ์ฉ์ ์ถ๊ฐ
implementation "org.springdoc:springdoc-openapi-data-rest:1.7.0"
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.7.0</version>
</dependency>
<!-- spring-boot-starter-data-rest ์ฌ์ฉ์ ์ถ๊ฐ -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-data-rest</artifactId>
<version>1.7.0</version>
</dependency>
์ํ๋ฆฌํฐ ์ธ์ฆ ํ์ง ์์ ๋ฆฌ์์ค ๋ฑ๋ก
httpSecurity
.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll()
.mvcMatchers(
"/v3/api-docs/**",
"/swagger-ui/**",
"/swagger-ui.html"
).permitAll()
์ต์ ๋ฒ์ ํ์ธ์ ์ํ ๊ณต์๋ฌธ์ ๋งํฌ
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0"
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.1.0</version>
</dependency>
์ํ๋ฆฌํฐ ์ธ์ฆ ํ์ง ์์ ๋ฆฌ์์ค ๋ฑ๋ก
httpSecurity
.authorizeHttpRequests(
auth -> auth
.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll()
.requestMatchers(
"/v3/api-docs/**",
"/swagger-ui/**",
"/swagger-ui.html"
).permitAll()
)
http://localhost:8080/swagger-ui/index.html
http://localhost:8080/v3/api-docs