본문 바로가기

전체 글75

[Spring Cloud] Api Gateway 에서 uri prefix 제거하기 MSA 환경에서 Spring Cloud 의 Api Gateway를 사용하는 경우 각 서비스의 url 을 로드벨런싱 해주기 위해 host:port/서비스이름/~~ 형태로 서비스를 호출하게 된다. 이때 '서비스이름' 에 해당하는 url 때문에 각 MSA 컨트롤러에 해당 url 정보를 매핑해줘야 하는 번거로움이 있을수 있다. 이러한 번거로움을 Api Gateway 설정파일의 filter값에 아래 데이터를 추가해 줌으로서 번거로움을 덜수 있다. - id: user-service uri: lb://USER-SERVICE predicates: - Path=/user-service/login - Method=POST filters: - RemoveRequestHeader=Cookie - RewritePath=/use.. 2022. 9. 7.
[JPA] save, saveAll 성능차이 JPA 내부 소스 ( SimpleJpaRepository.class ) save 메서드 @Transactional public S save(S entity) { Assert.notNull(entity, "Entity must not be null."); if (this.entityInformation.isNew(entity)) { this.em.persist(entity); return entity; } else { return this.em.merge(entity); } } saveAll 메서드 @Transactional public List saveAll(Iterable entities) { Assert.notNull(entities, "Entities must not be null!"); List .. 2022. 9. 5.
[Spring Cloud] API Gateway 본 내용은 인프런에 Dowon Lee 님의 강의내용 간략하게 정리한 내용입니다. https://www.inflearn.com/course/%EC%8A%A4%ED%94%84%EB%A7%81-%ED%81%B4%EB%9D%BC%EC%9A%B0%EB%93%9C-%EB%A7%88%EC%9D%B4%ED%81%AC%EB%A1%9C%EC%84%9C%EB%B9%84%EC%8A%A4/dashboard Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA) - 인프런 | 강의 Spring framework의 Spring Cloud 제품군을 이용하여 마이크로서비스 애플리케이션을 개발해 보는 과정입니다. Cloud Native Application으로써의 Spring Cloud를 어떻게 사용하는지, 구성을 어떻게.. 2022. 8. 26.
[Spring Cloud] Eureka 서버 기동하기 먼저 Eureka 란.. Netflix 에서 오픈소스로 공개한 MSA 에서 사용되는 Naming Server 이다. https://cloud.spring.io/spring-cloud-netflix/reference/html/ Spring Cloud Netflix This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. With a few simple annotations you can quickly enable and configure the commo.. 2022. 8. 18.
[Java] KST 시간변환 KST 시간예시 Sat Jan 01 00:00:00 KST 2022 변환방법 SimpleDateFormat 을 이용. 여기서 중요한점 KST 포멧을 받을 SimpleDateFormat 과 원하는 포멧으로 바꿀 SimpleDateFormat 두가지가 필요하다. @Test public void dateFormatTest() throws JSONException, ParseException { String date = "Sat Jan 01 00:00:00 KST 2022"; SimpleDateFormat recFormat = new SimpleDateFormat("E MMM dd HH:mm:ss z yyyy",Locale.ENGLISH); SimpleDateFormat sdf = new SimpleDateFo.. 2022. 8. 16.