• jeesite中的配置


    <context:property-placeholder ignore-unresolvable="true" location="classpath:jeesite.properties" /> 

    这里location值为参数配置文件的位置,参数配置文件通常放在src目录下,而参数配置文件的格式跟java通用的参数配置文件相同,即键值对的形式

    <context:component-scan base-package="com.thinkgem.jeesite" use-default-filters="false">

    注解类位于包 com.thinkgem.jeesite 下

    <!-- 定义视图文件解析 /WEB-INF/views/*.jsp -->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="${web.view.prefix}"/>
    <property name="suffix" value="${web.view.suffix}"/>
    </bean>

     web.view.prefix 与 web.view.suffix 定义在  jeesite.properties 文件中:

    web.view.prefix=/WEB-INF/views/
    web.view.suffix=.jsp

    开始页面定义在shiro 中的 配置文件 loginUrl 中 

    <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
    <property name="securityManager" ref="securityManager" /><!--
     <property name="loginUrl" value="${adminPath}/login" />
    <property name="successUrl" value="${adminPath}?login" />
    <property name="filters">
    <map>
    <entry key="cas" value-ref="casFilter"/>
    <entry key="authc" value-ref="formAuthenticationFilter"/>
    </map>
    </property>
    <property name="filterChainDefinitions">
    <ref bean="shiroFilterChainDefinitions"/>
    </property>
    </bean>

    在类LoginController 中 @RequestMapping(value = "${adminPath}/login", method = RequestMethod.GET) 定义了 处理登陆的方法

    如果已经登陆过 在此打开登陆页面时 输入系统主页面时 

    LoginController 类中会直接调用以下方法    //@RequiresPermissions("user") shiro判断已经登陆 就执行 index 方法

    @RequiresPermissions("user")
    @RequestMapping(value = "${adminPath}")

    public String index(HttpServletRequest request, HttpServletResponse response) 

  • 相关阅读:
    Django的路由层(URLconf)
    Django简介
    web应用和http协议
    浅谈css中浮动和清除浮动带来的影响
    Bootstrap组件介绍
    jquery的Ajax
    spark新能优化之广播共享数据
    spark新能优化之reduceBykey和groupBykey的使用
    spark新能优化之shuffle新能调优
    spark新能优化之数据本地化
  • 原文地址:https://www.cnblogs.com/Ruiwy/p/6406002.html
Copyright © 2020-2023  润新知