Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
git test
MCMS
Commits
12171b12
Commit
12171b12
authored
3 years ago
by
msgroup
Browse files
Options
Download
Email Patches
Plain Diff
优化api配置
parent
3a988177
master
5.2.10
5.2.11
5.2.3
5.2.4
5.2.5
5.2.6
5.2.7
5.2.8
5.2.9
5.3.0
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
5.3.6
5.4.0
5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
test-5.2.8-patch-95856
5.4.4
5.4.3
5.4.2
5.4.1
5.4.0
5.3.6
5.3.5
5.3.4
5.3.3
5.3.1
5.2.11
5.2.10
5.2.9
5.2.8
5.2.4
5.2.3
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/mingsoft/config/SwaggerConfig.java
+5
-1
src/main/java/net/mingsoft/config/SwaggerConfig.java
with
5 additions
and
1 deletion
+5
-1
src/main/java/net/mingsoft/config/SwaggerConfig.java
+
5
-
1
View file @
12171b12
...
...
@@ -20,6 +20,7 @@
*/
package
net.mingsoft.config
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -38,10 +39,13 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@ConditionalOnProperty
(
prefix
=
"ms"
,
name
=
"swagger-enable"
,
havingValue
=
"true"
)
public
class
SwaggerConfig
{
@Value
(
"${ms.manager.path}"
)
private
String
mangerPath
;
@Bean
public
Docket
api
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
).
apiInfo
(
apiInfo
()).
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"net.mingsoft"
)).
paths
(
PathSelectors
.
any
(
))
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"net.mingsoft"
)).
paths
(
PathSelectors
.
regex
(
"^((?!("
+
mangerPath
+
"|static)).)+$"
))
.
build
();
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help