일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- JUnit
- springboot
- openfeign connectTimeout
- mockito에러
- error
- java 여러개 버전
- aws
- java version
- Java 1.8
- springboottest
- No tests found for given includes
- java 1.8 11
- LeetCode
- openfeign readTimeout
- parse
- Only void methods can doNothing()
- mockito테스트
- java
- springboot 3 openfeign readtimeout
- 스프링부트테스트
- springboottest spybean
- AWS CLI
- yum install java
- OpenFeign
- Medium
- easy
- log error
- spring.cloud.openfeign timeout not working
- java 버전 변경
- java 11
- Today
- Total
목록개발 (107)
쩨이엠 개발 블로그
Mockito로 Unit Test를 하는 도중 Service 내에서 다른 API 호출건이 포함되어있다 테스트할 때에는 포인트 적립이 되지 않도록 Mocking을 하기 위해 doNothing을 사용했다 Mockito.doNothing().when(pointApi).savePoint(any()); 그리고 다음과 같은 에러를 받았다 Only void methods can doNothing()! Example of correct use of doNothing(): doNothing(). doThrow(new RuntimeException()) .when(mock).someVoidMethod(); Above means: someVoidMethod() does nothing the 1st time but throw..
현상 API를 호출하는데 기본 1분이 넘게 걸려 계속 ReadTimeout Exception이 발생한다 Response 주는 서버쪽에서 앞으로도 그럴거라고(!) Timeout 설정을 늘리라고 했다 늘려본다 사용버전 Java v17.0.7 Springboot v3.0.6 OpenFeign v4.0.3 해결 구글링을 해보니 spring boot에서 openfeign 관련 설정을 밑과 같이 설정하면 Timeout이 먹힌다고 했다 application.yml feign: client: config: ${FeignClient의 name 혹은 value}: connectTimeout: 시간 readTimeout: 시간 현재 spring boot 3을 쓰고 있는데, 이 버전에서는 connectTimeout을 찾을 수..
보통 테스트를 할 때엔 도메인을 연결해서 기존 도메인은 점검중을 띄우고 QA용의 도메인으로 접속해서 테스트를 진행하는데 이번엔 외부 연동이 많아 도메인을 변경하기에 이슈가 있었다 해서 찾아보니 nginx에서 IP 제한을 할 수 있어서 이번 테스트는 그렇게 진행하였다 기존 nginx-ssl.conf location / { add_header Cache-Control "no-store, no-cache, must-revalidate"; proxy_pass http://localhost:3000; proxy_set_header Host $host; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_s..
오랜만에 Oracle을 썼더니 아무것도 기억이 안난다 그 와중에 이상한 에러가 생겼다 Cause: java.sql.SQLException: ORA-01659: 7 을(를) 넘어서 테이블스페이스 TS_MM_DATA01에 MINEXTENTS를 할당할 수 없습니다 이게 뭔가 했더니 테이블스페이스에 용량이 적을 때 생긴다고 한다 oracle 접속 $ sqlplus / as sysdba sysdba로 안들어가고 그냥 일반 유저에서 테이블 찾았더니 아무것도 안떴다 이런 DB 관련은 모두 sysdba에 할당되어있다 테이블 스페이스 정보 확인 SELECT A.TABLESPACE_NAME AS "테이블스페이스명", A.FILE_NAME AS "파일경로", A.BYTES/1024/1024/1024 AS "총크기", (A...
서론 API에서 받아오는 데이터 값으로 암호화를 했더니 실제로 데이터를 찾기가 매우 어려워졌다 해서 DB에서 조회할 때엔 복호화 된 값으로 볼 수 있는 방법을 찾았더니 역시나 있었다 (멋진 사람들) mysql의 기본 세팅은 하기와 같이 AES-128로 세팅이 되어있다 설정을 바꾸고 싶으면 set으로, 조회는 select로 가능하다 encryption 모드는 정해져 있는 것이 아니면 에러를 주기 때문에 이것저것 넣어도 맞는 모드만 들어간다 SET @@block_encryption_mode='aes-256-ecb'; AES 암호화 중 제일 간단한 ecb 모드인 경우 Padding 설정도 없고 IV도 없어서 MySQL에서도 간단히 볼 수 있다 (내경우!) Java 암호화코드 public static Strin..
1. 현상 Objectmapper로 직렬화를 하던 중 아래의 에러가 발생했다 Java 8 date/time type `java.time.LocalDateTime` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: ) 2. 원인 Localdatetime이 직렬화가 되지 않는다는 말이었다 3. 해결 //기존 ObjectMapper objectMapper = new ObjectMapper(); //수정 ObjectMapper objectMapper = new ObjectMapper().registerModule(n..
1. 현상 서버에 배포한 뒤 swagger-ui/index.html 을 불렀는데 index.html과 그 밑의 꾸러미들이 주르륵 404가 뜨는 것을 발견 Spring Security도 사용을 안했는데 걸릴 것이 없는데.. 하고 로컬에서 테스트를 해보니 잘 된다 해서 서버 쪽에 이슈가 있다라고 생각했다 외부 게이트웨이다보니 web과 was 서버를 따로 띄워놓고 web 서버에 ssl 및 nginx를 설치하였고 was로 패싱시켜주도록 만들어놨다 was 쪽 로그를 살펴보니 아예 들어오지도 않고 있는 것을 발견 nginx error.log를 살펴보니 이런 에러가 나있었다 2023/06/26 16:16:51 [error] 72043#0: *8 open() "/app/docroot/nginx/swagger-ui/sw..
1. 현상 자동완성을 위해 Redis 적용을 하고 나서 10개 이상이 쌓이면 지우기 위해 ArrayList를 sublist로 잘랐는데 그다음부터 Redis에서 값을 못가져오기 시작했다 List list = (List) redisTemplate.opsForValue().get(PRIFIX_USER + user.id()); list.add(0, keyword); if(list.size() > 10) list = list.subList(0,9); 에러내용 [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.data.redis.serializer.SerializationE..
RestTemplate 을 대신하여 OpenFeign을 적용해보기로 했다 1. Gradle 적용 plugins { id 'java' id 'org.springframework.boot' version '3.0.6' id 'io.spring.dependency-management' version '1.1.0' } ... dependencies { ... // OpenFeign implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.0.3' } ext { set('springCloudVersion', "2022.0.3") } dependencyManagement { imports { mavenBom "org.springframew..
1. 현상 OpenFeign을 사용하기 위해 dependency들을 추가했다 dependencies { ... implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' } dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:2020.0.3" } } 그리고 빌드했더니 빌드 실패가 뜨면서 이런 에러가 보였다 > Could not resolve all files for configuration ':compileClasspath'. > Could not find org.springframework.cloud:spring-..