Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8월 6주차 회고 #436

Closed
veluxer62 opened this issue Aug 24, 2020 · 13 comments · Fixed by #445
Closed

8월 6주차 회고 #436

veluxer62 opened this issue Aug 24, 2020 · 13 comments · Fixed by #445
Labels
Retrospective write retrospective

Comments

@veluxer62
Copy link
Owner

No description provided.

@veluxer62 veluxer62 added the Retrospective write retrospective label Aug 24, 2020
@veluxer62
Copy link
Owner Author

Java Currency

https://namocom.tistory.com/667

@veluxer62
Copy link
Owner Author

kotlin 1.4 업그레이드 시 klint 이슈

kotlin convention을 위해

https://github.com/JLLeitschuh/ktlint-gradle

를 사용중인데 kotlin 1.4로 업그레이드 하니 오류가 발생함.

해결방법

gradle에 아래 코드 추가하면됨

ktlint {
    version.set("0.38.1")
}

JLLeitschuh/ktlint-gradle#383

@veluxer62 veluxer62 changed the title 8월 5주차 회고 8월 6주차 회고 Aug 31, 2020
@veluxer62
Copy link
Owner Author

쿠버네틱스 공부

@veluxer62
Copy link
Owner Author

veluxer62 commented Aug 31, 2020

kotlin sealed class

https://beomseok95.tistory.com/224

@veluxer62
Copy link
Owner Author

크론탭 표현식

https://zamezzz.tistory.com/197

@veluxer62
Copy link
Owner Author

ApplicationEventPublisher 는 MockBean이 동작하지 않음

spring-projects/spring-boot#6060

그래서 spy를 사용해야 한다. 아래 예제 코드 확인

@SpringBootTest(classes = [PackEventPublisher::class])
@ContextConfiguration(classes = [PackEventPublisherTest.TestConfig::class])
class PackEventPublisherTest : FreeSpec() {

    override fun listeners() = listOf(SpringListener)

    @Autowired
    private lateinit var packService: PackService

    @SpykBean
    private lateinit var publisher: ApplicationEventPublisher


    init {
        "create 함수는" - {
            "KitPackCreationDto와 userId를 입력받아" - {
                val dto = domainFixture<KitPackCreationDto>()
                val userId = fixture<String>()

                packService.create(dto, userId)
                "PackCreatedEvent 이벤트를 발행한다" {
                    val expected = PackCreatedEvent(dto.toDomain(userId))
                    verify { publisher.publishEvent("test") }
                }
            }
        }
    }

    @TestConfiguration
    class TestConfig {
        @Primary
        @Bean
        fun eventPublisherSpy(): ApplicationEventPublisher {
            return spyk()
        }
    }
}

@veluxer62
Copy link
Owner Author

@veluxer62
Copy link
Owner Author

@DynamicUpdate

dirty checking 시 필요한 컬럼만 업데이트

@veluxer62
Copy link
Owner Author

veluxer62 commented Sep 3, 2020

@veluxer62
Copy link
Owner Author

datadog

monitor - 로그 알림 등
apm - 매트릭

@veluxer62
Copy link
Owner Author

veluxer62 commented Sep 3, 2020

JPA zonedDateTime 사용시 DB가 UTC이고 System이 Asia/soul 인경우

spring.jpa.properties.hibernate.jdbc.time_zone=UTC 해줘야 DB에 정상적으로 시간이 변경되어 저장됨

jdbc.url 에 ?serverTimezone=UTC을 적용하니 시간이 변환이 되지 않음

@veluxer62
Copy link
Owner Author

flyway 적용 시
timestamp 속성으로 정의한 created_at 컬럼에 on update current_timestamp() 가 생성되는 이슈가 있었다.
다른 테이블은 그렇지 않은데 유독 하나의 테이블에서 해당현상이 발견되었고 default current_timestamp()를 적어주니 더이상 생성되지 않았다.

@veluxer62
Copy link
Owner Author

veluxer62 added a commit that referenced this issue Sep 6, 2020
Create 2020-09-06 first week of september weekly retrospective.

issue items: #436
veluxer62 added a commit that referenced this issue Sep 6, 2020
Create 2020-09-06 first week of september weekly retrospective.

issue items: #436
veluxer62 added a commit that referenced this issue Mar 13, 2021
Create 2020-09-06 first week of september weekly retrospective.

issue items: #436
veluxer62 added a commit that referenced this issue Apr 3, 2021
Create 2020-09-06 first week of september weekly retrospective.

issue items: #436
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Retrospective write retrospective
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant