自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-16 4ea00a26f7773e0ad27aeee512f34ff45fe0f18b
src/main/java/com/zy/common/web/RouterController.java
@@ -1,5 +1,7 @@
package com.zy.common.web;
import com.core.common.Cools;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -11,10 +13,13 @@
@Controller
public class RouterController {
    @Value("${spring.application.name}")
    private String applicationName;
    @RequestMapping("/")
    public void index(HttpServletResponse response) {
        try{
            String redirect = "/views/index.html";
            String redirect = Cools.isEmpty(applicationName)?"views/index.html":"/"+applicationName+"/views/index.html";
            response.sendRedirect(redirect);
        } catch (Exception ex){
            ex.printStackTrace();
@@ -24,7 +29,7 @@
    @RequestMapping("/login")
    public void login(HttpServletResponse response) {
        try{
            String redirect = "/views/login.html";
            String redirect = Cools.isEmpty(applicationName)?"/views/login.html":"/"+applicationName+"/views/login.html";
            response.sendRedirect(redirect);
        } catch (Exception ex){
            ex.printStackTrace();