Skip to content

Commit

Permalink
merge: (#539) 최신 의존성으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
alsdl0629 authored Feb 2, 2024
2 parents 647844a + 319d75b commit 5eb05c1
Show file tree
Hide file tree
Showing 101 changed files with 611 additions and 573 deletions.
16 changes: 10 additions & 6 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ object Dependencies {
const val JACKSON_TYPE = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${DependencyVersions.JACKSON_VERSION}"

// java servlet
const val JAVA_SERVLET = "javax.servlet:javax.servlet-api:${DependencyVersions.SERVLET_VERSION}"
const val JAVA_SERVLET = "jakarta.servlet:jakarta.servlet-api:${DependencyVersions.SERVLET_VERSION}"

// web
const val SPRING_WEB = "org.springframework.boot:spring-boot-starter-web"
Expand All @@ -19,7 +19,7 @@ object Dependencies {
const val SPRING_THYMELEAF = "org.springframework.boot:spring-boot-starter-thymeleaf"

// transaction
const val SPRING_TRANSACTION = "org.springframework:spring-tx:${DependencyVersions.SPRING_TRANSACTION}"
const val SPRING_TRANSACTION = "org.springframework:spring-tx:${DependencyVersions.SPRING_TRANSACTION_VERSION}"

// configuration
const val CONFIGURATION_PROCESSOR = "org.springframework.boot:spring-boot-configuration-processor"
Expand All @@ -31,17 +31,21 @@ object Dependencies {
const val REDIS = "org.springframework.data:spring-data-redis:${DependencyVersions.REDIS_VERSION}"

// querydsl
const val QUERYDSL = "com.querydsl:querydsl-jpa:${DependencyVersions.QUERYDSL}"
const val QUERYDSL_PROCESSOR = "com.querydsl:querydsl-apt:${DependencyVersions.QUERYDSL}:jpa"
const val QUERYDSL = "com.querydsl:querydsl-jpa:${DependencyVersions.QUERYDSL_VERSION}:jakarta"
const val QUERYDSL_PROCESSOR = "com.querydsl:querydsl-apt:${DependencyVersions.QUERYDSL_VERSION}:jakarta"
const val JAKARTA_ANNOTATION_PROCESSOR = "jakarta.annotation:jakarta.annotation-api:${DependencyVersions.JAKARTA_ANNOTATION_VERSION}"
const val JAKARTA_PERSISTENCE_PROCESSOR = "jakarta.persistence:jakarta.persistence-api:${DependencyVersions.JAKARTA_PERSISTENCE_VERSION}"

// security
const val SPRING_SECURITY = "org.springframework.boot:spring-boot-starter-security"

// jwt
const val JWT = "io.jsonwebtoken:jjwt:${DependencyVersions.JWT_VERSION}"
const val JWT = "io.jsonwebtoken:jjwt-api:${DependencyVersions.JWT_VERSION}"
const val JWT_IMPL = "io.jsonwebtoken:jjwt-impl:${DependencyVersions.JWT_VERSION}"
const val JWT_JACKSON = "io.jsonwebtoken:jjwt-jackson:${DependencyVersions.JWT_VERSION}"

// aws
const val SPRING_AWS = "org.springframework.cloud:spring-cloud-starter-aws:${DependencyVersions.AWS_VERSION}"
const val SPRING_AWS = "io.awspring.cloud:spring-cloud-starter-aws:${DependencyVersions.AWS_VERSION}"
const val AWS_SES = "com.amazonaws:aws-java-sdk-ses:${DependencyVersions.SES_VERSION}"

// test
Expand Down
14 changes: 8 additions & 6 deletions buildSrc/src/main/kotlin/DependencyVersions.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
object DependencyVersions {
const val JACKSON_VERSION = "2.10.3"
const val JWT_VERSION = "0.9.1"
const val AWS_VERSION = "2.2.6.RELEASE"
const val JACKSON_VERSION = "2.16.1"
const val JWT_VERSION = "0.11.5"
const val AWS_VERSION = "2.4.4"
const val SES_VERSION = "1.11.852"
const val REDIS_VERSION = "2.7.2"
const val SERVLET_VERSION = "4.0.1"
const val SERVLET_VERSION = "6.0.0"
const val UUID_TIME_VERSION = "3.1.4"
const val SPRING_TRANSACTION = "5.3.22"
const val QUERYDSL = "5.0.0"
const val SPRING_TRANSACTION_VERSION = "6.1.2"
const val QUERYDSL_VERSION = "5.0.0"
const val JAKARTA_ANNOTATION_VERSION = "2.1.1"
const val JAKARTA_PERSISTENCE_VERSION = "3.1.0"
const val MYSQL = "8.0.28"
const val APACHE_POI_VERSION = "3.7"
const val MOCKK_VERSION = "1.13.2"
Expand Down
16 changes: 8 additions & 8 deletions buildSrc/src/main/kotlin/PluginVersions.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
object PluginVersions {
const val SPRING_BOOT_VERSION = "2.7.1"
const val DEPENDENCY_MANAGER_VERSION = "1.0.11.RELEASE"
const val JVM_VERSION = "1.6.21"
const val SPRING_PLUGIN_VERSION = "1.6.21"
const val JPA_PLUGIN_VERSION = "1.6.21"
const val KAPT_VERSION = "1.7.10"
const val ALLOPEN_VERSION = "1.6.21"
const val SPRING_BOOT_VERSION = "3.2.2"
const val DEPENDENCY_MANAGER_VERSION = "1.1.4"
const val JVM_VERSION = "1.9.21"
const val SPRING_PLUGIN_VERSION = "1.9.21"
const val JPA_PLUGIN_VERSION = "1.9.21"
const val KAPT_VERSION = "1.8.21"
const val ALLOPEN_VERSION = "1.9.21"
const val MOCKK_VERSION = "1.13.2"
const val DETEKT_VERSION = "1.21.0"
const val DETEKT_VERSION = "1.23.4"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ enum class Topic(
topicGroup = TopicGroup.STUDY_ROOM,
title = "신청 시간 알림",
content = "자습실 신청 시간을 알리는 알림입니다."
);
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class NotificationServiceImpl(
private val notificationPort: NotificationPort,
private val queryUserPort: QueryUserPort,
private val commandTopicSubscriptionPort: CommandTopicSubscriptionPort,
private val notificationOfUserPort:
CommandNotificationOfUserPort,
private val notificationOfUserPort: CommandNotificationOfUserPort,
getNotificationService: GetNotificationService,
commandNotificationService: CommandNotificationService
) : NotificationService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ enum class PointType(
val korean: String
) {
BONUS("상점"),
MINUS("벌점");
MINUS("벌점")
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ApplySeatUseCase(
val seat = studyRoomService.getSeatById(seatId)
.apply { checkAvailable() }

val studyRoom = studyRoomService.getStudyRoom(seat.studyRoomId)
studyRoomService.getStudyRoom(seat.studyRoomId)
.apply {
checkIsAvailableGradeAndSex(student.grade, student.sex)
studyRoomService.checkStudyRoomApplicationTimeAvailable(schoolId)
Expand Down
9 changes: 2 additions & 7 deletions dms-infrastructure/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ dependencies {

// jwt
implementation(Dependencies.JWT)
runtimeOnly(Dependencies.JWT_IMPL)
runtimeOnly(Dependencies.JWT_JACKSON)

// aws
implementation(Dependencies.AWS_SES)
Expand Down Expand Up @@ -56,13 +58,6 @@ dependencies {
implementation(Dependencies.FCM)
}

kapt {
arguments {
arg("mapstruct.defaultComponentModel", "spring")
arg("mapstruct.unmappedTargetPolicy", "ignore")
}
}

tasks.getByName<Jar>("jar") {
enabled = false
}
2 changes: 1 addition & 1 deletion dms-infrastructure/config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ formatting:
active: true
autoCorrect: true
NoSemicolons:
active: true
active: false
autoCorrect: true
NoTrailingSpaces:
active: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package team.aliens.dms.global.error

import jakarta.validation.ConstraintViolation
import jakarta.validation.ConstraintViolationException
import org.springframework.validation.BindingResult
import org.springframework.validation.FieldError
import team.aliens.dms.common.error.ErrorProperty
import javax.validation.ConstraintViolation
import javax.validation.ConstraintViolationException

data class ErrorResponse(
val status: Int,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package team.aliens.dms.global.error

import jakarta.validation.ConstraintViolationException
import org.springframework.http.HttpStatus
import org.springframework.validation.BindException
import org.springframework.validation.BindingResult
import org.springframework.web.bind.MethodArgumentNotValidException
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.ResponseStatus
import org.springframework.web.bind.annotation.RestControllerAdvice
import javax.validation.ConstraintViolationException

@RestControllerAdvice
class GlobalErrorHandler {
Expand All @@ -18,9 +18,13 @@ class GlobalErrorHandler {

@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler(ConstraintViolationException::class)
protected fun handleConstraintViolationException(e: ConstraintViolationException): ValidationErrorResponse? = ErrorResponse.of(e)
protected fun handleConstraintViolationException(
e: ConstraintViolationException
): ValidationErrorResponse? = ErrorResponse.of(e)

@ResponseStatus(HttpStatus.BAD_REQUEST)
@ExceptionHandler(MethodArgumentNotValidException::class)
protected fun handleMethodArgumentNotViolationException(e: BindingResult): ValidationErrorResponse? = ErrorResponse.of(e)
protected fun handleMethodArgumentNotViolationException(
e: BindingResult
): ValidationErrorResponse? = ErrorResponse.of(e)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ package team.aliens.dms.global.filter

import com.fasterxml.jackson.databind.ObjectMapper
import io.sentry.Sentry
import jakarta.servlet.FilterChain
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.springframework.http.MediaType
import org.springframework.web.filter.OncePerRequestFilter
import team.aliens.dms.common.error.DmsException
import team.aliens.dms.common.error.ErrorProperty
import team.aliens.dms.global.error.ErrorResponse
import team.aliens.dms.global.error.GlobalErrorCode
import java.nio.charset.StandardCharsets
import javax.servlet.FilterChain
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

class ExceptionFilter(
private val objectMapper: ObjectMapper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package team.aliens.dms.global.filter

import com.fasterxml.jackson.databind.ObjectMapper
import org.springframework.security.config.annotation.SecurityConfigurerAdapter
import org.springframework.security.config.annotation.SecurityConfigurer
import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.web.DefaultSecurityFilterChain
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
Expand All @@ -12,7 +12,8 @@ import team.aliens.dms.global.security.token.JwtParser
class FilterConfig(
private val jwtParser: JwtParser,
private val objectMapper: ObjectMapper
) : SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity>() {
) : SecurityConfigurer<DefaultSecurityFilterChain, HttpSecurity> {
override fun init(builder: HttpSecurity?) {}

override fun configure(builder: HttpSecurity) {
builder.addFilterBefore(JwtFilter(jwtParser), UsernamePasswordAuthenticationFilter::class.java)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package team.aliens.dms.global.filter

import jakarta.servlet.FilterChain
import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.springframework.security.core.context.SecurityContextHolder
import org.springframework.web.filter.OncePerRequestFilter
import team.aliens.dms.global.security.token.JwtParser
import team.aliens.dms.global.security.token.JwtProperties
import javax.servlet.FilterChain
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

class JwtFilter(
private val jwtParser: JwtParser
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package team.aliens.dms.global.security

import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.springframework.security.access.AccessDeniedException
import org.springframework.security.web.access.AccessDeniedHandler
import org.springframework.stereotype.Component
import team.aliens.dms.global.security.exception.InvalidRoleException
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

@Component
class CustomAccessDeniedHandler : AccessDeniedHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package team.aliens.dms.global.security

import jakarta.servlet.http.HttpServletRequest
import jakarta.servlet.http.HttpServletResponse
import org.springframework.security.core.AuthenticationException
import org.springframework.security.web.AuthenticationEntryPoint
import org.springframework.stereotype.Component
import team.aliens.dms.global.security.exception.ForbiddenException
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

@Component
class CustomAuthenticationEntryPoint : AuthenticationEntryPoint {
Expand Down
Loading

0 comments on commit 5eb05c1

Please sign in to comment.