Skip to content

Commit

Permalink
feature : health check api (#505)
Browse files Browse the repository at this point in the history
* feat : health api

* feat : security config permitall  health api

* docs : 코드 커버리지 추가
  • Loading branch information
ImNM authored Mar 1, 2023
1 parent c980716 commit 62e8fa3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.permitAll()
.mvcMatchers(HttpMethod.GET, "/v1/events/search")
.permitAll()
.mvcMatchers(HttpMethod.GET, "/v1/examples/health")
.permitAll()
.mvcMatchers(HttpMethod.POST, "/v1/coupons/campaigns")
.hasRole("SUPER_ADMIN")
// 인증 이필요한 모든 요청은 USER 권한을 최소한 가지고있어야한다.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import band.gosrock.common.annotation.ApiErrorCodeExample;
import band.gosrock.common.annotation.ApiErrorExceptionsExample;
import band.gosrock.common.annotation.DevelopOnlyApi;
import band.gosrock.common.annotation.DisableSwaggerSecurity;
import band.gosrock.common.exception.GlobalErrorCode;
import band.gosrock.domain.domains.cart.exception.CartErrorCode;
import band.gosrock.domain.domains.coupon.exception.CouponErrorCode;
Expand Down Expand Up @@ -47,6 +48,10 @@ public ExampleResponse get() {
return exampleApiService.getExample();
}

@GetMapping("/health")
@DisableSwaggerSecurity
public void health() {}

@PostMapping
@ApiErrorExceptionsExample(ExampleException2Docs.class)
public ExampleResponse create() {
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

![Frame 4](https://user-images.githubusercontent.com/55226431/221772740-e9946fda-a24c-4b90-8871-4d1d8a340725.png)


<br/><br/>
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Gosrock_DuDoong-Backend&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Gosrock_DuDoong-Backend)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Gosrock_DuDoong-Backend&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Gosrock_DuDoong-Backend)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Gosrock_DuDoong-Backend&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=Gosrock_DuDoong-Backend)
<br/>

# 두둥<img src="https://user-images.githubusercontent.com/55226431/221770112-27710500-f49a-4c7b-8765-8b3698566e55.png" align=left width=100>

Expand Down

0 comments on commit 62e8fa3

Please sign in to comment.