diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index b8c182a73..4cd81d9b8 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -85,6 +85,4 @@ object Dependencies { // slack const val SLACK = "com.slack.api:slack-api-client:${DependencyVersions.SLACK_VERSION}" - - const val CACHE = "org.springframework.boot:spring-boot-starter-cache" } \ No newline at end of file diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/outing/spi/vo/OutingApplicationVO.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/outing/spi/vo/OutingApplicationVO.kt index 49895bde2..0912b5325 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/outing/spi/vo/OutingApplicationVO.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/outing/spi/vo/OutingApplicationVO.kt @@ -9,7 +9,7 @@ open class OutingApplicationVO( val studentGrade: Int, val studentClassRoom: Int, val studentNumber: Int, - val reason: String, + val reason: String?, val outingType: String, val outingDate: LocalDate, val outingTime: LocalTime, diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/student/dto/StudentResponse.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/student/dto/StudentResponse.kt index 0cdde9a56..43167b2e6 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/student/dto/StudentResponse.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/student/dto/StudentResponse.kt @@ -1,8 +1,5 @@ package team.aliens.dms.domain.student.dto -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonIgnoreProperties -import com.fasterxml.jackson.annotation.JsonProperty import team.aliens.dms.domain.manager.spi.vo.StudentWithTag import team.aliens.dms.domain.student.model.Sex import team.aliens.dms.domain.student.model.Student @@ -49,17 +46,17 @@ data class StudentNameResponse( val name: String ) -data class StudentDetailsResponse @JsonCreator constructor( - @JsonProperty("id") val id: UUID, - @JsonProperty("name") val name: String, - @JsonProperty("gcn") val gcn: String, - @JsonProperty("profileImageUrl") val profileImageUrl: String, - @JsonProperty("sex") val sex: Sex? = null, - @JsonProperty("bonusPoint") val bonusPoint: Int? = null, - @JsonProperty("minusPoint") val minusPoint: Int? = null, - @JsonProperty("roomNumber") val roomNumber: String? = null, - @JsonProperty("roomMates") val roomMates: List? = null, - @JsonProperty("tags") val tags: List? = null +data class StudentDetailsResponse( + val id: UUID, + val name: String, + val gcn: String, + val profileImageUrl: String, + val sex: Sex? = null, + val bonusPoint: Int? = null, + val minusPoint: Int? = null, + val roomNumber: String? = null, + val roomMates: List? = null, + val tags: List? = null ) { data class RoomMate( val id: UUID, diff --git a/dms-core/src/main/kotlin/team/aliens/dms/domain/tag/dto/TagResponse.kt b/dms-core/src/main/kotlin/team/aliens/dms/domain/tag/dto/TagResponse.kt index 12f19d5bb..829ff7cd9 100644 --- a/dms-core/src/main/kotlin/team/aliens/dms/domain/tag/dto/TagResponse.kt +++ b/dms-core/src/main/kotlin/team/aliens/dms/domain/tag/dto/TagResponse.kt @@ -3,6 +3,7 @@ package team.aliens.dms.domain.tag.dto import team.aliens.dms.domain.tag.model.Tag import java.util.UUID + data class TagResponse( val id: UUID, val name: String?, diff --git a/dms-infrastructure/build.gradle.kts b/dms-infrastructure/build.gradle.kts index 51d9cba50..d35e27a98 100644 --- a/dms-infrastructure/build.gradle.kts +++ b/dms-infrastructure/build.gradle.kts @@ -60,8 +60,6 @@ dependencies { // notification implementation(Dependencies.FCM) - //cache - implementation(Dependencies.CACHE) } tasks.getByName("jar") { diff --git a/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/ExcelAdapter.kt b/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/ExcelAdapter.kt index 00d49264a..1bde11e64 100644 --- a/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/ExcelAdapter.kt +++ b/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/ExcelAdapter.kt @@ -255,7 +255,7 @@ class ExcelAdapter : ParseFilePort, WriteFilePort, ExcelPort() { listOf( outingApplication.studentGcn, outingApplication.studentName, - outingApplication.reason, + outingApplication.reason ?: "", outingApplication.outingTime.toString(), outingApplication.arrivalTime.toString(), null, diff --git a/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/port/ExcelPort.kt b/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/port/ExcelPort.kt index 05b701b0c..13151614d 100644 --- a/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/port/ExcelPort.kt +++ b/dms-infrastructure/src/main/kotlin/team/aliens/dms/thirdparty/parser/port/ExcelPort.kt @@ -139,7 +139,7 @@ open class ExcelPort { .map { autoSizeColumn(it) val width = getColumnWidth(it) - setColumnWidth(it, ((width * 1.3) - 50).toInt()) + setColumnWidth(it, ((width * 1.3) + 120).toInt()) } } } diff --git a/dms-infrastructure/src/main/resources/application-local.yml b/dms-infrastructure/src/main/resources/application-local.yml index 3b226bef2..e19b651cc 100644 --- a/dms-infrastructure/src/main/resources/application-local.yml +++ b/dms-infrastructure/src/main/resources/application-local.yml @@ -12,4 +12,4 @@ spring: redis: host: ${REDIS_HOST:localhost} port: ${REDIS_PORT:6379} - password: ${REDIS_PASSWORD:1234} \ No newline at end of file + password: ${REDIS_PASSWORD:asdf} \ No newline at end of file diff --git a/dms-persistence/src/main/kotlin/team/aliens/dms/global/config/CacheConfig.kt b/dms-persistence/src/main/kotlin/team/aliens/dms/global/config/CacheConfig.kt deleted file mode 100644 index c120cb843..000000000 --- a/dms-persistence/src/main/kotlin/team/aliens/dms/global/config/CacheConfig.kt +++ /dev/null @@ -1,46 +0,0 @@ -package team.aliens.dms.global.config - -import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer -import org.springframework.cache.CacheManager -import org.springframework.cache.annotation.EnableCaching -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.data.redis.cache.RedisCacheConfiguration -import org.springframework.data.redis.cache.RedisCacheManager -import org.springframework.data.redis.connection.RedisConnectionFactory -import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer -import org.springframework.data.redis.serializer.RedisSerializationContext -import org.springframework.data.redis.serializer.StringRedisSerializer -import java.time.Duration - -@Configuration -@EnableCaching -class CacheConfig { - @Bean - fun cacheManager(redisConnectionFactory: RedisConnectionFactory): CacheManager { - val redisCacheConfiguration: RedisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig() - .entryTtl(Duration.ofMinutes(30)) - .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(StringRedisSerializer())) - .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(GenericJackson2JsonRedisSerializer())) - - return RedisCacheManager.RedisCacheManagerBuilder - .fromConnectionFactory(redisConnectionFactory) - .cacheDefaults(redisCacheConfiguration) - .build() - } - - // 캐시를 구분하기 위해 존재함 - @Bean - fun redisCacheManagerBuilderCustomizer(): RedisCacheManagerBuilderCustomizer { - return RedisCacheManagerBuilderCustomizer { builder: RedisCacheManager.RedisCacheManagerBuilder -> - builder - .withCacheConfiguration( - "student", - RedisCacheConfiguration.defaultCacheConfig() - .entryTtl(Duration.ofMinutes(10)) - .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(StringRedisSerializer())) - .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(GenericJackson2JsonRedisSerializer())) - ) - } - } -} diff --git a/dms-persistence/src/main/kotlin/team/aliens/dms/global/config/CustomKeyGenerator.kt b/dms-persistence/src/main/kotlin/team/aliens/dms/global/config/CustomKeyGenerator.kt deleted file mode 100644 index 30264b212..000000000 --- a/dms-persistence/src/main/kotlin/team/aliens/dms/global/config/CustomKeyGenerator.kt +++ /dev/null @@ -1,21 +0,0 @@ -package team.aliens.dms.global.config - -import org.springframework.cache.interceptor.KeyGenerator -import org.springframework.cache.interceptor.SimpleKeyGenerator -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import java.lang.reflect.Method - -@Configuration -class CustomKeyGenerator : KeyGenerator { - - // 메서드 명을 사용해 key를 만들어준다. - override fun generate(target: Any, method: Method, vararg params: Any): Any { - return method.name + SimpleKeyGenerator.generateKey(*params) - } - - @Bean - fun keyGenerator(): KeyGenerator { - return CustomKeyGenerator() - } -} diff --git a/dms-presentation/src/main/kotlin/team/aliens/dms/domain/student/StudentWebAdapter.kt b/dms-presentation/src/main/kotlin/team/aliens/dms/domain/student/StudentWebAdapter.kt index 293b45b41..14a123e2a 100644 --- a/dms-presentation/src/main/kotlin/team/aliens/dms/domain/student/StudentWebAdapter.kt +++ b/dms-presentation/src/main/kotlin/team/aliens/dms/domain/student/StudentWebAdapter.kt @@ -5,9 +5,6 @@ import jakarta.validation.Valid import jakarta.validation.constraints.Email import jakarta.validation.constraints.NotBlank import jakarta.validation.constraints.NotNull -import org.springframework.cache.annotation.CacheConfig -import org.springframework.cache.annotation.CacheEvict -import org.springframework.cache.annotation.Cacheable import org.springframework.http.HttpStatus import org.springframework.validation.annotation.Validated import org.springframework.web.bind.annotation.DeleteMapping