Rose框架搭建

[size=xx-large][color=orange][b]Rose框架搭建[/b][/color][/size]

[b][size=medium][color=red]一.配置文件[/color][/size][/b]:

1.web.xml

xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
011_RoseTools

index.jsp




webAppRootKey
webapp.011_RoseTools


log4jConfigLocation
classpath:log4j.properties


portalExecutorCorePoolSize
200




org.springframework.web.util.Log4jConfigListener




characterEncodingFilter
org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8



exceptionFilter
com.momo.filter.ExceptionFilter


CookiesFilter
com.momo.filter.CookiesFilter


roseFilter
net.paoding.rose.RoseFilter



characterEncodingFilter
/*


exceptionFilter
/*


CookiesFilter
/*


roseFilter
/*
REQUEST
FORWARD
INCLUDE




404
/404.html


505
/505.html




60




2.applicationContext-interceptors.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">














t_userinfo,
t_admin






[size=medium][color=red][b]二.URL访问类拦截的顺序:[/b][/color][/size]
a.http://fanya.zaifan.net
ExceptionFilter
CookiesFilter
CookiesFilter
ExceptionFilter

b.http://fanya.zaifan.net/userInfo
ExceptionFilter(编码过滤,发生异常跳到异常页)
CookiesFilter(根据请求设置Cookies)
BaseInterceptor(得到Cookies,设置Session保存系统信息)
ThemeInterceptor(得到Session,设置分表)
LoginRequiredInterceptor(检查用户是否登录,Session取不到用户信息,跳到登陆页)
UserInfoController(请求处理控制类)
AutoLogInterceptor(请求返回的页面渲染完毕时调用,DB记录用户本次操作日志)

[size=medium][color=red][b]三、加载数据字典:[/b][/color][/size]
启动服务实例化bean时,这个类会被实例化后自动调用initCateData()方法加载系统大数据

@Component
public class SystemInitData {
@PostConstruct
public void initCateData() {
}
}

你可能感兴趣的:(Rose框架)