inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

boot3 설정

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

spring boot3 에서 slueth를 사용할 수 없다고 합니다. 삽질 끝에 비슷하게 구현이 되긴 했는데 조금 다른 점 때문에 강사님이 의도하신바가 맞는지 정확히는 모르겠네요. 첫 요청의 traceID와 spanID가 다른 점 혹~시 필요하신분이 계시다면 참고해주세요! 추가의존성 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-tracing-bridge-brave</artifactId> </dependency> <dependency> <groupId>io.zipkin.reporter2</groupId> <artifactId>zipkin-reporter-brave</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency> <dependency> <groupId>io.github.openfeign</groupId> <artifactId>feign-micrometer</artifactId> </dependency> 기존 스타터 sleuth, zipkin 의존성 제거 yml 변경점 server: port: 0 spring: application: name: order-service # spring boot 3.0 이전 zipkin, sleuth 설정 # zipkin: # base-url: http://127.0.0.1:9411 # enabled: true # sleuth: # sampler: # probability: 1.0 jpa: hibernate: ddl-auto: update h2: console: enabled: true settings: web-allow-others: true path: /h2-console datasource: driverClassName: org.h2.Driver url: jdbc:h2:mem:testdb ## 추가 cloud: openfeign: micrometer: enabled: true eureka: instance: instance-id: ${spring.cloud.client.hostname}:${spring.application.instance_id:${random.value}} client: register-with-eureka: true fetch-registry: true service-url: defaultZone: http://localhost:8761/eureka management: endpoint: health: show-details: always endpoints: web: exposure: include: refresh, health, beans, busrefresh, info, metrics, prometheus ## 추가 tracing: sampling: probability: 1.0 propagation: type: b3 zipkin: tracing: endpoint: http://localhost:9411/api/v2/spans logging: level: com.example.orderservice: DEBUG ## 추가 pattern: level: "%5p [%X{traceId:-},%X{spanId:-}]" 추가 주석 부분만 추가 Config Bean 추가 @Configuration public class MoniterConfig { @Bean public Capability capability(final MeterRegistry registry) { return new MicrometerCapability(registry); } } 이 Config 를 추가하지 않으시면, 요청 마다 TraceID가 달라집니다. 액츄에이터도 필수 몇 가지 글을 참고하여 세팅한거라 몇몇 의존성이나 설정은 없어도 될수도 있지만 거의 필요한거 같습니다. 그 외에 오류나 추적하는거는 동일하게 동작하는거 같습니다! 혹시 누군가 도움이 되시길!

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
이북자 댓글 2 좋아요 7 조회수 1264

CH02_ 가상환경 활성화 안되는 이유

미해결

초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지

가상환경 활성화 코드를 입력해도 앞에 (ch02_env)가 안나오는데 이래도 괜찮은건가요?

  • python
  • 챗봇
  • streamlit
  • openai
  • chatgpt
pcokgo 댓글 3 좋아요 1 조회수 924

주피터 익스텐션 다운로드 문제 질문입니다!

미해결

공공데이터로 파이썬 데이터 분석 시작하기

Jupyter command jupyter-contrib not found. 지금 이 오류가 떠서 설치가 안되고 있는데요. 어떻게 해결해야 할까요?? 제가 봤을땐, pip install jupyter_contrib_nbextensions 이 부분은 실행이 되는데 jupyter contrib nbextension 이 부분에서 오류가 생기는 것 같습니다. ㅠㅠ

  • python
  • pandas
  • numpy
1whstudy 댓글 1 좋아요 0 조회수 893

스케줄링과 관련된 질문입니다.

미해결

Airflow 마스터 클래스

섹션3, 첫번째 강의에서 스케줄에 관한 질문입니다. 강의에서, start_date = 2023.1.1 schedule = "30 6 * * * " next_run = 2023 03 18 6:30 그리고 현재 날짜는 2023 03 19 인것으로 봤는데, next_run이 현재날짜보다 뒤에 있으니 pause -> unpause 를 하게되면 자동실행이 안되어야 하는거 아닌가요? 강의에서는 자동으로 실행되는것으로 봐서요. 감사합니다.

  • python
  • 데이터-엔지니어링
  • airflow
Hyeonghwan Kwon 댓글 1 좋아요 1 조회수 268

4.4 클래스의 정의와 호출 parr2 강의 중 attribute 초기화 부분 질문

해결됨

문과생도, 비전공자도, 누구나 배울 수 있는 파이썬(Python)!

클래스 정의하고 호출하면 42번 줄에 player1에 해당하는 height와 weight의 값이 둘 다 나와야 하는데 저는 한가지 값만 출력이 됩니다. weight를 지우고 height 값만 쓰면 height값이 출력되고 둘다 쓰면 height값은 안나오고 weight값만 출력이 되는데 왜 이런 걸까요?

  • python
ㅊㅌㅎ 댓글 1 좋아요 1 조회수 185

Custom Filter 적용2 수강중인데 CustomFilter클래스 apply가 호출이 안되네요.

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

CustomFilter 클래스는 기동될 때 로그로 찍어서 확인했는데 생성은 되는데 apply 함수가 호출이 안되네요. first ,second, apigateway 프로젝트 재빌드를 해도 호출이 안되네요. pre, post filter log가 호출이 안되는 이유가 무엇인가요? CustomFilter.java @Component @Slf4j public class CustomFilter extends AbstractGatewayFilterFactory<CustomFilter.Config> { public CustomFilter(){ super(Config.class); log.info("TEST TEST"); } @Override public GatewayFilter apply(final Config config) { log.info(" TEST 1 TEST 2"); // Custom Pre Filter return ((exchange, chain) -> { ServerHttpRequest request = exchange.getRequest(); ServerHttpResponse response = exchange.getResponse(); log.info("Custom PRE filter : request id -> {}", request.getId()); // Custom post Filter return chain.filter( exchange ).then(Mono.fromRunnable(() -> { log.info("Custom POST filter : response code -> {}", response.getStatusCode()); })); }) ; } public static class Config{ // put the configuration properties } } application.yml server: port: 8000 eureka: client: register-with-eureka: false fetch-registry: false service-url: defaultZone: http://localhost:8761/eureka spring: application: name: apigateway-service cloud: gateway: mvc: routes: - id: first-service uri: http://localhost:8081 predicates: - Path= /first-service/** filters: # - AddRequestHeader=first-request, first-request-header2 # - AddResponseHeader=first-response, first-response-header2 - CustomFilter - id: second-service uri: http://localhost:8082 predicates: - Path= /second-service/** filters: # - AddRequestHeader=second-request, second-request-header2 # - AddResponseHeader=second-response, second-response-header2 - CustomFilter apigateway 로그 2023-12-31T01:50:27.862+09:00 WARN 2068 --- [apigateway-service] [ main] trationDelegate$BeanPostProcessorChecker : Bean 'reactorDeferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [loadBalancerWebClientBuilderBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies. 2023-12-31T01:50:28.212+09:00 INFO 2068 --- [apigateway-service] [ main] c.e.a.Filter.CustomFilter : TEST TEST 2023-12-31T01:50:28.216+09:00 INFO 2068 --- [apigateway-service] [ main] c.e.a.Filter.GlobalFilter : TEST TEST 2023-12-31T01:50:29.192+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [After] 2023-12-31T01:50:29.192+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Before] 2023-12-31T01:50:29.192+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Between] 2023-12-31T01:50:29.192+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Cookie] 2023-12-31T01:50:29.192+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Header] 2023-12-31T01:50:29.192+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Host] 2023-12-31T01:50:29.192+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Method] 2023-12-31T01:50:29.193+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Path] 2023-12-31T01:50:29.193+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Query] 2023-12-31T01:50:29.193+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [ReadBody] 2023-12-31T01:50:29.193+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [RemoteAddr] 2023-12-31T01:50:29.193+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [XForwardedRemoteAddr] 2023-12-31T01:50:29.193+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [Weight] 2023-12-31T01:50:29.193+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.g.r.RouteDefinitionRouteLocator : Loaded RoutePredicateFactory [CloudFoundryRouteService] 2023-12-31T01:50:29.564+09:00 INFO 2068 --- [apigateway-service] [ main] DiscoveryClientOptionalArgsConfiguration : Eureka HTTP Client uses RestTemplate. 2023-12-31T01:50:29.922+09:00 WARN 2068 --- [apigateway-service] [ main] iguration$LoadBalancerCaffeineWarnLogger : Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath. 2023-12-31T01:50:29.956+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.n.eureka.InstanceInfoFactory : Setting initial instance status as: STARTING 2023-12-31T01:50:30.008+09:00 INFO 2068 --- [apigateway-service] [ main] com.netflix.discovery.DiscoveryClient : Initializing Eureka in region us-east-1 2023-12-31T01:50:30.009+09:00 INFO 2068 --- [apigateway-service] [ main] com.netflix.discovery.DiscoveryClient : Client configured to neither register nor query for data. 2023-12-31T01:50:30.019+09:00 INFO 2068 --- [apigateway-service] [ main] com.netflix.discovery.DiscoveryClient : Discovery Client initialized at timestamp 1703955030017 with initial instances count: 0 2023-12-31T01:50:30.024+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application APIGATEWAY-SERVICE with eureka with status UP 2023-12-31T01:50:30.314+09:00 INFO 2068 --- [apigateway-service] [ main] o.s.b.web.embedded.netty.NettyWebServer : Netty started on port 8000 2023-12-31T01:50:30.320+09:00 INFO 2068 --- [apigateway-service] [ main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8000 2023-12-31T01:50:30.708+09:00 INFO 2068 --- [apigateway-service] [ main] c.e.a.ApigatewayServiceApplication : Started ApigatewayServiceApplication in 5.877 seconds (process running for 6.826)

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
닉네임_한글 가능 댓글 1 좋아요 0 조회수 400

apigateway-service netty 서버 실행 안됨

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

apigateway 실행할 때 netty 서버가 아니라 tomcat으로 연결이 되는데 왜 그런 건가요?? netty서버로 작동할려면 어떻게 해야되나요?

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
lsy 댓글 3 좋아요 0 조회수 1039

IIS 500.19에러

미해결

남박사의 파이썬으로 실전 웹사이트 만들기

구글로 먼저 배포 해보고 잘 되서 IIS로 배포해보려고 하는데 다음과 같이 나옵니다 handler도 Allow로 바꿨고 web.config는 그대로 복사하고 경로도 확인했는데 뭐가 문제일까요...ㅠㅜㅠ

  • python
Eddie 댓글 2 좋아요 0 조회수 675

강의자료 부탁 드립니다~

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

안녕하세요, 강의자료 부탁 드려도 될까요? fbyksong@gmail.com 입니다.

  • python
댓글 1 좋아요 0 조회수 265

어느 상황일때, MSA로 나누는 것이 더 좋은 상황인지 구체적으로 궁금합니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

auth서버와 resource서버는 서로 통신을 안하게끔 설계하는 것이 좋은가요? 서버끼리 통신할 일이 많아 보이는데, 이러면 Monolitic 방식보다 많이 느려질 것 같아서 말입니다. 그리고 authService가 userService를 사용하므로, user에 관련된 것들은 auth 서버에 넣어야 되는 건가요? 아니면 resource에다가 넣어도 되는건가요? 그리고 어지간한 서비스는 회원(user) 테이블과 관련이 있을 것 같은데(ex: TableJoin 같은 것 해야할때) , 어느정도로 서비스가 독립적이어야 Monolitic 보다 MSA가 더 나은지 궁금합니다.

  • msa
  • database
돌로스원숭숭 댓글 2 좋아요 0 조회수 391

로드 밸런싱 관련 질문

해결됨

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

안녕하세요! 강사님 로드 밸런싱 & 서버 관련 질문드립니다. Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA) 현재 저는 섹션 2 API Gateway Service 까지 강의를 진행한 상태입니다. 현업에서는 해당 강의에서 나와있는 것처럼 어플리케이션 단에서의 로드 밸런싱 구현을 많이 하나요? 아니라면 현업에서는 어떠한 방법으로 자주 사용하여 구현을 하나요? 어떤 상황에서 어플리케이션 단에서의 로드 밸런싱 구현을 하나요? 트래픽 분산을 목적으로 로드 밸런싱을 사용하기 위해 여러 개의 어플리케이션 인스턴스들을 서버에 올린다고 하였을 때 현업에서는 어떻게 관리하나요? AWS EC2 기준으로 설명해주시면 좋을 것 같습니다! 읽어주셔서 감사합니다(__)

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
kjww9807 댓글 1 좋아요 1 조회수 309

docker network ip 대역 질문

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

docker network 지정 시 해당 network내에서 할당되는 ip 대역에 서비스 ip가 순차적으로 할당되는 것 같은데요, kafka같은 경우는 그 대역에서 직접 ip하나를 지정해서 사용하고 서비스에서도 그 kafka ip를 하드코딩으로 직접 지정해두는데, 환경에 따라 network ip 대역이 변경될 일은 없는건가요? docker container 네트워크 스펙인지 궁금합니다.

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
이무 댓글 1 좋아요 1 조회수 285

kafka docker 사용 질문

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

질문이 있습니다. Local에 kafka를 직접 설치한 경우 kafka connect를 위해 jdbc connector 경로 지정 등 작업이 필요했던 것 같은데 docker compose로 구동시킬 때는 이러한 작업에 대한 지정이 필요 없는건가요??

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
이무 댓글 1 좋아요 0 조회수 297

오류 메세지

미해결

실전 프로젝트로 배우는 데이터 앱 만들기 with Python & Streamlit

안녕하세요~~ 루비네 코딩 입니다 ^^ 최근 앱을 런칭할 때 다음과 같은 오류가 발생하고 있습니다. ModuleNotFoundError: No module named 'altair.vegalite.v4' 이런경우, 다음과 같이 altair 패키지의 버전을 바꾸어 설치해 주세요 ^^ 감사합니다~ pip uninstall altair pip install altair==4.2.2

  • python
  • streamlit
루비네 코딩 댓글 2 좋아요 1 조회수 919

안녕하세요 강사님 질문있습니다!

해결됨

장애 없는 서비스를 만들기 위한 Resilience4j - CircuitBreaker

제 프로젝트에선 smtp프로토콜로 gmail을 전송하고 있습니다. 앞의 강의를 몇개 듣다보니 retry로 일시적인 지연은 어느정도 해결될수있을것 같은데, 만약 gmail서버에 큰 장애가 난다면 모든 요청들이 retry회수를 꽉 채우게 되어 트래픽이 몰린다면 많은 retry가 쌓여 네트워크에 부담을 줄수있는 상황이 발생할수도 있을 것 같습니다. (물론 개인프로젝트에서 gmail서버의 지연이나 장애까지 고려하는게 조금 너무간것 아닌가 싶기도합니다 ㅠ) 1. 위의 문제를 해결해보기위해 써킷브레이커라는 개념을 이용해 해결해볼수있다 라고 이해했는데 맞을까요? 2. 만약 위 개념을 도입하지않는다면 retry 회수를 줄이고, 아래와같이 보조(?) 메일서버를 두는것도 방법이 될수있을까요? 아니면 더 좋은방법이 어떤것들이 있는지 궁금합니다! try { sendEmailWithSMTP(); } catch (SMTPException smtpException) { log.error("primary 메일서버 전송실패", smtpException); try { sendEmailWithNaver(); } catch (NaverMailException naverMailException) { log.error("secondary 메일서버 전송실패 ", naverMailException); } } 3. 저는 취준생인데 이미 앞강의만 듣고도 좋은 키워드들과 방법들의 존재를 알았다는것만으로 수확을 거뒀다고 생각합니다. 뒷강의를 끝까지 듣고 제가 구현해봐도 될지.. 아니면 아직은 이런것도 있구나 하는정도 스탠스를 추천하시는지 궁금합니다.

  • spring-boot
  • msa
  • circuit-breaker
  • resilience4j
댓글 2 좋아요 1 조회수 315

직접 어플리케이션 서버에 요청을 보내면 동작하는데, gateway 서버로 보내면 404가 뜹니다

해결됨

Java 마이크로서비스(MSA) 프로젝트 실습

config-server / eureka-server / gateway-server / 그리고 item-service-server 대신에 제가 만드는 rms라는 애플리케이션 서버를 띄웠습니다. 게이트웨이 서버를 통해서 http 요청을 보내면 404가 뜨고 직접 애플리케이션 서버로 요청을 보내면 잘 동작하는 상태입니다. 그래서 config-server의 gateway-server-local.yml 파일에서 spring.cloud .gateway 부분에 문제가 있을거라 추측하고 계속 찾아봤는데... 어떻게 변경해야 할지.. 잘 모르겠어서 질문드립니다. 일단 파일 전체를 공유하겠습니다. config-server resources.application.yml spring: application: name: config-server profiles: active: native cloud: config: server: native: search-locations: classpath:/config encrypt: enabled: false server: port: 8080 resources.bootstrap.yml encrypt: key: IRON0000 resources.config.eureka-server-local.yml logging: file: name: logs/eureka.log max-size: 500MB max-history: 10 level: root: info org.com.iron.eureka-server: debug spring: application: name: eureka-server server: port: 8761 eureka: instance: hostname: eureka-server client: serviceUrl: defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ register-with-eureka: false fetch-registry: false management: endpoints: web: exposure: include: "*" resources.config.gateway-server-local.yml logging: file: name: logs/gateway-local.log max-size: 500MB max-history: 10 level: root: info org.hibernate.SQL: debug # org.hibernate.type: trace spring: application: name: gateway-server cloud: gateway: routes: - id: rms uri: lb://rms eureka: instance: prefer-ip-address: true client: register-with-eureka: true fetch-registry: true service-url: defaultZone: http://localhost:8761/eureka resources.config.rms.yml logging: file: name: logs/api.log max-size: 500MB max-history: 10 level: root: info org.hibernate.SQL: debug # org.hibernate.type: trace spring: datasource: url: jdbc:h2:tcp://localhost/~/server-iron username: sa password: driver-class-name: org.h2.Driver jpa: hibernate: ddl-auto: none properties: hibernate: show_sql: true format_sql: true default_batch_fetch_size: 1000 #최적화 옵션 mybatis: mapper-locations: mybatis/mappers/*.xml springdoc: default-consumes-media-type: application/json default-produces-media-type: application/json swagger-ui: operations-sorter: alpha disable-swagger-default-url: true display-query-params-without-oauth2: true resources.config.rms-local.yml logging: file: name: logs/rms-local3.log max-size: 500MB max-history: 10 level: root: info org.hibernate.SQL: debug # org.hibernate.type: trace spring: datasource: url: jdbc:h2:tcp://localhost/~/server-iron username: sa password: '{cipher}' driver-class-name: org.h2.Driver jpa: hibernate: ddl-auto: none properties: hibernate: show_sql: true format_sql: true default_batch_fetch_size: 1000 #최적화 옵션 mybatis: mapper-locations: mybatis/mappers/*.xml springdoc: default-consumes-media-type: application/json default-produces-media-type: application/json swagger-ui: operations-sorter: alpha disable-swagger-default-url: true display-query-params-without-oauth2: true token: expiration_time: 86400000 secret: IRON0000 eureka: instance: instance-id: ${spring.cloud.client.hostname}:${spring.application.instance_id:${random.value}} prefer-ip-address: true client: register-with-eureka: true fetch-registry: true service-url: defaultZone: http://localhost:8761/eureka eureka-server.yml resources.bootstrap.yml spring: application: name: eureka-server profiles: active: local cloud: config: uri: http://localhost:8080 loadbalancer: ribbon: enabled: false gateway-server resources.bootstrap.yml server: port: 8070 spring: application: name: gateway-server profiles: active: local cloud: config: uri: http://localhost:8080 loadbalancer: ribbon: enabled: false management: endpoints: web: exposure: include: refresh, health, beans rms resources.bootstrap.yml server: port: 0 spring: application: name: rms profiles: active: local cloud: config: uri: http://localhost:8080 loadbalancer: ribbon: enabled: false refresh: extra-refreshable: com.zaxxer.hikari.HikariDataSource management: endpoints: web: exposure: include: refresh, health, beans build.gradle 파일들도 올려야할까요...

  • java
  • spring
  • rest-api
  • spring-boot
  • msa
김병철 댓글 5 좋아요 0 조회수 1706

혹시 이 강의도 업데이트 예정에 있을까요?

해결됨

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

로드맵 따라서 공부하고 있는데, 첫번째 강의처럼 이번 강의도 스프링 부트 3.x대로 업데이트 예정이 있는지 궁금합니다! 언제쯤 업데이트가 될지 알고싶어요..!

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
효선 댓글 1 좋아요 0 조회수 487

consumer가 작동하지 않습니다

해결됨

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

consumer를 실행시키면 WARN [Consumer clientId=console-consumer, groupId=console-consumer-83590] Error while fetching metadata with correlation id 2 : {my_topic_users=LEADER_NOT_AVAILABLE} (org.apache.kafka.clients.NetworkClient) 이게 뜨고 이후에 데이터베이스에 데이터를 넣어도 아무것도 뜨지 않습니다. http://localhost:8083/connectors/my-source-connect/status 실행시키면 이렇게 나옵니다. { "name": "my-source-connect", "connector": { "state": "FAILED", "worker_id": "", "trace": "org.apache.kafka.connect.errors.ConnectException: java.sql.SQLInvalidAuthorizationSpecException: Could not connect to address=(host=localhost)(port=3307)(type=master) : GSS-API authentication exception\r\n\tat io.confluent.connect.jdbc.util.CachedConnectionProvider.getConnection(CachedConnectionProvider.java:59)\r\n\tat io.confluent.connect.jdbc.JdbcSourceConnector.start(JdbcSourceConnector.java:94)\r\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doStart(WorkerConnector.java:193)\r\n\tat org.apache.kafka.connect.runtime.WorkerConnector.start(WorkerConnector.java:218)\r\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:363)\r\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doTransitionTo(WorkerConnector.java:346)\r\n\tat org.apache.kafka.connect.runtime.WorkerConnector.doRun(WorkerConnector.java:146)\r\n\tat org.apache.kafka.connect.runtime.WorkerConnector.run(WorkerConnector.java:123)\r\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)\r\n\tat java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)\r\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\r\n\tat java.base/java.lang.Thread.run(Thread.java:842)\r\nCaused by: java.sql.SQLInvalidAuthorizationSpecException: Could not connect to address=(host=localhost)(port=3307)(type=master) : GSS-API authentication exception\r\n\tat org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:66)\r\n\tat org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:192)\r\n\tat org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1392)\r\n\tat org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:635)\r\n\tat org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150)\r\n\tat org.mariadb.jdbc.Driver.connect(Driver.java:89)\r\n\tat java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)\r\n\tat java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190)\r\n\tat io.confluent.connect.jdbc.dialect.GenericDatabaseDialect.getConnection(GenericDatabaseDialect.java:250)\r\n\tat io.confluent.connect.jdbc.util.CachedConnectionProvider.newConnection(CachedConnectionProvider.java:80)\r\n\tat io.confluent.connect.jdbc.util.CachedConnectionProvider.getConnection(CachedConnectionProvider.java:52)\r\n\t... 12 more\r\nCaused by: java.sql.SQLException: GSS-API authentication exception\r\n\tat org.mariadb.jdbc.internal.com.send.authentication.gssapi.StandardGssapiAuthentication.authenticate(StandardGssapiAuthentication.java:169)\r\n\tat org.mariadb.jdbc.internal.com.send.authentication.SendGssApiAuthPacket.process(SendGssApiAuthPacket.java:133)\r\n\tat org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authenticationHandler(AbstractConnectProtocol.java:752)\r\n\tat org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:553)\r\n\tat org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1387)\r\n\t... 20 more\r\nCaused by: javax.security.auth.login.LoginException: No LoginModules configured for Krb5ConnectorContext\r\n\tat java.base/javax.security.auth.login.LoginContext.init(LoginContext.java:269)\r\n\tat java.base/javax.security.auth.login.LoginContext.<init>(LoginContext.java:357)\r\n\tat org.mariadb.jdbc.internal.com.send.authentication.gssapi.StandardGssapiAuthentication.authenticate(StandardGssapiAuthentication.java:117)\r\n\t... 24 more\r\n" }, "tasks": [], "type": "source" } 강사님이 올려주신 카프카 파일을 사용했어요. 당연하겠지만 이후 sink나 DB연동 강의 따라해도 전혀 작동하지 않습니다..

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
흑후추 댓글 2 좋아요 0 조회수 704

섹션 2.API Gateway Service 중 Spring Cloud Gateway-프로젝트 생성 부분 중 수행이 안됩니다.

해결됨

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

강의와 똑같이 수행했다고 생각은 하는데, http://localhost:8081/first-service/welcome과 localhost:8082/second-service/welcome 를 개별적으로 호출했을 떄는 문제 없이 호출됩니다. 그런데 http://localhost:8000/first-service/welcome을 호출하면 404로 문구가 나오네요. 강의를 계속 봤는데 다른 부분 찾기가 어렵네요. 어느 부분에서 오류가 났는지 확인이 가능할까요? firstController.java import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/first-service") public class FirstServiceController { /* RequestMapping과 GetMapping이 조합이 되어서 호출됨 */ @GetMapping("/welcome") public String welcome(){ return "Welcome to the First service"; } } secondController.java @RestController @RequestMapping("/second-service") public class SecondServiceController { /* RequestMapping과 GetMapping이 조합이 되어서 호출됨 */ @GetMapping("/welcome") public String welcome(){ return "Welcome to the Second service"; } } apigateway-service 프로젝트의 pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.4.2</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.example</groupId> <artifactId>apigateway-service</artifactId> <version>0.0.1-SNAPSHOT</version> <name>apigateway-service</name> <description>Demo project for Spring Boot</description> <properties> <java.version>17</java.version> <spring-cloud.version>2023.0.0</spring-cloud.version> </properties> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway-mvc</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <excludes> <exclude> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </exclude> </excludes> </configuration> </plugin> </plugins> </build> </project> apigateway-service 프로젝트의 application.yml server: port: 8000 eureka: client: register-with-eureka: false fetch-registry: false service-url: defaultZone : http://localhost:8761/eureka Spring: application: name: apigateway-service cloud: gateway: routes: - id: first-service url: http://localhost:8081/ predicates: - Path=/first-service/** - id: second-service url: http://localhost:8082/ predicates: - Path=/second-service/**

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
  • rabbitmq
닉네임_한글 가능 댓글 2 좋아요 0 조회수 1709

인기 태그

인프런 TOP Writers

주간 인기글