HttpTraceRepository를 찾을수가없는데 어떻게해야하나요
2338
작성한 질문수 3
메이븐에 dependency추가해도
HttpTraceRepository를 찾을수없는데 어떻게 진행해야할까요?ㅜ


답변 2
5
네. 아래 댓글 분의 말씀처럼 Spring 3 버전부터 HttpTrace 대신 HttpExchanges로 이름이 변경되었습니다.
자세한 내용은 맨 아래 링크를 참고하시면 될 것 같고,
application.yml 에는 httptrace 대신 httpexchanges를 적어주고, ApigatewayServiceApplication 클래스에선 HttpTraceRepository 대신 HttpExchangeRepository를 적어주면 됩니다.
https://www.appsdeveloperblog.com/how-to-enable-actuators-httptrace-in-spring-boot-3/
0
안녕하세요, 이도원입니다.
말씀하신 HttpTraceRepository는 actuator에 대한 dependency만 가지고 있으면 실행하실 수 있습니다. pom.xml 파일에 적용된 내용이 실제로 메이븐 빌드를 통해 반영된 것이 맞는지 한번 확인해 보시는게 좋을 것 같습니다. 첨부하는 아래 이미지를 참고하시면, Intellij의 왼쪽 Project 메뉴에서 External Libraries 항목을 보시면, pom.xml 파일에 지정했던 dependency에 대한 패키지 항목이 보이는데, 여기해서 org.springframework.boot:spring-boot-acturoa:2.7.6 (최신버전으로 확인했을 때 입니다) 항목에서 해당 HttpTraceRepository 클래스가 확인되는지 확인해 보시기 바랍니다.
추가로 올려주신 이미지를 보면 main 메소드에 붉은색으로 오류가 발생한 것처럼 보이는데, 이부분도 어떤 이유인지 확인해 보시면 좋을 것 같습니다.

감사합니다.
3
spring boot 3.x 부터 변경되었다고 합니다.
Spring Boot 3.0 Migration Guide · spring-projects/spring-boot Wiki · GitHub
'httptrace' Endpoint Renamed to 'httpexchanges'
The httptrace endpoint and related infrastructure records and provides access to information about recent HTTP request-response exchanges. Following the introduction of support for Micrometer Tracing, the name httptrace may cause confusion. To reduce this possible confusion the endpoint has been renamed to httpexchanges. The contents of the endpoint’s response has also been affected by this renaming. Please refer to the Actuator API documentation for further details.
Related infrastructure classes have also been renamed. For example, HttpTraceRepository is now named HttpExchangeRepository and can be found in the org.springframework.boot.actuate.web.exchanges package.
import org.springframework.boot.actuate.web.exchanges.HttpExchangeRepository;
import org.springframework.boot.actuate.web.exchanges.InMemoryHttpExchangeRepository;@Bean
public HttpExchangeRepository httpTraceRepository() {
return new InMemoryHttpExchangeRepository();
}
kafka 업데이트 강의 듣고 시포요
0
85
1
강의 교안
0
75
1
마이크로서비스간 통신 시, 인증 처리
0
79
1
api gateway 에서 인증 처리
0
66
1
섹션 19 질문드립니다
0
53
1
강의 자료 업데이트
0
83
1
부하분산 강의 섹션
0
57
1
강의자료는 어디에서?
0
72
1
강의 자료는 어디서 다운 받을 수 있나요?
0
110
1
전체 사용자 조회시 오류
0
59
1
혹시 pk 외 별도의 id 를 부여한 이유가 있을까요 ??
0
112
2
학습 방향
0
95
2
카프카 커넥터 사용 목적 문의
0
86
2
kafka 강의
0
108
2
서비스 디스커버리 종류
0
87
2
강의 자료에 대해서 궁금해요
0
117
2
GlobalFilter, LoggingFilter가 동작하지 않습니다.
0
90
2
Kafka Source Connect 버전 에러
0
85
2
소스커넥터는 사용안한 거 맞죠?
0
81
2
강의자료 업데이트 문의
0
96
2
강의에서 BCryptPasswordEncoder 에 역할(5-2)
0
56
1
강의 업데이트 계획이 궁금합니다.
0
113
2
MSA 애플리케이션에 Spring Web과 Spring Data JPA를 사용하는 것이 바람직한지 궁금합니다. (MSA 설계와 관련된 질문입니다)
0
162
2
어떤 것이 업데이트 된 건가요?
0
164
2





