Skip to content

Commit

Permalink
Merge pull request #52 from SWM-M3PRO/develop
Browse files Browse the repository at this point in the history
Feat : health check 용 api 추가
  • Loading branch information
qjvk2880 authored Jul 30, 2024
2 parents b6213d2 + 9413fa8 commit 20e7a60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ protected SecurityFilterChain configure(HttpSecurity httpSecurity) throws Except
.requestMatchers("/v3/api-docs/**").permitAll()
.requestMatchers("/api/swagger-ui/**").permitAll()
.requestMatchers("/api/docs/**").permitAll()
.requestMatchers("/check").permitAll()
.anyRequest().hasRole("USER"));

httpSecurity.addFilterBefore(jwtAuthorizationFilter, UsernamePasswordAuthenticationFilter.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
@RestController
public class TestController {

@GetMapping("/")
@ResponseStatus(HttpStatus.ACCEPTED)
@GetMapping("/check")
@ResponseStatus(HttpStatus.OK)
public Response<String> test() {
return Response.createSuccess("hello");
return Response.createSuccess("success");
}

@GetMapping("/exception")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public class JwtAuthorizationFilter extends OncePerRequestFilter {
"/api/auth",
"/api/docs",
"/v3/api-docs",
"/api/swagger-ui");
"/api/swagger-ui",
"/check"
);
private static final List<String> WHITE_LIST_TMP = List.of(
"/api",
"/api/docs",
Expand Down

0 comments on commit 20e7a60

Please sign in to comment.