首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

7.创造JBean模块项目

2012-08-16 
7.创建JBean模块项目?Setup JBean Module file* Click the right mouse button?Setup project.Setup deplo

7.创建JBean模块项目

    ?

      Setup JBean Module file
        * Click the right mouse button

    7.创造JBean模块项目

    ?

      Setup project.

    7.创造JBean模块项目

      Setup deploy

    7.创造JBean模块项目

    Example:

    Project path:

    E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac

    srcPath:

    E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac\src\main\java

    testPath:

    E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac\src\test\java

    templatePath: point to a web project "com.sixsun.web.app.portal"

    E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.app\com.sixsun.web.app.portal\src\main\webapp\WEB-INF\view\velocity\modules

    documentPath:

    E:\WorkSpace\J2EE\web\com.sixsun.web\com.sixsun.web.module\com.sixsun.web.module.rbac\doc

    ?

      Automatic build JBean module project

    7.创造JBean模块项目

    Wait a few seconds….Refresh the java project you will see the following

      Project Java Code
      7.创造JBean模块项目JPA Domain
      Spring Controller
      Dao Api
      Dao Hibernate impl
      Service Api
      Service Impl
      Spring xml file(Dao and Controller)
      Junit Test Code
      Junit Test Spring xml
      ?

    ?

    ?

    ?

    ?

    ?

    ?

    ?

    ?

      Project UI Code

    Project UI Code in TemplatePath:

    com.sixsun.web.app.portal\src\main\webapp\WEB-INF\view\velocity\modules\Rbac

    7.创造JBean模块项目

      Deployment JBean Module Java project

    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

    ?

    7.创造JBean模块项目

    ?

    7.创造JBean模块项目

      Modify Web.xml configuration

    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>

    ?

    ?

    热点排行