172만명의 커뮤니티!! 함께 토론해봐요.
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
재고관리에 카프카 쓴 이유가 궁금합니다. 제가 이해한 내용으로는 현재 order와 catalog는 다른 포트를 사용 중이고 같은 DB를 사용 중인걸로 알고있습니다. 그래서 카프카말고 @FeignClient로 재고관리에 업데이트 해주는 방식이 있는 거 같은데 이 상황에서 카프카를 쓴 이유가 있나요?
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
2025-03-05T06:17:31.775Z
댓글 2
좋아요 0
조회수 209
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
이전 카프카1편 강의에서는 Iterm을 이용해서 직접 접근한 거 같은데 만약 스프링 프로젝트로 만들어도 jdbc connector, db connector를 kafka connector에 별도로 설정해줘야하나요? 아니면 스프링이 알아서 다 세팅해주나요?
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
kongminoo
2025-03-04T12:25:14.445Z
댓글 2
좋아요 0
조회수 131
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
도커로 사용해도 카프카 바이너리, 카프카 커넥트, 카프카 jdb 커넥트 세개 다 다운하고 설정해줘야하나요?
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
kongminoo
2025-03-04T03:45:10.996Z
댓글 2
좋아요 0
조회수 213
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
mariadb driver로 접속할 수 없다고 나오는데 이거 혹시 무슨 문제인지 알 수 있을까요?
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
ugw2ad
2025-02-25T15:27:03.711Z
댓글 2
좋아요 0
조회수 384
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
깃허브에서 강의자료를 다운받았는데 암호가 걸려있어서 굿노트에서 열리지도 않고 파일에서 필기도 안되고 인쇄도 안됩니다. 암호 안걸려있는 강의자료를 받을 수 있을까요.
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
망치
2025-02-20T23:44:48.871Z
댓글 2
좋아요 0
조회수 318
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
deprecated돼서 spring initializr에 검색조차 안되는데 그냥 강의 듣다보면 다른 해결방안 나오는건가요?
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
kongminoo
2025-02-20T06:20:49.953Z
댓글 2
좋아요 0
조회수 496
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
저한테도 있어서 봤는데, 크게 신경 쓸 필요는 없을 것 같습니다. Appdata/local/temp 는 말 그대로 앱의 임시파일 저장하는 곳이고, config 서버 기동 시 git에서 해당 설정파일들을 읽어들여 저 위치에 저장하는 것으로 보입니다. 근데 왜 윈도우만 저렇게 임시파일을 저장하고 그 위치의 주소를 붙여서 출력해주는지는 잘 모르겠네요. 맥OS는 그때그때 git에서 파일을 가져오는 것일까요? 제가 맥이 없어서 그걸 모르겠네요.
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
박민호
2025-02-08T14:21:34.776Z
댓글 2
좋아요 0
조회수 199
해결됨
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
yml의 설정 내용을 암호화하는 작업중에 궁금한 점이 있습니다. 암호화해도 http://config server주소/config파일명/프로파일 경로로 접속하면 해독된 값을 볼 수 있는데 이러면 암호화한 의미가 있는지 궁금합니다 config 서버에서 http://config server주소/config파일명/프로파일 경로를 비활성화하는 방법이 있을까요? 그리고 비대칭키에서 암호화에 사용하는 password는 평문으로 yml에 저장하고 있는데 이러면 반쪽짜리(?) 암호화일 것 같은데 이렇게 사용해도 되는건지가 궁금합니다
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
안_
2025-02-07T01:39:53.392Z
댓글 2
좋아요 0
조회수 160
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
안녕하세요 유레카 서버가 종료된경우 클라이언트에서 연결오류 관련 에러로그가 많이 뜨더라구요 운영 환경에서 클라이언트앱 쪽에 이런 로그가 너무 많이 발생하는것은 지저분해보여서 간단하게 한줄짜리 커스텀로그로 대체하고싶은데 방법이 있을까요?
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
미믹
2025-02-07T00:43:41.309Z
댓글 2
좋아요 0
조회수 148
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
강사님 너무 좋은 강의 감사드립니다. JDBC Source Connector 예시를 잘 보았습니다. 해당 소스 커넥터의 경우 DB를 주기적으로 폴링해서 변경사항을 감지해서 DB 부담이 큰 것으로 알고 있는데요. (CDC source connector에 비해) 혹시 해당 방식의 커넥터는 현업에서도 메이저하게 사용하는 방식인지 아니면 단순 예시인지 궁금합니다.
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
임동혁
2025-01-31T13:47:47.208Z
댓글 2
좋아요 0
조회수 294
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
문제 Zipkin Dependencies 화면만 안나옴... (Chrome 에서만 안됨... Firefox 에서는 됨...) 1) 개발자도구 확인 - Network You need to enable JavaScript to run this app 확인 https://support.google.com/adsense/answer/12654?hl=en 위 링크를 확인해서 크롬에서 JavaScript 가 활성화 되어있는지 확인 → 이미 되어있었음... 2) 개발자 도구 확인 - Console Error creating WebGL context. 확인 chrome://flags ANGLE graphics backend 옵션 확인 > OpenGL 설정 → 그래도 안됨… 3) 마지막.. chrome://settings 시스템 탭 클릭 "가능한 경우 그래픽 가속 사용" 설정 켜기... → 성공… 같은 문제가 발생하시는 분들에게 도움이 되면 좋겠습니다. 참고 사이트입니다. https://help.lucid.co/hc/ko/articles/17480912789908-문제-해결-WebGL https://support.google.com/chrome/thread/25018979/status-could-not-create-a-webgl-context?hl=en
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
포팃
2025-01-24T02:12:55.683Z
댓글 2
좋아요 0
조회수 218
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
강의 내용에 따르면 order-service1, order-service2 두 개의 인스턴스가 kafka-connect를 사용하기 위해 mariadb에 직접 연결을 맺는것으로 이해했습니다. 제가 궁금한 것은 단일 DB를 사용하는 경우에 kafka를 쓰는 이유입니다. 현 강의와 같이 단일 DB를 사용하는 경우라면 kafka를 사용하지 않고, RestTemplate이나 FeignClient와 같은 라이브러리를 사용해서 catalog-service와 통신하고, jpa를 통해 직접 DB에 데이터를 직접 삽입할 수 있을텐데 이 경우 트랜잭션을 잘 처리해준다면 데이터도 동기화 할 수 있다고 생각합니다. 다만, 여러 진입점 관리, 트랜잭션 처리 등 따로 처리해야할 부분이 많고 요청이 증가할 수록 kafka의 성능이 우수하기 때문에 kafka를 쓰는 것으로 이해했습니다. 제 생각에 틀린 부분이 있다면 말씀해주시면 감사하겠습니다!
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
도토리묵
2025-01-14T13:18:25.080Z
댓글 2
좋아요 0
조회수 177
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
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-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
psycn1
2025-01-13T15:02:43.196Z
댓글 2
좋아요 0
조회수 257
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
안녕하세요, 질문 드립니다. /catalogs 조회하는 api 에서 catalogService.getAllCatalogs();에서 데이터는 디비에서 잘 들고 오는데 ModelMapper만 통과하면 모든 필드가 null로 return 되고 있습니다. 동일한 스팩의 user-service 에서 user 조회 api는 정상적으로 조회가 됩니다... 이유를 모르겠어서 납깁니다.. (created_at 필드는 추가를 하지 않았습니다. 이문제는 아닌 것 같아요)
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
fhfkfk789
2025-01-09T09:13:37.147Z
댓글 5
좋아요 0
조회수 286
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
유사한 질문이 있어서 도움이 될 수 있을까 찾아 봤지만 해당 github에 접근할 수 없었고(아마 삭제한 듯), chat GPT를 통해서 답을 얻을 수 있을까 질문을 해 봤지만 해결책이 나오지 않아서 대략 1주일 이상을 헤매고 있었습니다. 그런데 강사님이 다른 분의 질문에 답을 주신 것을 보고 user-service의 SecurityConfig.java 파일에서 .requestMatchers("/**").access( new WebExpressionAuthorizationManager("hasIpAddress('127.0.0.1') or hasIpAddress('172.18.0.5') or hasIpAddress('192.168.0.172')")) // ip address of my pc .anyRequest().authenticated() 위의 코드처럼 나의 pc의 ip address를 포함하니 더이상 403 오류가 발생하지 않더군요. 그래서 결국에는 내 pc의 ip address를 포함해야 하는구나라고 생각했습니다. 그런데 동일한 코드를 다른 pc(이 pc에서도 계속해서 403 오류 발생했었음)에서 구동시켰더니 내 pc의 ip address를 변경시키지 않았음에도 403 오류 발생 없이 잘 동작하더군요. 그동안 무엇이 문제였을까요? 물론 github에 올라가 있는 configuration 파일에서도 gateway의 ip adddress를 172.18.0.5로 지정했고, SecurityConfig.java에서도 위의 코드같이 172.18.0.5를 포함했었습니다.
spring-boot spring-cloud msa docker-container 403-forbidden
똘똘이
2024-12-23T14:27:15.757Z
댓글 2
좋아요 1
조회수 354
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
안녕하세요 강사님! 제가 토이 프로젝트를 진행했을 때 엔티티에 implements Serializable를 하지 않았을 때 오류가 나지 않고 정상적으로 잘 되었는데(스프링 부트 3.2.4 사용 했습니다) 강사님 께서는 앞선 카탈로그 엔티티 및 오더 엔티티에서 둘 다 Serializable를 implements 하셨는데 강의 말씀 하시기를 직렬화 때문에 사용을 하셨다고 말씀해주셨는데 해당과정에서 Serializable을 implements 을 하지 않으면 어떤 부분에서 오류가 나는지 여쭤 볼 수 있을까요?? 어느 부분에서 implements Serializable가 필요한 부분인지 모르겠습니다 ㅠㅠ 보통 일반적으로 스프링에서 Jackson? 으로 직렬화를 자동으로 지원해주어 implements를 따로 해줄 필요가 없다고 알고 있었습니다. 기초적인 질문이었다면 먼저 죄송하다는 말씀 드리면서 질문 드리겠습니다! 감사합니다.
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
SHYU
2024-12-21T10:01:14.323Z
댓글 1
좋아요 0
조회수 209
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
클래스 두개 그대로 복붙하는데 "로그인만 안됩니다" 오류내용은 { "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-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
임다정
2024-12-11T18:05:02.100Z
댓글 2
좋아요 0
조회수 265
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
안녕하세요 강의를 보면서 실습을 하다가 오류가 생겨서 질문드립니다 ! Slf4j log cannot find symbol 오류가 뜨는데요 관련 Q&A를 따라해도, 인텔리제이에서 lombok 설치해도, clean을 해도 해결이 안돼서요 이렇게 뜨는데 뭐가 문제인지 알수있을까요 ? 감사합니다!
spring-boot 아키텍처 spring-cloud msa slf4j
한혜원
2024-12-10T08:06:57.866Z
댓글 2
좋아요 0
조회수 428
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
옮기려는데 자꾸 암호를 적으라고해서요..;;
spring-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
임다정
2024-12-09T06:22:30.529Z
댓글 2
좋아요 1
조회수 240
미해결
Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
제가 작성한 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-boot jpa 아키텍처 spring-cloud kafka msa rabbitmq
2024-12-06T16:28:42.414Z
댓글 2
좋아요 1
조회수 281