mirror of https://github.com/jeecgboot/jeecg-boot
微服务优化
parent
67d8cdbc6c
commit
e89423c666
|
@ -1,10 +1,13 @@
|
||||||
package com.alibaba.nacos;
|
package com.alibaba.nacos;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nacos 启动类
|
* Nacos 启动类
|
||||||
|
@ -34,4 +37,16 @@ public class JeecgNacosApplication {
|
||||||
System.setProperty("server.port","8848");
|
System.setProperty("server.port","8848");
|
||||||
SpringApplication.run(JeecgNacosApplication.class, args);
|
SpringApplication.run(JeecgNacosApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认跳转首页
|
||||||
|
*
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/")
|
||||||
|
public String index(Model model, HttpServletResponse response) {
|
||||||
|
// 视图重定向 - 跳转
|
||||||
|
return "/nacos";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
package com.alibaba.nacos.control;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.Model;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 积木报表-设置默认首页跳转
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
public class IndexController {
|
|
||||||
private Logger logger = LoggerFactory.getLogger(IndexController.class);
|
|
||||||
|
|
||||||
@GetMapping("/")
|
|
||||||
public String index(Model model) {
|
|
||||||
return "/nacos"; // 视图重定向 - 跳转
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue