Skip to content

Commit

Permalink
Feat: actuator 및 zipkin 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
haeyonghahn committed Feb 7, 2024
1 parent bd2aedd commit df70107
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ dependencies {
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
implementation 'io.jsonwebtoken:jjwt-jackson:0.11.5'
// actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// zipkin
implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.8.RELEASE'
// sleuth
implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.mockito:mockito-core:3.+'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public SecurityFilterChain httpSecurity(HttpSecurity http) throws Exception {
.authorizeHttpRequests(
(authorizeRequests) ->
authorizeRequests
.antMatchers("/actuator/**")
.permitAll()
.antMatchers("/oauth/**")
.permitAll()
.antMatchers("/api/v1/oauth/**")
Expand Down
10 changes: 10 additions & 0 deletions src/main/resources/application-actuator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
management:
server:
port: 9292
endpoint:
shutdown:
enabled: true
endpoints:
web:
exposure:
include: "*"
12 changes: 12 additions & 0 deletions src/main/resources/application-oauth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jwt:
issuer: yong7317
secret-key: ${JWT_SECRET_KEY}
expiry-seconds:
access-token: 100000
refresh-token: 604800

oauth:
kakao:
client-id: ${KAKAO_CLIENT_ID}
client-secret: ${KAKAO_CLIENT_SECRET}
redirect-url: ${KAKAO_REDIRECT_URI}
25 changes: 11 additions & 14 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ server:
spring:
config:
import: optional:file:.env[.properties]
profiles:
include:
- actuator
- oauth
servlet:
multipart:
max-file-size: 5GB
max-request-size: 5GB
zipkin:
base-url: http://127.0.0.1:9411
enabled: true
sleuth:
sampler:
probability: 1.0

# database 설정
datasource:
Expand Down Expand Up @@ -35,17 +45,4 @@ spring:
logging:
level:
org.hibernate.SQL: debug
org.hibernate.type: trace

jwt:
issuer: yong7317
secret-key: ${JWT_SECRET_KEY}
expiry-seconds:
access-token: 100000
refresh-token: 604800

oauth:
kakao:
client-id: ${KAKAO_CLIENT_ID}
client-secret: ${KAKAO_CLIENT_SECRET}
redirect-url: ${KAKAO_REDIRECT_URI}
org.hibernate.type: trace
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ class GoodingApplicationTest extends IntegrationTest {

@Test
void contextLoads() {
Assertions.assertEquals(1, 1);
}
}

0 comments on commit df70107

Please sign in to comment.