Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7ba4f9c7
authored
May 18, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加日志组件
1 parent
51a2005d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
20 deletions
pom.xml
src/main/java/cn/com/glsx/admin/config/WebConfig.java
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
pom.xml
View file @
7ba4f9c
...
...
@@ -24,20 +24,22 @@
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-alliance
</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.glsx</groupId>-->
<!-- <artifactId>rest-admin-kafka-ancient</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-mybatis
</artifactId>
</dependency>
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-office
</artifactId>
</dependency>
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-loggin
</artifactId>
</dependency>
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-swagger2
</artifactId>
</dependency>
<!--kafka-->
<dependency>
<groupId>
org.apache.kafka
</groupId>
...
...
@@ -78,11 +80,6 @@
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.glsx
</groupId>
<artifactId>
rest-admin-swagger2
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
...
...
src/main/java/cn/com/glsx/admin/config/WebConfig.java
View file @
7ba4f9c
...
...
@@ -21,12 +21,12 @@ public class WebConfig implements WebMvcConfigurer {
//1.加入的顺序就是拦截器执行的顺序,
//2.按顺序执行所有拦截器的preHandle
//3.所有的preHandle 执行完再执行全部postHandle 最后是postHandle
//
registry.addInterceptor(authInterceptor).addPathPatterns("/**")
//
.excludePathPatterns("/")
//
.excludePathPatterns("swagger-ui.html")
//
.excludePathPatterns("/actuator/**")
//
.excludePathPatterns("/api/**")
//
.excludePathPatterns("/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**");
registry
.
addInterceptor
(
authInterceptor
).
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/"
)
.
excludePathPatterns
(
"swagger-ui.html"
)
.
excludePathPatterns
(
"/actuator/**"
)
.
excludePathPatterns
(
"/api/**"
)
.
excludePathPatterns
(
"/swagger-resources/**"
,
"/webjars/**"
,
"/v2/**"
,
"/swagger-ui.html/**"
);
}
@Override
...
...
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
View file @
7ba4f9c
...
...
@@ -32,9 +32,9 @@ public class ElectricFenceController {
@SysLog
(
"新增围栏"
)
@PostMapping
(
value
=
"/add"
)
@ApiOperation
(
value
=
"新增围栏"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"fenceName"
,
value
=
"fenceName"
,
required
=
true
,
dataType
=
"cn.com.glsx.admin.modules.model.ElectricFenceBO"
,
paramType
=
"body"
)
})
//
@ApiImplicitParams({
//
@ApiImplicitParam(name = "fenceName", value = "fenceName", required = true, dataType = "cn.com.glsx.admin.modules.model.ElectricFenceBO", paramType = "body")
//
})
public
R
add
(
@RequestBody
@Validated
ElectricFenceBO
fenceBO
)
throws
Exception
{
electricFenceService
.
addFence
(
fenceBO
);
return
R
.
ok
();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment