Skip to content

Commit

Permalink
fix : for nickname duplicate check
Browse files Browse the repository at this point in the history
  • Loading branch information
seungueonn committed Nov 1, 2023
1 parent f26c038 commit 76fd3fe
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 14 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:3.1.4'

implementation 'org.springframework.boot:spring-boot-starter-data-redis'



//
// implementation 'org.springdoc:springdoc-openapi-ui:1.6.11'
// implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'
// implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2'


}
Expand Down
18 changes: 18 additions & 0 deletions build/resources/main/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ spring:
console:
enabled: true

# main:
# allow-bean-definition-overriding: true



datasource:
Expand Down Expand Up @@ -87,3 +90,18 @@ jwt:
reissue-token-period: 2592000000000 # 3일 (3일 * 24시간 * 60분 * 60초 * 1000밀리초)


#springdoc:
# default-consumes-media-type: application/json
# default-produces-media-type: application/json
# api-docs:
# groups:
# enabled: true
# swagger-ui:
# operations-sorter: alpha # alpha(알파벳 오름차순), method(HTTP메소드순)
# tags-sorter: alpha # 태그 정렬 기준
# path: /member/swagger-ui.html # html 문서 접속 경로
# disable-swagger-default-url: true
## display-query-params-without-oauth2: true
# doc-expansion: none # tag, operation 펼치는 방식
# paths-to-match:
# - /**
Binary file modified build/tmp/compileJava/previous-compilation-data.bin
Binary file not shown.
19 changes: 8 additions & 11 deletions src/main/java/gwangjang/server/global/security/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,15 @@
@RequiredArgsConstructor
public class SecurityConfig {

private final UserDetailsService userDetailsService;
private final PasswordEncoder bCryptPasswordEncoder;

private final MemberGetService memberQueryService;
private final TokenUtil tokenUtil;

@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return (web) -> web.ignoring()
.requestMatchers(new AntPathRequestMatcher("/h2-console/**"))
.requestMatchers(new AntPathRequestMatcher( "/favicon.ico"))
.requestMatchers(new AntPathRequestMatcher( "/css/**"))
.requestMatchers(new AntPathRequestMatcher( "/js/**"))
.requestMatchers(new AntPathRequestMatcher( "/img/**"))
.requestMatchers(new AntPathRequestMatcher( "/lib/**"));
}
.requestMatchers("/resource/**", "/css/**", "/js/**", "/img/**", "/lib/**");
};
// .requestMatchers(new AntPathRequestMatcher( "/**/*.html"));


@Bean
Expand All @@ -64,7 +57,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.authorizeHttpRequests(
authorize -> authorize
.requestMatchers("/auth/**").permitAll()
.requestMatchers("/admin/**").hasRole("ADMIN")
// .requestMatchers("/swagger-ui/index.html").permitAll()
// .requestMatchers("/admin/**").hasRole("ADMIN")
// .requestMatchers("/swagger-ui/**").permitAll()
// .requestMatchers("/swagger-resources/**").permitAll()
// .requestMatchers("/swagger-ui.html").permitAll()
.anyRequest().authenticated()
);

Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ spring:
console:
enabled: true

# main:
# allow-bean-definition-overriding: true



datasource:
Expand Down Expand Up @@ -87,3 +90,18 @@ jwt:
reissue-token-period: 2592000000000 # 3일 (3일 * 24시간 * 60분 * 60초 * 1000밀리초)


#springdoc:
# default-consumes-media-type: application/json
# default-produces-media-type: application/json
# api-docs:
# groups:
# enabled: true
# swagger-ui:
# operations-sorter: alpha # alpha(알파벳 오름차순), method(HTTP메소드순)
# tags-sorter: alpha # 태그 정렬 기준
# path: /member/swagger-ui.html # html 문서 접속 경로
# disable-swagger-default-url: true
## display-query-params-without-oauth2: true
# doc-expansion: none # tag, operation 펼치는 방식
# paths-to-match:
# - /**

0 comments on commit 76fd3fe

Please sign in to comment.