반응형

Framework 72

[Error] Error creating bean with name 'stackResourceRegistryFactoryBean'

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.aws.core.env.ResourceIdResolver.BEAN_NAME': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stackResourceRegistryFactoryBean' defined in class path resource [org/springframework/cloud/aws/au..

[Error] Caused by: javax.naming.NameNotFoundException: Name [jdbc/ssafy]은(는) 이 컨텍스트에 바인딩되지 않았습니다. [jdbc]을(를) 찾을 수 없습니다.

🟣 에러로그 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name [jdbc/ssafy]은(는) 이 컨텍스트에 바인딩되지 않았습니다. [jdbc]을(를) 찾을 수 없습니다. 🟡 상황 root-context.xml에 빈을 설정했는데 jdbc/ssafy 이름으로 설정된 값을 못 찾으니까 에러가..

Framework/Spring 2023.10.29

grpcurl

grpcurl gRPC 서버와 통신할 수 있는 command-line tool gRPC 서버에 있는 RPC 메소드를 호출하는 것이 목적 secure/TLS 서버, plain-text 서버를 지원 Docker, 로컬에서 설치할 수 있다. grpcurl [flags] [address] [list|describe] [symbol] address는 다음과 같은 사항에서만 쓰이는 선택 옵션이다. list 또는 describe를 사용할 때 protoset 또는 proto flag가 주어질 때 list symbol은 fully-qualified service name symbol이 주어졌다면, 해당 서비스의 모든 메서드를 출력 symbol이 주어지지 않았다면, 모든 노출된 서비스가 출력되거나 protoset에 모든 ..

Framework/gRPC 2023.03.24

gRPC

gRPC google에서 개발한 오픈소스 RPC(Remote Procedure Call) 프레임워크 HTTP/2를 사용한다. 한 커넥션으로 동시에 여러 개의 메시지를 주고 받을 수 있다. client application은 다른 컴퓨터의 server application에서 메서드를 직접 호출할 수 있다. ➡️ 분산 응용 프로그램 및 서비스를 쉽게 만든다. 원격으로 호출될 파라미터와 리턴 타입을 가지는 메서드를 작성한다. 서버 측에서 서버는 이 인터페이스를 구현하고 클라이언트 호출을 다루기 위해 gRPC 서버를 실행한다. 클라이언트 측에서 클라이언트에는 서버와 동일한 메서드를 제공하는 stub를 가진다. 서버와 클라이언트는 서로 다른 주소 공간을 사용하므로, 함수 호출에 사용된 매개 변수를 꼭 변환해줘야..

Framework/gRPC 2023.03.15

WebFlux

Spring MVC Servlet 기반으로 만들어졌다. sync + blocking 방식으로 동작 하나를 처리할 때 Response를 기다리며 thread를 지연 Multi Thread를 사용하면 block되지 않고 사용할 수 있지만, Thread 간의 Context Switch 발생 시 비용이 생겨 비효율적 WebFlux Spring5에서 새롭게 추가된 모듈 클라이언트와 서버에서 Reactive한 개발을 할 수 있게 도와줌 요청이나 응답을 처리하는 I/O를 async + non blocking으로 방식으로 수행 성능을 최대로 내기 위해서는 모든 I/O 작업이 non blocking 기반으로 동작해야 한다. I/O 작업이 block 되는 곳이 있다면 event loop meltdown 현상으로 다른 작업..

Swagger 에러

"/swagger-resources/**", "/swagger-ui/index.html", "/swagger-ui/**", "/v2/api-docs", "/webjars/**" 다음 URI들을 스프링 시큐리티 설정에서 permitAll로 허용해주었다. 난 허용된 요청을 제외하고는 다 인증을 받도록 구현해서.. 만약에 모든 요청을 다 허용했다면, 위 과정이 필요없었을거다. 참고 👇 https://stackoverflow.com/questions/49155420/springfox-swagger-ui-html-unable-to-infer-base-url-caused-by-missing-cookies Springfox swagger-ui.html unable to infer base URL - Caused by..

[Error] com.fasterxml.jackson.databind.exc.InvalidDefinitionException

⭐ 상황 @Builder public class CommentResponse { private String id; private String username; private String content; private Like like; private Instant createdAt; } List responseList = commentRepository.findAllByPostId(post_id).stream() .map(comment -> CommentResponse.builder() .id(comment.getId()) .username(comment.getUsername()) .content(comment.getContent()) .like(comment.getLike()) .createdAt(co..

[Error] The propertyClass in JsonTypeDescriptor is null, hence it doesn't know to what Java Object type to map the JSON column value that was read from the database!

org.hibernate.HibernateException: The propertyClass in JsonTypeDescriptor is null, hence it doesn't know to what Java Object type to map the JSON column value that was read from the database! spring.jpa.hibernate.ddl-auto=create로 설정해서 실행하면 테이블이 생성된다. JSON 필드가 있는 테이블이 잘 생성되길래 문제가 없을 줄 알았는데.. DB에서 읽어올 때 문제가 생김~ 해결 과정 1. 버전 변경 Hibernate 5.1.2 버전을 사용중이었다. implementation 'io.hypersistence:hypersisten..

반응형