Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jd-activity
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
曾水平
jd-activity
Commits
3cbe8afb
Commit
3cbe8afb
authored
May 19, 2021
by
曾水平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加心跳
parent
edda2979
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
34 deletions
+21
-34
HeartController.java
...a/cn/com/duiba/jdactivity/controller/HeartController.java
+21
-0
HelloController.java
...a/cn/com/duiba/jdactivity/controller/HelloController.java
+0
-34
No files found.
src/main/java/cn/com/duiba/jdactivity/controller/HeartController.java
0 → 100644
View file @
3cbe8afb
package
cn
.
com
.
duiba
.
jdactivity
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 心跳
*
* @author zsp (zengshuiping@duiba.com.cn)
* @date 2021/5/12 15:26
*/
@RestController
@RequestMapping
(
"/heart"
)
public
class
HeartController
{
@RequestMapping
(
""
)
public
String
heart
()
{
return
"success"
;
}
}
\ No newline at end of file
src/main/java/cn/com/duiba/jdactivity/controller/HelloController.java
deleted
100644 → 0
View file @
edda2979
package
cn
.
com
.
duiba
.
jdactivity
.
controller
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
/**
* @author zsp (zengshuiping@duiba.com.cn)
* @date 2021/5/12 15:26
*/
@Controller
@RequestMapping
(
"/hello"
)
public
class
HelloController
{
public
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
HelloController
.
class
);
@Resource
(
name
=
"stringRedisTemplate"
)
private
StringRedisTemplate
stringRedisTemplate
;
@RequestMapping
(
"/testRedis"
)
@ResponseBody
public
String
testRedis
(
String
value
)
{
LOGGER
.
info
(
"testRedis"
);
stringRedisTemplate
.
opsForValue
().
set
(
"test_key"
,
value
);
return
stringRedisTemplate
.
opsForValue
().
get
(
"test_key"
);
}
}
\ 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