1.两个需要远程调用的服务都按照以下配置进行配置
application.yml
server:
port: 9001
spring:
application:
name: user-service
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/springbootdb?useUnicode=true&characterEncoding=utf8
username: root
password: 123
mybatis:
mapper-locations: classpath:mapping/*Mapper.xml
type-aliases-package: com.zcy.entity
#配置Eureka
eureka:
client:
service-url:
defaultZone: http://localhost:9000/eureka/