Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
晶之木
miaosha
提交
d94fe1b6
M
miaosha
项目概览
晶之木
/
miaosha
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
miaosha
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d94fe1b6
编写于
10月 27, 2018
作者:
Q
qiurunze123
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
maven 隔离 --- 讲解和说明!
上级
87c7ac9c
变更
9
展开全部
显示空白变更内容
内联
并排
Showing
9 changed file
with
743 addition
and
331 deletion
+743
-331
.idea/libraries/Maven__org_projectlombok_lombok_1_18_2.xml
.idea/libraries/Maven__org_projectlombok_lombok_1_18_2.xml
+13
-0
.idea/workspace.xml
.idea/workspace.xml
+696
-321
README.md
README.md
+9
-0
pom.xml
pom.xml
+9
-3
src/main/resources/application-dev.properties
src/main/resources/application-dev.properties
+4
-3
src/main/resources/application-prod.properties
src/main/resources/application-prod.properties
+3
-1
src/main/resources/application-test.properties
src/main/resources/application-test.properties
+3
-1
src/main/resources/application.properties
src/main/resources/application.properties
+3
-1
target/classes/application.properties
target/classes/application.properties
+3
-1
未找到文件。
.idea/libraries/Maven__org_projectlombok_lombok_1_18_2.xml
0 → 100644
浏览文件 @
d94fe1b6
<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>
\ No newline at end of file
.idea/workspace.xml
浏览文件 @
d94fe1b6
此差异已折叠。
点击以展开。
README.md
浏览文件 @
d94fe1b6
...
...
@@ -127,3 +127,12 @@ redis的数量不是库存,他的作用仅仅只是为了阻挡多余的请求
本文使用的是注解方法开发所以不做过多解释
<br>
下面仔细讲解以下如何详细使用xml开发在目录里面有一个与本文无挂的类似于微信自动回复的功能br>
里面有mybatis的全部解析和用法,大家可以简单的当做一个demo来使用
<br>
### maven 隔离
maven隔离就是在开发中,把各个环境的隔离开来,一般分为
本地(local)
开发(dev)
测试(test)
线上(prod)
在环境部署中为了防止人工修改的弊端! spring.profiles.active=@activatedProperties@
\ No newline at end of file
pom.xml
浏览文件 @
d94fe1b6
...
...
@@ -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>
...
...
src/main/resources/application-dev.properties
浏览文件 @
d94fe1b6
...
...
@@ -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
server.port
=
8003
## maven隔离
spring.profiles.active
=
@activatedProperties@
\ No newline at end of file
src/main/resources/application-prod.properties
浏览文件 @
d94fe1b6
...
...
@@ -69,3 +69,5 @@ spring.rabbitmq.template.retry.max-interval=10000
spring.rabbitmq.template.retry.multiplier
=
1.0
## maven隔离
spring.profiles.active
=
@activatedProperties@
\ No newline at end of file
src/main/resources/application-test.properties
浏览文件 @
d94fe1b6
...
...
@@ -69,3 +69,5 @@ spring.rabbitmq.template.retry.max-interval=10000
spring.rabbitmq.template.retry.multiplier
=
1.0
## maven隔离
spring.profiles.active
=
@activatedProperties@
\ No newline at end of file
src/main/resources/application.properties
浏览文件 @
d94fe1b6
...
...
@@ -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@
\ No newline at end of file
spring.profiles.active
=
dev
\ No newline at end of file
target/classes/application.properties
浏览文件 @
d94fe1b6
...
...
@@ -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
\ No newline at end of file
spring.profiles.active
=
dev
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录