Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sso
Commits
b5e0e503
Commit
b5e0e503
authored
Jul 08, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
1a24f0b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
TestController.java
src/main/java/com/schneider_distributor/TestController.java
+12
-0
No files found.
src/main/java/com/schneider_distributor/TestController.java
View file @
b5e0e503
...
...
@@ -6,6 +6,7 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -14,11 +15,21 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
public
class
TestController
{
@Value
(
"${spring.profiles.active}"
)
private
String
profiles
;
@Autowired
ZMISD009SOCREATIONTask
task
;
private
void
verify
()
{
if
(
profiles
.
contains
(
"pro"
))
{
throw
new
RuntimeException
(
"测试接口已关闭"
);
}
}
@RequestMapping
(
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
list
(
HttpServletRequest
request
)
{
this
.
verify
();
StringBuffer
url
=
request
.
getRequestURL
();
System
.
out
.
println
(
url
);
Map
<
String
,
String
>
map
=
new
LinkedHashMap
<
String
,
String
>();
...
...
@@ -34,6 +45,7 @@ public class TestController {
@RequestMapping
(
value
=
{
"/009_SO_CREATION"
},
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
executeZMISD009SOCREATIONTask
()
{
this
.
verify
();
task
.
runTask
();
return
"OK"
;
}
...
...
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