-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDemoController.java
38 lines (34 loc) · 981 Bytes
/
DemoController.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.example.seckilldemo.controller;
import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* 测试类
*
* @author: LC
* @date 2022/3/1 4:22 下午
* @ClassName: DemoController
*/
@Controller
@RequestMapping("demo")
@Api(value = "demo", tags = "demo测试类")
public class DemoController {
/**
* 测试页面
*
* @param model
* @return java.lang.String
* @author LC
* @operation add
* @date 4:25 下午 2022/3/1
**/
@RequestMapping(value = "/hello", method = RequestMethod.GET)
public String hello(Model model) {
model.addAttribute("name", "example");
return "hello";
}
}