mirror of
https://github.com/qiurunze123/miaosha.git
synced 2023-11-19 22:41:03 +08:00
maven 隔离 --- 讲解和说明!
This commit is contained in:
parent
87c7ac9ca9
commit
d94fe1b6bf
13
.idea/libraries/Maven__org_projectlombok_lombok_1_18_2.xml
Normal file
13
.idea/libraries/Maven__org_projectlombok_lombok_1_18_2.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="Maven: org.projectlombok:lombok:1.18.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.2/lombok-1.18.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.2/lombok-1.18.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.2/lombok-1.18.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
1273
.idea/workspace.xml
1273
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
|
@ -127,3 +127,12 @@ redis的数量不是库存,他的作用仅仅只是为了阻挡多余的请求
|
|||
本文使用的是注解方法开发所以不做过多解释<br>
|
||||
下面仔细讲解以下如何详细使用xml开发在目录里面有一个与本文无挂的类似于微信自动回复的功能br>
|
||||
里面有mybatis的全部解析和用法,大家可以简单的当做一个demo来使用<br>
|
||||
|
||||
### maven 隔离
|
||||
|
||||
maven隔离就是在开发中,把各个环境的隔离开来,一般分为
|
||||
本地(local)
|
||||
开发(dev)
|
||||
测试(test)
|
||||
线上(prod)
|
||||
在环境部署中为了防止人工修改的弊端! spring.profiles.active=@activatedProperties@
|
12
pom.xml
12
pom.xml
|
@ -169,7 +169,7 @@
|
|||
<directory>src/main/resources</directory> <!--这里对应项目存放配置文件的目录--> <!--开启filtering功能 -->
|
||||
<filtering>true</filtering>
|
||||
<excludes>
|
||||
<exclude>application.properties</exclude>
|
||||
<exclude>application-local.properties</exclude>
|
||||
<exclude>application-dev.properties</exclude>
|
||||
<exclude>application-prod.properties</exclude>
|
||||
<exclude>application-test.properties</exclude>
|
||||
|
@ -194,14 +194,20 @@
|
|||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<id>local</id>
|
||||
<properties> <!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||
<activatedProperties>dev</activatedProperties>
|
||||
<activatedProperties>local</activatedProperties>
|
||||
</properties>
|
||||
<activation> <!-- 默认环境 -->
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<properties> <!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||
<activatedProperties>dev</activatedProperties>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>test</id>
|
||||
<properties>
|
||||
|
|
|
@ -16,7 +16,7 @@ mybatis.mapperLocations=classpath:mybatis/mapper/*.xml
|
|||
#add mybatis
|
||||
mybatis.config-locations=classpath:mybatis/config.xml
|
||||
#datasource
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/qiurunze?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/miaosha?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=aixiyue11
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
|
@ -67,5 +67,6 @@ spring.rabbitmq.template.retry.initial-interval=1000
|
|||
spring.rabbitmq.template.retry.max-attempts=3
|
||||
spring.rabbitmq.template.retry.max-interval=10000
|
||||
spring.rabbitmq.template.retry.multiplier=1.0
|
||||
|
||||
## maven隔离
|
||||
server.port=8003
|
||||
## maven隔离
|
||||
spring.profiles.active=@activatedProperties@
|
|
@ -68,4 +68,6 @@ spring.rabbitmq.template.retry.max-attempts=3
|
|||
spring.rabbitmq.template.retry.max-interval=10000
|
||||
spring.rabbitmq.template.retry.multiplier=1.0
|
||||
|
||||
## maven隔离
|
||||
## maven隔离
|
||||
|
||||
spring.profiles.active=@activatedProperties@
|
|
@ -68,4 +68,6 @@ spring.rabbitmq.template.retry.max-attempts=3
|
|||
spring.rabbitmq.template.retry.max-interval=10000
|
||||
spring.rabbitmq.template.retry.multiplier=1.0
|
||||
|
||||
## maven隔离
|
||||
## maven隔离
|
||||
|
||||
spring.profiles.active=@activatedProperties@
|
|
@ -51,6 +51,8 @@ redis.password=123456
|
|||
redis.poolMaxTotal=1000
|
||||
redis.poolMaxIdle=500
|
||||
redis.poolMaxWait=500
|
||||
#server.port=8003
|
||||
|
||||
#rabbitmq
|
||||
spring.rabbitmq.host=localhost
|
||||
spring.rabbitmq.port=5672
|
||||
|
@ -69,4 +71,4 @@ spring.rabbitmq.template.retry.max-interval=10000
|
|||
spring.rabbitmq.template.retry.multiplier=1.0
|
||||
|
||||
## maven隔离
|
||||
pring.profiles.active=@activatedProperties@
|
||||
spring.profiles.active=dev
|
|
@ -51,6 +51,8 @@ redis.password=123456
|
|||
redis.poolMaxTotal=1000
|
||||
redis.poolMaxIdle=500
|
||||
redis.poolMaxWait=500
|
||||
#server.port=8003
|
||||
|
||||
#rabbitmq
|
||||
spring.rabbitmq.host=localhost
|
||||
spring.rabbitmq.port=5672
|
||||
|
@ -69,4 +71,4 @@ spring.rabbitmq.template.retry.max-interval=10000
|
|||
spring.rabbitmq.template.retry.multiplier=1.0
|
||||
|
||||
## maven隔离
|
||||
pring.profiles.active=test
|
||||
spring.profiles.active=dev
|
Loading…
Reference in New Issue
Block a user