ssh框架整合 hibernate5.2.8_spring4.3.7_struts2.5.1

SSHFrame



页面展示:







hibernate5.2.8_spring4.3.7_struts2.5.1 整合

struts2.5.1
1.实现MVC设计模式
hibernate5.2.8
1.增加通用HQL通用DAO
HqlDao.java
spring4.3.7
1.整合SSH
2.配置数据源
3.配置sessionFactory
4.配置事务管理
    <!-- 声明式容器事务管理 ,transaction-manager指定事务管理器为transactionManager -->
    <tx:advice id="txAdvice" transaction-manager="transactionManager">
    <tx:attributes>
        <tx:method name="*" propagation="REQUIRED" />  
    </tx:attributes>
    </tx:advice>
        <aop:config expose-proxy="true">
          <!-- 只对业务逻辑层实施事务 -->
          <aop:pointcut id="txPointcut" expression="execution(* com.czr.frame.util.dao.impl..*.*(..))" />
          <!-- Advisor定义,切入点和通知分别为txPointcut、txAdvice -->
          <aop:advisor pointcut-ref="txPointcut" advice-ref="txAdvice" />
    </aop:config>
easy ui 1.5.1
1.主页面布局
2.增加基本增删改查页面

代码生成器

1.github地址:
https://github.com/chenzhirong/CodeGenerator.git
2.配置文件
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <configuration>
    <classpath>
        <entry>lib/ojdbc14.jar</entry>
    </classpath>
    <connections>
        <database name="czr">
            <driverClass>oracle.jdbc.driver.OracleDriver</driverClass>
            <url>jdbc:oracle:thin:@localhost:1521:orcl</url>
            <username>czr</username>
            <password>czr</password>
            <schema/>
        </database>
    </connections>
    <targetProject>D:\01_CreateCode</targetProject>
    <basePackage>com.czr.frame</basePackage>
    <moduleName>zb</moduleName>
    <templates>
        <template engine="freemarker" name="实体类" selected="true">
            <templateFile>/SSHFrame/bean.ftl</templateFile>
            <targetPath>${targetProject}\beans\</targetPath>
            <targetFileName>${table.className?substring(1)}.java</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="hibernate.hbm.xml" selected="true">
            <templateFile>/SSHFrame/hibernate.hdm.ftl</templateFile>
            <targetPath>${targetProject}\domain\</targetPath>
            <targetFileName>${table.className?substring(1)}.hbm.xml</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="action" selected="true">
            <templateFile>/SSHFrame/action.ftl</templateFile>
            <targetPath>${targetProject}\action\</targetPath>
            <targetFileName>${table.className?substring(1)}Action.java</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="struts" selected="true">
            <templateFile>/SSHFrame/struts.ftl</templateFile>
            <targetPath>${targetProject}\config\</targetPath>
            <targetFileName>${table.className?substring(1)?lower_case}_struts-config.xml</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="spring" selected="true">
            <templateFile>/SSHFrame/spring.ftl</templateFile>
            <targetPath>${targetProject}\config\</targetPath>
            <targetFileName>${table.className?substring(1)?lower_case}_spring-config.xml</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="service" selected="true">
            <templateFile>/SSHFrame/service.ftl</templateFile>
            <targetPath>${targetProject}\service\</targetPath>
            <targetFileName>${table.className?substring(1)}Service.java</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="serviceimpl" selected="true">
            <templateFile>/SSHFrame/serviceImpl.ftl</templateFile>
            <targetPath>${targetProject}\service\</targetPath>
            <targetFileName>${table.className?substring(1)}ServiceImpl.java</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="js" selected="true">
            <templateFile>/SSHFrame/js.ftl</templateFile>
            <targetPath>${targetProject}\jsp\</targetPath>
            <targetFileName>${table.className?substring(1)?lower_case}.js</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
        <template engine="freemarker" name="jsp" selected="true">
            <templateFile>/SSHFrame/jsp.ftl</templateFile>
            <targetPath>${targetProject}\jsp\</targetPath>
            <targetFileName>${table.className?substring(1)?lower_case}.jsp</targetFileName>
            <encoding>UTF-8</encoding>
        </template>
    </templates>
    </configuration>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值