javaweb项目已经发布起来了,可是输入controller对应的地址,总是自己跳转到login?
天蓬老师
天蓬老师 2017-04-18 10:55:58
[Java讨论组]

web.xml中没看出异常啊?

比如输入http://localhost:8080/dyn2/dy...
会自动调整到http://localhost:8080/dyn2/login



 Dynamic Matrix powered by Spring
 Dynamic Matrix
 
  webAppRootKey
  dyn2.root
 
 
  log4jConfigLocation
  /WEB-INF/log4j.properties
 
 
  contextConfigLocation
  /WEB-INF/applicationContext.xml
 
 
  characterEncodingFilter
  org.springframework.web.filter.CharacterEncodingFilter
  
   encoding
   utf8
  
 
 
 
  springSecurityFilterChain
  org.springframework.web.filter.DelegatingFilterProxy
 
 
 
  characterEncodingFilter
  /*
 
 
 
  springSecurityFilterChain
  /*
 
 
 
  org.springframework.web.util.Log4jConfigListener
 
 
  org.springframework.web.context.ContextLoaderListener
 
 
     org.springframework.web.util.HttpSessionMutexListener
 
 
  dynMatrix
  org.springframework.web.servlet.DispatcherServlet
  1
 
 
 
  dynMatrix
  /
 
 
     60
 
 
  403
  /errors/403.html
 

这是controller

    @RequestMapping(value="/create",method=RequestMethod.GET)
    public String getCreateForm(Model model){
        this.addEnableMap(model);
        model.addAttribute(new WebUser());
        //加载分类
        String cwhere = " where type_parent_id=0";
        List checkListType = checkLMDao.getCheckListTypeByWhere(cwhere, 0, 0);
        
        model.addAttribute("checkListType", checkListType);
        return "createUserForm";
    }
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

全部回复(2)
PHP中文网

请求这条地址可能需要一些登录信息什么的做验证,在ajax里请求会把这些信息传过去,
你直接浏览器输入不带有这些信息就会被security过滤器给拦截转发到登录页面了。

怪我咯


可能是这个过滤器拦截到了你的请求
项目是你一个人在负责吗?如果不是这种问题最好问同一个项目组的同事

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号