Skip to content

Commit

Permalink
feat: swagger 적용 완료 #20
Browse files Browse the repository at this point in the history
  • Loading branch information
heokyeongju committed Nov 8, 2022
1 parent 993bb75 commit 4ccc660
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 4Week_Mission/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ dependencies {
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// swagger
implementation 'io.springfox:springfox-boot-starter:3.0.0'
implementation 'io.springfox:springfox-swagger-ui:3.0.0'
implementation 'org.springdoc:springdoc-openapi-ui:1.6.12'
}

tasks.named('test') {
Expand All @@ -84,4 +83,4 @@ configurations {

compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

@Configuration
@OpenAPIDefinition(info = @Info(title = "MBOOKS API", version = "v1"))
Expand All @@ -15,4 +17,9 @@
scheme = "bearer"
)
public class SpringDocConfig {
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/swagger-ui/**").permitAll()
.anyRequest().authenticated();
}
}

0 comments on commit 4ccc660

Please sign in to comment.