묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Zipkin Dependencies 화면 안나옴...
문제Zipkin Dependencies 화면만 안나옴... (Chrome 에서만 안됨... Firefox 에서는 됨...) 1) 개발자도구 확인 - NetworkYou need to enable JavaScript to run this app 확인https://support.google.com/adsense/answer/12654?hl=en위 링크를 확인해서 크롬에서 JavaScript 가 활성화 되어있는지 확인→ 이미 되어있었음... 2) 개발자 도구 확인 - ConsoleError creating WebGL context. 확인chrome://flagsANGLE graphics backend 옵션 확인 > OpenGL 설정 → 그래도 안됨… 3) 마지막..chrome://settings시스템 탭 클릭"가능한 경우 그래픽 가속 사용" 설정 켜기... → 성공… 같은 문제가 발생하시는 분들에게 도움이 되면 좋겠습니다. 참고 사이트입니다.https://help.lucid.co/hc/ko/articles/17480912789908-문제-해결-WebGLhttps://support.google.com/chrome/thread/25018979/status-could-not-create-a-webgl-context?hl=en
-
해결됨RabbitMQ를 이용한 비동기 아키텍처 한방에 해결하기
10.Pub-Sub모델을 이용한 실시간 알림 (WebSocket, STOMP 이용) part 1 의 자료
학습중 궁금한 것은 언제든 문의 하세요.질문을 최대한 자세히 남겨주시면 반드시 답변 드리도록 하겠습니다.추가로 알고 싶은 내용도 요청해주시면 강의 자료를 업데이트 해서 제공할 예정입니다. 안녕하세요~! 10.Pub-Sub모델을 이용한 실시간 알림 (WebSocket, STOMP 이용) part 1해당 자료가 다운이 되지 않습니다!
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
단일 데이터베이스 연결
강의 내용에 따르면 order-service1, order-service2 두 개의 인스턴스가 kafka-connect를 사용하기 위해 mariadb에 직접 연결을 맺는것으로 이해했습니다. 제가 궁금한 것은 단일 DB를 사용하는 경우에 kafka를 쓰는 이유입니다.현 강의와 같이 단일 DB를 사용하는 경우라면 kafka를 사용하지 않고, RestTemplate이나 FeignClient와 같은 라이브러리를 사용해서 catalog-service와 통신하고, jpa를 통해 직접 DB에 데이터를 직접 삽입할 수 있을텐데 이 경우 트랜잭션을 잘 처리해준다면 데이터도 동기화 할 수 있다고 생각합니다.다만, 여러 진입점 관리, 트랜잭션 처리 등 따로 처리해야할 부분이 많고 요청이 증가할 수록 kafka의 성능이 우수하기 때문에 kafka를 쓰는 것으로 이해했습니다. 제 생각에 틀린 부분이 있다면 말씀해주시면 감사하겠습니다!
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Could not find or load main class org.apache.kafka.connect.cli.ConnectDistributed 에러 해결
confluent-6.1.0\bin\windows\kafka-run-class.bat 파일 안에 rem Classpath addition for release으로 검색하셔서 밑에 코드를 넣으시면 됩니다. rem Classpath addition for LSB style path if exist %BASE_DIR%\share\java\kafka\* ( call :concat %BASE_DIR%\share\java\kafka\* )
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
데이터가 null만 나오는 이유
안녕하세요, 질문 드립니다. /catalogs 조회하는 api 에서 catalogService.getAllCatalogs();에서 데이터는 디비에서 잘 들고 오는데 ModelMapper만 통과하면 모든 필드가 null로 return 되고 있습니다. 동일한 스팩의 user-service 에서 user 조회 api는 정상적으로 조회가 됩니다... 이유를 모르겠어서 납깁니다..(created_at 필드는 추가를 하지 않았습니다. 이문제는 아닌 것 같아요)
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Serializable에 대해서 질문입니다!
안녕하세요 강사님!제가 토이 프로젝트를 진행했을 때 엔티티에 implements Serializable를 하지 않았을 때 오류가 나지 않고 정상적으로 잘 되었는데(스프링 부트 3.2.4 사용 했습니다)강사님 께서는 앞선 카탈로그 엔티티 및 오더 엔티티에서 둘 다 Serializable를 implements 하셨는데 강의 말씀 하시기를 직렬화 때문에 사용을 하셨다고 말씀해주셨는데 해당과정에서 Serializable을 implements 을 하지 않으면 어떤 부분에서 오류가 나는지 여쭤 볼 수 있을까요??어느 부분에서 implements Serializable가 필요한 부분인지 모르겠습니다 ㅠㅠ보통 일반적으로 스프링에서 Jackson? 으로 직렬화를 자동으로 지원해주어 implements를 따로 해줄 필요가 없다고 알고 있었습니다.기초적인 질문이었다면 먼저 죄송하다는 말씀 드리면서 질문 드리겠습니다!감사합니다.
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
깃허브에서 똑같이 user-service security
클래스 두개 그대로 복붙하는데 "로그인만 안됩니다" 오류내용은 { "timestamp": "2024-12-11T18:03:34.879+00:00", "status": 404, "error": "Not Found", "trace": "org.springframework.web.servlet.resource.NoResourceFoundException: No static resource .\n\tat org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:585)\n\tat org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:52)\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1088)\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:978)\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)\n\tat jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)\n\tat jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)\n\tat org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365)\n\tat org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:101)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)\n\tat org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131)\n\tat org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227)\n\tat org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)\n\tat org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)\n\tat org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82)\n\tat org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)\n\tat org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)\n\tat org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)\n\tat org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:243)\n\tat org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)\n\tat org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)\n\tat org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:238)\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)\n\tat org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:397)\n\tat org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n\tat org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)\n\tat org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n\tat org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)\n\tat org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n", "message": "No static resource .", "path": "/" }포스트맨에서 이렇게뜨고 로그인말고는 다됩니다 로그인할때 post요청보낼때 저렇게뜹니다 코드는 git에서 복붙한거라 다른게없스니다
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
자료 다운받고 굿노트에
옮기려는데 자꾸 암호를 적으라고해서요..;;
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
user service에서는 토큰 검증을 하지 않나요?
제가 작성한 user-service SecurityConfig 입니다강의 내용과 최대한 유사하게 작성한거 같은데 GET /users에서 403이 발생하여 문의드립니다.gateway service에서 토큰 검증을 하여도 user service에서는 검증된 토큰인지 알 수 없으니 403이 발생하는게 맞는거 같은데 강의에서는 api가 제대로 동작하여 왜 그런지 궁금합니다 @RequiredArgsConstructor @Configuration public class SecurityConfig { //AuthenticationManager가 인자로 받을 AuthenticationConfiguraion 객체 생성자 주입 private final AuthenticationConfiguration authenticationConfiguration; private final JwtProvider jwtProvider; private static final String[] WHITE_LIST = {"/login", "/h2-console/**", "/health-check", "/welcome", "/join"}; @Bean public SecurityFilterChain config(HttpSecurity http) throws Exception { AuthenticationManager authenticationManager = authenticationManager(authenticationConfiguration); AuthenticationFilter authenticationFilter = new AuthenticationFilter( authenticationManager, jwtProvider); http.csrf(csrf -> csrf.disable()) //CSRF 보호를 비활성화. REST API 환경만 비활성화. Web Form 기반에서는 필요. .formLogin((auth) -> auth.disable()) // .httpBasic((auth) -> auth.disable()) .headers(header -> header.frameOptions( frameOptionsConfig -> frameOptionsConfig.disable()) ) //h2 console iframe을 사용하기 때문에 X-Frame-Options 헤더를 비활성화 .authorizeHttpRequests(auth -> auth.requestMatchers(WHITE_LIST).permitAll() .anyRequest() .authenticated() ) .authenticationManager(authenticationManager) .addFilterAt(authenticationFilter, UsernamePasswordAuthenticationFilter.class) .sessionManagement((session) -> session .sessionCreationPolicy(SessionCreationPolicy.STATELESS)); return http.build(); } //AuthenticationManager Bean 등록 @Bean public AuthenticationManager authenticationManager(AuthenticationConfiguration configuration) throws Exception { return configuration.getAuthenticationManager(); } @Bean public BCryptPasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } }
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Slf4j log cannot find symbol 오류 해결방법
intelliJ 에서 Slf4j 추가한 상태에서 log.info(header); 부분에서 나는 오류 해결방법java: cannot find symbol symbol: variable log
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
actuator 적용이 아닌 따로 `/heath_check` 를 생성한 이유가 있을까요?
actuator 적용이 아닌 따로 /heath_check 를 생성한 이유가 있을까요? 좋은 강의 감사합니다. 좋은 하루 보내세요 : )
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Gateway `_(언더바)` Internal Server Error
안녕하세요. 강의 잘 보고 있습니다. Gateway의 uri를 lb://MY_FIRST_SERVICE 로 수정했을 때 500 Internal Server Error가 났습니다.처음에 Spring boot 버전에서 문제인가 싶어서 Spring boot 버전을 3.3.5 -> 3.2.0 으로 수정도 해보고 load-balancer도 추가해보고 했습니다. 결과적으로 lb://MY_FIRST_SERVICE의 _(언더바)를 -하이픈으로 수정하니 정상 작동하는 것을 알았습니다. 그런데 여기서 이유를 GPT에게 물어본 결과라는 답변을 받았습니다.이러한 결과가 사실이 맞는지 궁금합니다. 구글링 해봤을 때 관련한 자료는 없어서 여쭤봅니다
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
spring cloud gateway mvc 모델에서 route별 timeout 설정
안녕하세요 선생님. 질문이 있어 남깁니다.spring cloud gateway mvc모델에서 route별 httpclient의 readtimeout, connectiontimeout을 설정하는 방법이 있나요?reactive한 모델에서는 metadata를 이용하여 설정하는 것 같은데, documents를 아무리 뒤져도 mvc모델에서 전역적으로 타임아웃 설정하는 법만 있고, route별 설정하는 법이 없네요.. 어떻게 설정해야할까요?
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
강의자료를 얻고 싶습니다.
강의 자료를 받아 보고 싶습니다.필요한 것을 찾을 때 강의를 재생하면서 내용 중에 찾기가 힘들어요
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Actuator busrefresh 관련 질문
해결 했습니다. 강의 감사합니다
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
디버깅모드 에러
ErrorDecoder를 이용한 예외 처리강의 15:00 에order_service: url: http://ORDER-SERVICE/order-service/%s/orders exception: order_is_emptyda: User's order is emptyimda2이렇게 설정하고 http://127.0.0.1:8000/user-service/users/[userid]돌리니까디버깅모드에서 getProperty가 Invalid expression : ) 로 표시됩니다 resume 하면 제대로 postman에 적용되긴합니다. 거의 똑같이 썻는데 왜 저는 저렇게 디버그 모드에서 invalid expression이라고 떠서 확인을 못하게 뜰까요 스프링부트3.3 jdk 17입니다 intellij
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Database "mem:testdb" not found 에러 해결 방법
가장 최신 버전으로 H2와 Spring Boot를 활용하신다면spring-boot-starter-jdbc 추가하시면 바로 연결 가능합니다.<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> <version>3.3.5</version> </dependency> 추가적인 작업(JPA 유도 등)을 하지 않아도 바로 접속이 가능합니다~!
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
First service gateway service 연동 관련 문의
강의를 따라서 실행하던 도중 security 관련 의존성을 추가한 적이 없는데 localhost:8000/first-service/welcome으로 접속을 하면 위 사진과 같은 경로로 리다이렉트 되면서 에러가 발생합니ㄷㅏ.어떤 이유에서 이 경로로 리다이렉트가 되는걸까요? 아래는 설정 파일들을 사진으로 First-service는 정상적으로 잘 작동됩니다
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
혹시 강의에서 오토스케일링은 배울수있을까요?
모든강의를 구매할 예정입니다.스프링 강의를 제외하고 구매하고싶습니다만 현재 까지 강의를 들었을때 제가 스프링 서버를 두개를 뛰운다음에 유레카로 로드밸런싱하는것 같은데 필요에따라서(서비스요청이 많아지면)자동적이게 설정한대로 확장하게 만들수 있나요? 이건 젠키스 강의로봐야하나요?- 오토스케일링 여부또한 하나의 ec2 에 모든 로직을 넣어서 확장하는게 아니라 여려 ec2 에서 스케일링 하는 강의가있나요?스프링 배포까지 공부해야할까요?-ec2 분산 여부
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
학습방법 질문드립니다.
3.x 버전 업데이트 해서 구매했습니다.그럼 실습 부분은 아래에있는 3.x 버전만 보면되나요?위의 2.x 는 생략해도되나요?