Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oltinspection
Overview
Overview
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
胡懿
oltinspection
Commits
125ee580
Commit
125ee580
authored
Mar 06, 2019
by
huyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建Controller的返回
parent
8d3299d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
0 deletions
+104
-0
IndexController.java
...va/com/fhkj/oltinspection/controller/IndexController.java
+11
-0
Result.java
src/main/java/com/fhkj/oltinspection/pojo/Result.java
+93
-0
No files found.
src/main/java/com/fhkj/oltinspection/controller/IndexController.java
0 → 100644
View file @
125ee580
package
com
.
fhkj
.
oltinspection
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
value
=
"/index"
)
public
class
IndexController
{
}
\ No newline at end of file
src/main/java/com/fhkj/oltinspection/pojo/Result.java
0 → 100644
View file @
125ee580
package
com
.
fhkj
.
oltinspection
.
pojo
;
import
java.io.Serializable
;
/**
* @author 胡懿
* @see 用这个类对象作为每个controller的返回类型,返回时直接使用构造方法即可
*
*/
public
class
Result
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8216936893545820837L
;
private
Integer
code
;
private
String
msg
;
private
Object
data
;
public
Result
()
{
super
();
this
.
code
=
null
;
this
.
msg
=
""
;
this
.
data
=
null
;
}
public
Result
(
Integer
code
)
{
this
.
code
=
code
;
}
public
Result
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
Result
(
Object
data
)
{
this
.
data
=
data
;
}
public
Result
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Result
(
Integer
code
,
Object
data
)
{
this
.
code
=
code
;
this
.
data
=
data
;
}
public
Result
(
String
msg
,
Object
data
)
{
this
.
msg
=
msg
;
this
.
data
=
data
;
}
public
Result
(
Integer
code
,
String
msg
,
Object
data
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
this
.
data
=
data
;
}
/**
* @return the code
*/
public
Integer
getCode
()
{
return
code
;
}
/**
* @param code the code to set
*/
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
/**
* @return the msg
*/
public
String
getMsg
()
{
return
msg
;
}
/**
* @param msg the msg to set
*/
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
/**
* @return the data
*/
public
Object
getData
()
{
return
data
;
}
/**
* @param data the data to set
*/
public
void
setData
(
Object
data
)
{
this
.
data
=
data
;
}
@Override
public
String
toString
()
{
return
"code:"
+
this
.
code
+
", msg:"
+
this
.
msg
+
", data:"
+
this
.
data
;
}
}
\ No newline at end of file
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