개발/spring, spring boot

    728x90
    반응형

    [WebSocket][STOMP] Whoops! Lost connection to ws 에러 해결

    클라이언트에서 Websocket 연결을 시도할때 로컬 환경에서는 정상적으로 연결되는데 개발환경에서는 아래와 같이 에러가 발생하였습니다. Whoops! Lost connection to ws://localhost:8080/ws 우선 개발환경에서는 server의 포트가 달라서 포트를 개발서버의 포트로 변경했지만 동일한 에러가 발생하였습니다. Whoops! Lost connection to ws://localhost:8111/ws localhost가 잘못 찍히나 확인해봤더니 ip가 이상하게 찍혀서 ip를 개발서버의 ip로 설정되게 수정하니 정상적으로 연결되었습니다. 참고자료 https://gist.github.com/hectorguo/672844c319547498dcb569df583f959d

    Spring Boot Cache 사용 방법

    Spring Boot에서 Cache를 사용하는 방법에 대해서 알아보도록 하겠습니다. 1. 의존성 추가 먼저, Spring Boot 프로젝트에 캐시 기능을 사용하기 위해 아래 의존성을 추가합니다. caffeine 캐시를 사용하기 위해 caffeine 캐시 의존성도 추가해줍니다. Caffeine 캐시는 캐시 라이브러리 중 하나로, Spring Boot에서도 많이 사용됩니다. Caffeine 캐시는 특히 성능이 우수하고 유연한 구성 옵션을 제공하는 특징이 있습니다. implementation 'org.springframework.boot:spring-boot-starter-cache' implementation 'com.github.ben-manes.caffeine:caffeine:3.1.8' 2. 캐시 설정..

    spring boot tcp server 구현(spring integration)

    spring boot에서 tcp server를 구현하는 방법중에서 spring-integration를 사용해서 tcp server를 구현해보도록 하겠습니다. spring-integration은 메시지 기반의 통합을 지원하며, TCP와 같은 다양한 프로토콜을 통한 통신을 쉽게 구현할 수 있도록 도와줍니다. 아래의 과정을 통해 Spring Boot에서 TCP 서버를 만들 수 있습니다. 1. 의존성 추가하기 spring-integration 의존성을 추가해줍니다. implementation 'org.springframework.boot:spring-boot-starter-integration' implementation 'org.springframework.integration:spring-integratio..

    [mybatis] Cannot resolve reference to bean 'sqlSessionTemplate' while setting bean property 'sqlSessionTemplate' 에러

    spring boot mybatis 환경에서 sql-mapper-config.xml 파일을 설정하기 전에는 오류가 발생안했는데 sql-mapper-config.xml 파일을 설정하고 서버를 실행할때 아래와 같은 오류가 발생하였습니다. Cannot resolve reference to bean 'sqlSessionTemplate' while setting bean property 'sqlSessionTemplate' 해당 에러는 주로 MyBatis와 Spring Boot를 통합할 때 발생하는 문제 중 하나입니다. 이 에러는 sqlSessionTemplate 빈을 찾을 수 없다는 것을 나타내며, 주로 설정 파일이나 프로젝트 구조와 관련이 있을 수 있습니다. 아래의 항목에 의해서 에러가 발생할 수 있습니다. ..

    728x90
    반응형