Commit a95ad007e17fdb0b23fe5ad2facdc51cb1aeb0bb
1 parent
2cedf979
JeecgBoot3.2.0 版本发布 [优化微服务模块]
Showing
2 changed files
with
16 additions
and
21 deletions
jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/src/main/java/com/alibaba/nacos/JeecgNacosApplication.java
1 | 1 | package com.alibaba.nacos; |
2 | 2 | |
3 | -import org.springframework.beans.factory.annotation.Value; | |
4 | 3 | import org.springframework.boot.SpringApplication; |
5 | 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
6 | 5 | import org.springframework.boot.web.servlet.ServletComponentScan; |
7 | 6 | import org.springframework.scheduling.annotation.EnableScheduling; |
7 | +import org.springframework.ui.Model; | |
8 | +import org.springframework.web.bind.annotation.GetMapping; | |
9 | + | |
10 | +import javax.servlet.http.HttpServletResponse; | |
8 | 11 | |
9 | 12 | /** |
10 | 13 | * Nacos 启动类 |
... | ... | @@ -34,4 +37,16 @@ public class JeecgNacosApplication { |
34 | 37 | System.setProperty("server.port","8848"); |
35 | 38 | SpringApplication.run(JeecgNacosApplication.class, args); |
36 | 39 | } |
40 | + | |
41 | + /** | |
42 | + * 默认跳转首页 | |
43 | + * | |
44 | + * @param model | |
45 | + * @return | |
46 | + */ | |
47 | + @GetMapping("/") | |
48 | + public String index(Model model, HttpServletResponse response) { | |
49 | + // 视图重定向 - 跳转 | |
50 | + return "/nacos"; | |
51 | + } | |
37 | 52 | } |
... | ... |
jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/src/main/java/com/alibaba/nacos/control/IndexController.java deleted
1 | -package com.alibaba.nacos.control; | |
2 | - | |
3 | -import org.slf4j.Logger; | |
4 | -import org.slf4j.LoggerFactory; | |
5 | -import org.springframework.stereotype.Controller; | |
6 | -import org.springframework.ui.Model; | |
7 | -import org.springframework.web.bind.annotation.GetMapping; | |
8 | - | |
9 | -/** | |
10 | - * 积木报表-设置默认首页跳转 | |
11 | - */ | |
12 | -@Controller | |
13 | -public class IndexController { | |
14 | - private Logger logger = LoggerFactory.getLogger(IndexController.class); | |
15 | - | |
16 | - @GetMapping("/") | |
17 | - public String index(Model model) { | |
18 | - return "/nacos"; // 视图重定向 - 跳转 | |
19 | - } | |
20 | -} | |
21 | 0 | \ No newline at end of file |