我在springboot的application.properties文件中设置了项目的访问路径
server.servlet.context-path=/manage
现在我想要在设置默认页,就是在访问http://127.0.0.1:9091时 ,自动跳转到
http://127.0.0.1:9091/manage/view/login/login.html 应该怎么做
原先没有加上访问路径的时候 ,是这样写的
package com.cry.shop.manage.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HomepageController {
/**
* @Title: home
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param name
* @return
* @throws
*/
@RequestMapping("/")
public String home(String name) {
System.out.println(11111111);
return "redirect:/view/login/login.html";
}
}
现在加上了 再用这种 因为多了一个项目路径 再访问http://127.0.0.1:9091 就调不到了 有什么办法吗?