Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
base-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
base-platform
Commits
9bc76098
Commit
9bc76098
authored
3 years ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改构建api文档
parent
d9fabd6f
master
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
5 deletions
+51
-5
base-manager/pom.xml
base-manager/pom.xml
+6
-0
base-manager/src/main/java/com/mortals/xhx/base/framework/config/P6spySqlFormatConfig.java
...rtals/xhx/base/framework/config/P6spySqlFormatConfig.java
+21
-0
base-manager/src/main/resources/bootstrap.yml
base-manager/src/main/resources/bootstrap.yml
+2
-1
base-manager/src/main/resources/spy.properties
base-manager/src/main/resources/spy.properties
+18
-0
base-manager/src/test/java/com/mortals/httpclient/site/SiteBusinessController.http
...a/com/mortals/httpclient/site/SiteBusinessController.http
+1
-1
base-manager/src/test/java/com/mortals/httpclient/site/SiteModelController.http
...java/com/mortals/httpclient/site/SiteModelController.http
+1
-1
pom.xml
pom.xml
+2
-2
No files found.
base-manager/pom.xml
View file @
9bc76098
...
@@ -55,6 +55,12 @@
...
@@ -55,6 +55,12 @@
<artifactId>
jjwt
</artifactId>
<artifactId>
jjwt
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
p6spy
</groupId>
<artifactId>
p6spy
</artifactId>
<version>
3.9.1
</version>
</dependency>
<dependency>
<dependency>
<groupId>
com.github.shalousun
</groupId>
<groupId>
com.github.shalousun
</groupId>
<artifactId>
smart-doc
</artifactId>
<artifactId>
smart-doc
</artifactId>
...
...
This diff is collapsed.
Click to expand it.
base-manager/src/main/java/com/mortals/xhx/base/framework/config/P6spySqlFormatConfig.java
0 → 100644
View file @
9bc76098
package
com.mortals.xhx.base.framework.config
;
import
com.mortals.framework.util.DateUtils
;
import
com.p6spy.engine.spy.appender.MessageFormattingStrategy
;
import
org.apache.commons.lang3.StringUtils
;
/**
* 自定义 p6spy sql输出格式
*
*/
public
class
P6spySqlFormatConfig
implements
MessageFormattingStrategy
{
/**
* 过滤掉定时任务的 SQL
*/
@Override
public
String
formatMessage
(
int
connectionId
,
String
now
,
long
elapsed
,
String
category
,
String
prepared
,
String
sql
,
String
url
)
{
return
StringUtils
.
isNotBlank
(
sql
)
?
DateUtils
.
getCurrStrDateTime
()
+
" | 耗时 "
+
elapsed
+
" ms | SQL 语句:"
+
StringUtils
.
LF
+
sql
.
replaceAll
(
"[\\s]+"
,
StringUtils
.
SPACE
)
+
";"
:
""
;
}
}
This diff is collapsed.
Click to expand it.
base-manager/src/main/resources/bootstrap.yml
View file @
9bc76098
...
@@ -33,7 +33,8 @@ spring:
...
@@ -33,7 +33,8 @@ spring:
max-wait
:
1000
max-wait
:
1000
datasource
:
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
driver-class-name
:
com.p6spy.engine.spy.P6SpyDriver
#driver-class-name: com.mysql.cj.jdbc.Driver
url
:
@
profiles.datasource.uri@
url
:
@
profiles.datasource.uri@
username
:
@
profiles.datasource.username@
username
:
@
profiles.datasource.username@
password
:
@
profiles.datasource.password@
password
:
@
profiles.datasource.password@
...
...
This diff is collapsed.
Click to expand it.
base-manager/src/main/resources/spy.properties
0 → 100644
View file @
9bc76098
module.log
=
com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory
# 自定义日志打印
logMessageFormat
=
com.mortals.xhx.base.framework.config.P6spySqlFormatConfig
#customLogMessageFormat=%(currentTime) | SQL耗时: %(executionTime) ms | 连接信息: %(category)-%(connectionId) | 执行语句: %(sql)
# 使用控制台记录sql
appender
=
com.p6spy.engine.spy.appender.StdoutLogger
## 配置记录Log例外
excludecategories
=
info,debug,result,batc,resultset
# 设置使用p6spy driver来做代理
deregisterdrivers
=
true
# 日期格式
dateformat
=
yyyy-MM-dd HH:mm:ss
# 实际驱动
driverlist
=
com.mysql.cj.jdbc.Driver
# 是否开启慢SQL记录
outagedetection
=
true
# 慢SQL记录标准 秒
outagedetectioninterval
=
2
\ No newline at end of file
This diff is collapsed.
Click to expand it.
base-manager/src/test/java/com/mortals/httpclient/site/SiteBusinessController.http
View file @
9bc76098
...
@@ -34,7 +34,7 @@ GET {{baseUrl}}/site/business/info?id={{SiteBusiness_id}}
...
@@ -34,7 +34,7 @@ GET {{baseUrl}}/site/business/info?id={{SiteBusiness_id}}
Accept: application/json
Accept: application/json
###站点业务编辑
###站点业务编辑
GET {{baseUrl}}/site/business/edit?id=
{{SiteBusiness_id}}
GET {{baseUrl}}/site/business/edit?id=
679
Accept: application/json
Accept: application/json
...
...
This diff is collapsed.
Click to expand it.
base-manager/src/test/java/com/mortals/httpclient/site/SiteModelController.http
View file @
9bc76098
...
@@ -14,7 +14,7 @@ POST {{baseUrl}}/site/model/save
...
@@ -14,7 +14,7 @@ POST {{baseUrl}}/site/model/save
Content-Type: application/json
Content-Type: application/json
{
{
"siteId":256
6
,
"siteId":256
2
,
"siteName":"rhbfop",
"siteName":"rhbfop",
"modelId":1041,
"modelId":1041,
"modelName":"dapxrp"
"modelName":"dapxrp"
...
...
This diff is collapsed.
Click to expand it.
pom.xml
View file @
9bc76098
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<profiles.active>
develop
</profiles.active>
<profiles.active>
develop
</profiles.active>
<profiles.server.port>
17311
</profiles.server.port>
<profiles.server.port>
17311
</profiles.server.port>
<profiles.datasource.uri>
<profiles.datasource.uri>
<![CDATA[jdbc:mysql://localhost:3306/base?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<![CDATA[jdbc:
p6spy:
mysql://localhost:3306/base?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.password>
12345678
</profiles.datasource.password>
<profiles.datasource.password>
12345678
</profiles.datasource.password>
<profiles.redis.uri>
127.0.0.1
</profiles.redis.uri>
<profiles.redis.uri>
127.0.0.1
</profiles.redis.uri>
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<profiles.active>
test
</profiles.active>
<profiles.active>
test
</profiles.active>
<profiles.server.port>
17211
</profiles.server.port>
<profiles.server.port>
17211
</profiles.server.port>
<profiles.datasource.uri>
<profiles.datasource.uri>
<![CDATA[jdbc:mysql://192.168.0.98:3306/base-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<![CDATA[jdbc:
p6spy:
mysql://192.168.0.98:3306/base-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]>
</profiles.datasource.uri>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.username>
root
</profiles.datasource.username>
<profiles.datasource.password>
nacos@2020
</profiles.datasource.password>
<profiles.datasource.password>
nacos@2020
</profiles.datasource.password>
<profiles.redis.uri>
192.168.0.252
</profiles.redis.uri>
<profiles.redis.uri>
192.168.0.252
</profiles.redis.uri>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment