-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- #分割线 8000 定义为prod 8005端口定义dev | ||
server: | ||
port: 8000 | ||
servlet: | ||
context-path: / | ||
spring: | ||
profiles: prod #定义为生产环境 | ||
datasource: | ||
#引入druid数据源 | ||
type: com.alibaba.druid.pool.DruidDataSource | ||
driver-class-name: com.mysql.jdbc.Driver | ||
url: jdbc:mysql://127.0.0.1:3306/jtdb?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true | ||
username: root | ||
password: root | ||
application: #定义服务名称 | ||
name: provider-user | ||
eureka: | ||
client: | ||
service-url: | ||
defaultZone: http://localhost:7000/eureka,http://localhost:7001/eureka,http://localhost:7002/eureka | ||
instance: | ||
instance-id: provider-user-8000 #定义微服务的名称 | ||
prefer-ip-address: true #是否显示IP和端口 | ||
|
||
#mybatis-plush配置 | ||
mybatis-plus: | ||
type-aliases-package: com.jt.springcloud.pojo | ||
mapper-locations: classpath:/mybatis/mappers/*.xml | ||
configuration: | ||
map-underscore-to-camel-case: true #自动开启驼峰规则映射 | ||
--- #8005端口定义dev | ||
server: | ||
port: 8005 | ||
servlet: | ||
context-path: / | ||
spring: | ||
profiles: dev #定义为研发环境 | ||
datasource: | ||
#引入druid数据源 | ||
type: com.alibaba.druid.pool.DruidDataSource | ||
driver-class-name: com.mysql.jdbc.Driver | ||
url: jdbc:mysql://127.0.0.1:3306/jtdb?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true | ||
username: root | ||
password: root | ||
application: #定义服务名称 | ||
name: provider-user | ||
eureka: | ||
client: | ||
service-url: | ||
defaultZone: http://localhost:7000/eureka,http://localhost:7001/eureka,http://localhost:7002/eureka | ||
instance: | ||
instance-id: provider-user-8005 #定义微服务的名称 | ||
prefer-ip-address: true #是否显示IP和端口 | ||
|
||
#mybatis-plush配置 | ||
mybatis-plus: | ||
type-aliases-package: com.jt.springcloud.pojo | ||
mapper-locations: classpath:/mybatis/mappers/*.xml | ||
configuration: | ||
map-underscore-to-camel-case: true #自动开启驼峰规则映射 | ||
|
||
|
||
|
||
|
||
|