12345678910111213141516171819202122232425 |
- package com.sf.controller;
- import com.sf.service.RedisService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- public class RedisController {
- @Autowired
- private RedisService redisService;
- @GetMapping("/seckill")
- public String seckill() {
- return "success";
- }
- // http://localhost:8080/init
- @GetMapping("/init")
- public String init() {
- redisService.init();
- return "success";
- }
- }
|