1.public.html
Title12. index1.html
Title1名称1 | 单价1 | 库存1 |
番茄1 | 1.11 | 31 |
苹果1 | 2.51 | 101 |
哈密瓜 | 2.5 | 10 |
草莓 | 2.5 | 10 |
3. index2.html
Title1名称2 | 单价2 | 库存2 |
番茄2 | 2.22 | 21 |
苹果1 | 2.51 | 101 |
哈密瓜 | 2.5 | 10 |
草莓 | 2.5 | 10 |
4.Controller package com.lulu.Controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class HelloController { @RequestMapping("index") public String goMain() { return "index"; } @RequestMapping("index1") public String goMain1() { return "index1"; } @RequestMapping("index2") public String goMain2() { return "index2"; } @RequestMapping("index3") public String goMain3() { return "index3"; } }
5. 运行效果: