inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

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

데이터 동기화 문제 ②

user-service h2-console연결이 안됨

1213

seonjun Moon

작성한 질문수 35

0

위 사진을 보면 user-service가 분명 떠잇어서 들어가서... 설정한 데로 접속을 하는데 안되는겁니다...

근데 왜 안되는지 모르겟네요...

user-service project에 application.yml 파일 설정도 동일하게 해준거 같은데

 

애초에 비밀번호가 맞고 안맞고를 떠나서 not found 가 떠버리는데... 무엇을 놓친지 모르겟습니다.

 

server:
  port: 0
spring:
  config:
    import:
      - classpath:/bootstrap.yml
  application:
    name: user-service
  rabbitmq:
    host: 127.0.0.1
    port: 5672
    username: guest
    password: guest
  h2:
    console:
      enabled: true
      settings:
        web-allow-others: true
      path: /h2-console
  datasource:
    driver-class-name: org.h2.Driver
    url: jdbc:h2:mem:testdb
    username: sa
    password:
  jpa:
    database-platform: org.hibernate.dialect.H2Dialect
    open-in-view: false
    hibernate:
      ddl-auto: create-drop
    properties:
      hibernate:
#        show_sql: true
        format_sql: true
eureka:
  instance:
    instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}}
  client:
    register-with-eureka: true
    fetch-registry: true
    service-url:
      defaultZone: http://127.0.0.1:8761/eureka

greeting:
  message: Welcome to the Simple E-commerce.

logging:
  level:
    com.example.userservice.client: DEBUG

management:
  endpoints:
    web:
      exposure:
        include: refresh, health, beans, busrefresh

#token:
#  expiration_time: 86400000
#  secret: user_token

spring-boot architecture spring-cloud JPA msa Kafka

답변 1

1

Dowon Lee

안녕하세요, 이도원입니다.

1) pom.xml 파일에 설정하신 h2의 버전을 확인해 보시기 바랍니다. 강의에 사용한 버전 h2 1.3.176이었습니다.

2) h2를 최신거로 사용하신 경우에는 아래의 설정과 pom.xml 파일에 내용을 확인하시고 추가해 보시기 바랍니다.

spring:
  h2:
    console:
      enabled: true
      settings:
        web-allow-others: true
      path: /h2-console
  datasource:
    driver-class-name: org.h2.Driver
    url: jdbc:h2:mem:testdb
    username: sa
    password:
    generate-unique-name: false
    name: testdb
<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

감사합니다.

kafka 업데이트 강의 듣고 시포요

0

83

1

강의 교안

0

71

1

마이크로서비스간 통신 시, 인증 처리

0

79

1

api gateway 에서 인증 처리

0

64

1

섹션 19 질문드립니다

0

51

1

강의 자료 업데이트

0

81

1

부하분산 강의 섹션

0

56

1

강의자료는 어디에서?

0

69

1

강의 자료는 어디서 다운 받을 수 있나요?

0

109

1

전체 사용자 조회시 오류

0

57

1

혹시 pk 외 별도의 id 를 부여한 이유가 있을까요 ??

0

108

2

학습 방향

0

94

2

카프카 커넥터 사용 목적 문의

0

85

2

kafka 강의

0

106

2

서비스 디스커버리 종류

0

86

2

강의 자료에 대해서 궁금해요

0

115

2

GlobalFilter, LoggingFilter가 동작하지 않습니다.

0

89

2

Kafka Source Connect 버전 에러

0

83

2

소스커넥터는 사용안한 거 맞죠?

0

81

2

강의자료 업데이트 문의

0

94

2

강의에서 BCryptPasswordEncoder 에 역할(5-2)

0

56

1

강의 업데이트 계획이 궁금합니다.

0

111

2

MSA 애플리케이션에 Spring Web과 Spring Data JPA를 사용하는 것이 바람직한지 궁금합니다. (MSA 설계와 관련된 질문입니다)

0

160

2

어떤 것이 업데이트 된 건가요?

0

162

2