【发布时间】:2020-05-08 11:18:41
【问题描述】:
server.port = 8080
spring.datasource.url= jdbc:mysql://192.168.99.100:3307/user_info
spring.datasource.username=root
spring.datasource.password=password
spring.jpa.hibernate.ddl-auto=update
#spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.dialect.storage_engine=innodb
spring.jpa.database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
#eureka.client.service-url.default.zone = http://localhost:8761/eureka
#eureka.client.register-with-eureka=false
#eureka.client.fetch-registry=false
#eureka.instance.hostname=localhost
我已经使用 docker 为 spring boot 应用程序创建了一个容器,并且为 mysql 创建了一个容器,但是 sboot 应用程序无法连接到 mysql 但是当我尝试在本地运行时它很容易连接,我已经把我的 application.properties 文件放好了告诉应该做什么来解决这个问题 docker 运行在 192.168.99.100
【问题讨论】:
标签: spring-boot docker