Skip to content

Commit

Permalink
chore : 잠깐 테스트한 파일 주석 해제 #45
Browse files Browse the repository at this point in the history
  • Loading branch information
strangehoon committed Mar 30, 2024
1 parent 62aee36 commit 5ef30e0
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 31 deletions.
58 changes: 29 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.4'
id "org.asciidoctor.jvm.convert" version "3.3.2"
//id 'jacoco'
id 'jacoco'
}

group = 'com'
Expand All @@ -13,9 +13,9 @@ java {
sourceCompatibility = '17'
}

//jacoco {
// toolVersion = "0.8.8"
//}
jacoco {
toolVersion = "0.8.8"
}

configurations {
compileOnly {
Expand Down Expand Up @@ -81,31 +81,31 @@ dependencies {

tasks.named('test') {
useJUnitPlatform()
// finalizedBy 'jacocoTestReport'
//}
//
//jacocoTestReport {
// reports {
// // html로 report 생성하기
// // 빌드경로/jacoco/report.html 폴더 내부로 경로 설정
// html.destination file("$buildDir/jacoco/report.html")
// }
//
// afterEvaluate {
// classDirectories.setFrom(
// files(classDirectories.files.collect {
// fileTree(dir: it, excludes: [
// '**/*Application*',
// '**/*Exception*',
// '**/dto/**',
// '**/global/**',
// '**/domain/healthCheck/**'
// ])
// })
// )
// }
//
//// finalizedBy 'jacocoTestCoverageVerification'
finalizedBy 'jacocoTestReport'
}

jacocoTestReport {
reports {
// html로 report 생성하기
// 빌드경로/jacoco/report.html 폴더 내부로 경로 설정
html.destination file("$buildDir/jacoco/report.html")
}

afterEvaluate {
classDirectories.setFrom(
files(classDirectories.files.collect {
fileTree(dir: it, excludes: [
'**/*Application*',
'**/*Exception*',
'**/dto/**',
'**/global/**',
'**/domain/healthCheck/**'
])
})
)
}

// finalizedBy 'jacocoTestCoverageVerification'

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
.requestMatchers(PERMITTED_URLS).permitAll()
.anyRequest().authenticated()
)
//.addFilterBefore(new JwtAuthenticationFilter(jwtProvider), UsernamePasswordAuthenticationFilter.class)
//.addFilterBefore(jwtExceptionFilter, JwtAuthenticationFilter.class)
.addFilterBefore(new JwtAuthenticationFilter(jwtProvider), UsernamePasswordAuthenticationFilter.class)
.addFilterBefore(jwtExceptionFilter, JwtAuthenticationFilter.class)
.cors(cors -> cors.configurationSource(corsConfigurationSource()))

.build();
Expand Down
32 changes: 32 additions & 0 deletions src/main/resources/templates/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<springProperty name="SLACK_WEBHOOK_URI" source="logging.slack.webhook-uri"/>
<appender name="SLACK" class="com.github.maricn.logback.SlackAppender">
<webhookUri>${SLACK_WEBHOOK_URI}</webhookUri>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %msg %n</pattern>
</layout>
<username>SendBack-Server-log</username>
<iconEmoji>:stuck_out_tongue_winking_eye:</iconEmoji>
<colorCoding>true</colorCoding>
</appender>

<!-- Consol appender 설정 -->
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<Pattern>%d %-5level %logger{35} - %msg%n</Pattern>
</encoder>
</appender>

<appender name="ASYNC_SLACK" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="SLACK"/>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>

<root level="INFO">
<appender-ref ref="Console" />
<appender-ref ref="ASYNC_SLACK"/>
</root>
</configuration>

0 comments on commit 5ef30e0

Please sign in to comment.