Framework & Runtime
![[DGS] GraphQLSchema: Factory method 'schema' threw exception; nested exception is java.lang.NoSuchMethodError 에러 해결](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbz2Llr%2Fbtsdwugbndb%2F9jyZoW3sLpJZEL2NsK7FP1%2Fimg.png)
[DGS] GraphQLSchema: Factory method 'schema' threw exception; nested exception is java.lang.NoSuchMethodError 에러 해결
Kotlin + Spring boot + Webflux + Netflix DGS + Groovy 스택에서 개발 환경을 구현하던 중 발생한 여러 에러 중 하나 에러 로그 2023-05-01 23:13:35.236 WARN 5227 --- [ restartedMain] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webHandler' defined in class path re..

spring-cloud-starter-aws artifact 를 사용할 때 org.springframework.cloud group 의 것은 사용하지 마세요
2022년 8월 18일 기준 org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE 의 CVE-2022-31159 취약점이 발견되었습니다. 업데이트 또한 2021년 2월에서 끝났으며, 지속적으로 유지보수 되고 있는 io.awspring.cloud:spring-cloud-starter-aws 를 사용하시기 바랍니다. 기능상 차이점은 지금도 사용 중인데 기존 패키지와 기능이 달라진 것은 안보입니다. (코드 그대로 유지 가능)

java.lang.IllegalArgumentException: Malformed escape pair at index 해결
Error creating bean with name 'postConstructInitializeBean': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Malformed escape pair at index redis 서버와 연동을 테스트 하려던 중 발생한 오류이다. lettuce 에서 뿜어낸 에러 같은데, RedisClient 를 create 할 때 입력해주는 비밀번호에 있는 특정 문자를 제대로 입력 받지 못하는 것 같다. 로 되어 있는 코드를 URLEncoder.encode() 를 이용하여 주었고, UTF-8 로 인코딩 하도록 했다. 이후 에러가 해결되었다. 필자의 경우에는 sprin..
![[Kotlin] Unexpected error occurred in scheduled task (how to solve or fix)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbRjSEq%2FbtroKFd6eUL%2FLgcOxF6B9ZXvsswGMGCoFK%2Fimg.png)
[Kotlin] Unexpected error occurred in scheduled task (how to solve or fix)
해당 에러가 발생했을 때 검색을 해보니, Serializable 를 implements 하라고 합니다. 하지만 인텔리제이는 이 인터페이스를 불러올 줄을 모르고 있습니다. 위 에러 메세지에 힌트가 있습니다. java.io.Serializable 에러가 해결되었습니다 :)

Windows 10 에서 Vue.js 설치해서 사용하기
들어가기에 앞서... NodeJS 는 설치 되어 있어야 합니다. 해당 링크를 참조하세요 : https://docs.microsoft.com/ko-kr/windows/dev-environment/javascript/nodejs-on-windows 네이티브 Windows에서 NodeJS 설치 Windows에 직접 Node.js 개발 환경을 설치하는 방법에 대한 가이드입니다. docs.microsoft.com 1. PowerShell 실행 Windows 키 + X 를 조합하여 아래 창을 띄우고, PowerShell (Admin)를 실행합니다. 2. Vue.js 설치 npm install vue 3. Vue-Cli 설치 npm install -g @vue/cli 4. cannot be loaded because..
Initialized JPA EntityManagerFactory for persistence unit 'default' Stuct 문제 해결
2021-09-28 09:44:56.028 INFO 24956 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 위의 메세지는 에러가 아닙니다. 하지만 Spring Application 를 Run 또는 Debug 할 경우 저 부분에서 계속 멈춰있게 됩니다. 해결 빌드 결과물에 문제가 생겼던 것 같습니다. gradle clean -> build 이후에 해결 되었습니다.

RestTemplate 와 ObjectMapper 활용기(스프링에서 다른 서버의 JSON API Token 을 가져와서 이용해야 할 때)
우선 API 서버의 스펙을 확인하고 data class 를 만들어 줍니다. data class GetToken( val responseCode: String, val token: String ) Http Request 이후 Json 을 담아줄 클래스에 아래 내용을 추가해 줍니다. @Autowired lateinit var restTemplate: RestTemplate var mapper: ObjectMapper = ObjectMapper().registerModules(KotlinModule()) 펑션을 하나 만드셔서 안에 아래 내용을 작성하기 시작합니다. val headers = HttpHeaders() headers.contentType = MediaType.APPLICATION_JSON conte..
Kotlin Spring Boot 에 Querydsl 종속성이 추가된 프로젝트 소스 공유
스프링 이니셜라이저에는 왜 querydsl 이 없는가! 그래서 제가 공개 템플릿 레포를 하나 만들었습니다. https://github.com/Kuass/Kotlin-Spring_Boot-Example GitHub - Kuass/Kotlin-Spring_Boot-Example: Why isn't there a querydsl in the spring initializer! Why isn't there a querydsl in the spring initializer! - GitHub - Kuass/Kotlin-Spring_Boot-Example: Why isn't there a querydsl in the spring initializer! github.com

Spring Boot REST API Spring Security 고유키 만들어서 접근 제한하기(api key and secret)
망 자체는 공용망을 사용하지만, 접근은 특정 인증키를 확인하여 접근을 가능토록 구현을 하고 싶었습니다. 구글에 일반적으로 Spring Security API Key 등을 검색하면 JWT 등과 로그인.. 비밀번호 와 같은 포스팅이 검색됩니다. 이 포스팅에서는 해당 내용이 아니니, 참고 바랍니다. 해당 포스팅은 https://stackoverflow.com/questions/48446708/securing-spring-boot-api-with-api-key-and-secret 해당 글을 인용하였으니 참고 바랍니다. 1. APIKeyAuthFilter.java 를 만들어줍니다. 필자 같은 경우는 이러한 경로에 만들었습니다. 2. 아래와 같이 시큐리티 필터 코드를 작성해줍니다. import org.springf..