7.创建JBean模块项目
?
?
Example:
Project path:E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac
E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac\src\main\java
E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac\src\test\java
E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.app\com.sixsun.web.app.portal\src\main\webapp\WEB-INF\view\velocity\modules
E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac\doc
?
Wait a few seconds….Refresh the java project you will see the following
?
?
?
?
?
?
?
?
Project UI Code in TemplatePath:
com.sixsun.web.app.portal\src\main\webapp\WEB-INF\view\velocity\modules\Rbac
Adding a JBean Module Java project to the main web project. com.sixsun.web.app.portal is a main web project. Right-click com.sixsun.web.app.portal project.
Select Maven->Add Dependency
?
?
Modify web.xml of the com.sixsun.web.app.portal project.
Like the following way to add a Spring class path of the JBean Java Module Project.
<servlet>
<servlet-name>DispatcherServlet</servlet-name>
????<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
????<init-param>
????<param-name>contextConfigLocation</param-name>
????<param-value>
????????classpath:/com/sixsun/web/core/cache/springxml/*.xml,
????????classpath:/com/sixsun/web/core/commons/springxml/*.xml,
????????classpath:/com/sixsun/web/core/persist/springxml/*.xml,
????????classpath:/com/sixsun/web/core/spring/springxml/*.xml,???????????????????? classpath:/com/sixsun/web/module/category/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/code/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/dict/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/email/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/fileupload/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/fusioncharts/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/help/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/layout/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/log4j/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/metadata/domain/springxml/*.xml,????
????????classpath:/com/sixsun/web/module/schema/domain/springxml/*.xml,
????????classpath:/com/sixsun/web/module/security/springxml/*.xml,
????????classpath:/com/sixsun/web/module/sms/domain/springxml/*.xml,
classpath:/com/sixsun/web/module/rbac/domain/springxml/*.xml
????</param-value>
????</init-param>????????
????<load-on-startup>1</load-on-startup>
</servlet>
?
?