일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- ResponseBody
- EnableWebMvc
- java recode with intellij
- jpa
- list
- java lambda
- elasticsearch
- 센트리
- spring MVC
- traceId
- spanId
- java
- spring
- intellij issue
- software.aws.rds.jdbc.mysql.Driver
- java sentry
- DeferredImportSelector
- java.util.list
- Spring Boot
- @FunctionalInterface
- intellij recode issue
- Spring JPA
- SpringMVC
- CompletableFuture
- kotlin
- map
- cache sizes may be underestimated as a result
- HashMap
- java list
- sentry environment
- Today
- Total
목록스프링 (28)
du.study기록공간
이 글은 driverClassName을 'com.mysql.jdbc.Driver'에서 'software.aws.rds.jdbc.mysql.Driver'로 바꾸는 과정에 발생된 이슈를 작성하고자 합니다. 우선 이슈가 발생된 과정을 정리해보면 다음과 같습니다. 1. driverClassName 변경 'com.mysql.jdbc.Driver' -> 'software.aws.rds.jdbc.mysql.Driver' 2. DATETIME 필드를 mybatis를 통해서 String으로 리턴하는 상태. 3. 로직상에서 String으로 받은 값을 아래 코드를 통해서 변환 DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S"); Lo..
오늘은 간단한 내용을 작성해보려 합니다. Spring 에서 로그 추적을 위해 traceId를 남기고자 sleuth를 사용하고 있습니다. 운영과정에서 일부 비동기 로직에서 traceId가 남지않는것을 확인하였고, 이 부분에 대해 확인한것을 기록하고자 합니다. 사실 해결법은 매우 간단하지만(검색하면 바로) 왜 동작하는지는 알고 바꾸고자 한번 작성하게되었습니다. 먼저 bean으로 생성하는경우를 확인하고자 합니니다. @Bean(name = "예시니까 세팅은 전부 1") public Executor threadPoolTaskExecutor() { ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor(); taskExecutor.setCorePoolSi..
간단한 통계 서비스를 구축하는 과정에서 맞이한 문제점을 정리해봅니다. 사용한 Spring version : 2.5.10 spring yaml 설정 spring: datasource: url: jdbc:h2:~/test_leisure_product;MODE=MySQL;DB_CLOSE_ON_EXIT=FALSE .... type: com.zaxxer.hikari.HikariDataSource jpa: show-sql: true properties: hibernate: format_sql: true globally_quoted_identifiers: true dialect: org.hibernate.dialect.MySQL5InnoDBDialect .... 시작은 H2 SQLGrammarException: co..
해당 블로그에도 나와있는 이슈 https://newbedev.com/why-does-jackson-2-not-recognize-the-first-capital-letter-if-the-leading-camel-case-word-is-only-a-single-letter-long Programming tutorials | Newbedev Checkout new tutorials and guides for programming languages Javascript, Python, Java, Golang, C++, PHP newbedev.com 최근 개발을 하던 도중 조금 특이한 경우를 만났습니다. 간단한 예제코드 import org.springframework.web.bind.annotation.GetMap..
이번엔 request dto에 enum타입을 받아올 때, Jackson에서 제공하는 기본 EnumDeserializer 외에 내가 지정한 setter를 사용하는 방법에 대해 기록해보려 합니다. (게시글에서 만큼은 네이밍의 고통을 받고싶지않아 조금 날림입니다.) 간단한 테스트 코드를 구성해봅니다. @RestController public class TestController { @PostMapping("/hello") public String matchEnumTest(@RequestBody RequestDto requestDto){ return "hello world"; } } @Getter public class RequestDto { private TestEnum testEnum; } public en..
이번엔 스프링으로 grpc를 사용하는 과정에서 armeria를 사용하는법에 대해 기록하려합니다. github.com/line/armeria line/armeria Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, ... github.com 우선 armeria 이전에 grpc-gateway를 먼저 간략하게 기록해보려합니다. github.com/grpc-ecosystem/grpc-gateway grpc-ecosy..
저번포스팅에서 SpringBoot의 AutoConfiguration 동작에 대해서 기록한 적이 있습니다. duooo-story.tistory.com/52 Spring boot Auto Configuration 동작방식 이전에도 간략하게나마 Spring boot의 동작 원리를 작성한 적이 있습니다. 이번에는 그 과정을 좀 더 자세하게 기록해 보고자 합니다. 결론부터 말하면 스프링 부트는 두가지 방법으로 bean 등록을 duooo-story.tistory.com 이번에는 이 동작을 이용해서 직접 해당 코드를 작성해보려합니다. 우선 ComponentScan을 제외한 빈 등록 방식을 사용하기 위해서는 다음과 같은 조건을 충족 클레스가 필요합니다. - import를 통해 불러와지며 ( @Component를 가지고..
이전에도 간략하게나마 Spring boot의 동작 원리를 작성한 적이 있습니다. 이번에는 그 과정을 좀 더 자세하게 기록해 보고자 합니다. 결론부터 말하면 스프링 부트는 두가지 방법으로 bean 등록을 하게됩니다. - ComponentScan 을 통한 bean등록 - DeferredImportSelector 를 구현하고 있는 클레스를 @Import를 통하여 불러오는 @Configuration을 선언하고 있는 클레스 우선은 SpringBoot의 시작부분부터 시작해보겠습니다. 1. @SpringBootApplication @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(excludeFilters = { @Filter(type = Filter..
이번엔 스프링에서 사용하고 있는 Scheduling에 대해서 기록해보려합니다. 현재 저희 프로젝트에서는 일정시간단위로 반복되는 작업 처리 방법 중 하나로 해당 Scheduled를 사용하고 있습니다. 오늘 갑자기 코드를 보면서 해당 @Scheduled 가 어떻게 실행되고 set되는지가 궁금하여 조금 간략하게나마 여기에 기입해보려합니다. 먼저 Spring에서 Scheduling을 사용하려면 @Configuration을 선언한 설정파일과 같이 @EnableScheduling를 선언해야합니다. @Configuration @EnableScheduling public class ScheduleConfiguration implements SchedulingConfigurer { @Override public void..
이번에는 간단하게 스프링 부트 웹에서 제공하는 내장 Container를 변경하는법을 기록하려 합니다. 현재 회사에서는 성능 테스트 결과 및 사용 가이드등의 이유로 Undertow 내장 모듈을 사용하여 사용중에 있습니다. 이번에 스프링부트를 사용하는 도중, 기본으로 Tomcat을 사용하고 있어서 찾아보게 되었고 해당 부분을 Undertow로 변경하려 합니다. 우선 spring-boot-starter-web 을 살펴보면 다음과 같은 모듈을 내장하고 있습니다. 스트링 부트 웹모듈을 보면 내부적으로 tomcat을 내장하고 있습니다. 그리고 이로 인하여 Spring.factories 에 있는 EmbeddedWebServerFactoryCustomizerAutoConfiguration 를 호출하게됩니다. 이 속에서..