springboot通过url访问html无法跳转

springboot通过url访问无法正常跳转,因为需要判断是否登录访问,但是根本进不去的感觉

    @RequestMapping("/")
    public String login(@CookieValue(value = "etsid") String etsid) {
        if (etsid == null) {
            return "login";
        } else {
            return "index";
        }
    }

spring:
  thymeleaf:
    prefix: /usr/ss7/app/manageTest2/dist/ #prefix:指定模板所在的目录
    check-template-location: true  #check-tempate-location: 检查模板路径是否存在
    cache: false  #cache: 是否缓存,开发模式下设置为false,避免改了模板还要重启服务器,线上设置为true,可以提高性能。
    suffix: .html
    #encoding: UTF-8
    #content-type: text/html
    mode: LEGACYHTML5
    servlet:
      content-type: text/html

这个模板你放在templete下试试