Skip to content

Commit

Permalink
Create AAAAapplication.yml
Browse files Browse the repository at this point in the history
编辑不同业务环境
  • Loading branch information
leihaowen1 committed Apr 11, 2019
1 parent 174b092 commit e0a9aae
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions AAAAapplication.yml
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 #自动开启驼峰规则映射





0 comments on commit e0a9aae

Please sign in to comment.