概述

从0到1教你搭建spring+springMVC+hibernate整合框架,基于注解。 本教程框架为基于全注解的SpringMVC+Spring4.2+hibernate4.3,开发工具为myEclipse.

详细

本教程框架为基于全注解的SpringMVC+Spring4.2+hibernate4.3,开发工具为myEclipse.

整体目录结构如下图:

最近在鼓捣SpringMVC框架,现将成果都记录下来,免得前学后忘。之前用的框架一直是S2SH,一直苦于要配置一堆的配置文件,自从接触SpringMVC,发现这才是我一直想要的框架,基于全注解,开发过程中零配置,实在快哉。此教程非常适合零基础的人学习回归正题,基于全注解驱动的SpringMVC+Spring4.2+hibernate4.3框架搭建(整合)过程如下,:

开发工具为myEclipse

第一步:新建一个web项目

在eclipse中新建一个web项目,略。

第二步:加入所需的jar包

jar包下载地址:http://download.csdn.net/detail/qq_33556185/9472726

第三步:接下来我们开始SpringMVC容器的配置

为了分工明确,我们将SpringMVC的配置单独写在spring-servlet.xml里,Spring的配置写在spring-common.xml(事务、数据源、sessionFactory等等)里。

spring-common.xml和spring-servlet.xml先加入如下schemal

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:task="http://www.springframework.org/schema/task" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd">

然后spring容器的配置先放下,先来配置springMVC(spring-servlet.xml)的配置

在schemal的结尾处加入这一句:default-autowire="byName" ,依赖注入将根据name自动装配。

接下来启动注解驱动的SpringMVC功能:

<mvc:annotation-driven />

扫描注解包(在SpringMVC的容器里,只扫描Controller注解就行了)

<context:component-scan base-package="com.mvc.rest"
use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
</context:component-scan>

use-default-filters默认为true,默认会扫描@Component、@Controller、@Repository、@Service的注解,在这里只扫描@Controller注解是因为,SpringMVC的容器没有事务的能力,所以扫描@Repository、@Service的注解只能放在Spring的容器。也正因为如此,事务的配置要写在Spring的容器。

然后是对模型视图名称的解析,在请求时模型视图名称添加前后缀(前缀是从控制器里返回的视图的父目录,此处配置的是让容器在WEB-INF/view/下找寻对应的视图;后缀是给视图名称追加后缀名,此处配置的是jsp后缀)

<bean  class="org.springframework.web.servlet.view.InternalResourceViewResolver"  p:prefix="/WEB-INF/view/" p:suffix=".jsp" />

配置CommonsMultpartResolver,上传文件的时候要用到CommonsMultpartResolver,maxUploadSize设置上传文件的大小限制,上传文件必须先配置此解析器。

<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="10485760" />
</bean>

配置login视图解析,在登录拦截器里,校验未登录的话,要跳转到登录页面,然后由于login页面放在WEB-INF目录下,所以设置跳转到login.jsp会跳转不过去,在此处设置如下,在返回此view-name的地方,容器便不会当作Controller的路径,当作视图的路径跳转,在拦截器里便可以跳转到login页面(此配置告诉容器,这不是一个controller的方法的路径,而是一个视图的名称,请当作视图处理)。

<mvc:view-controller path="/" view-name="login" />

拦截器的配置也是放在SpringMVC的容器里,拦截器以后的文章里再详细解说。

到此spring-servlet.xml的配置就告一段落了,spring-servlet.xml的全文如下:

<?xml version="1.0" encoding="UTF-8"?>
<!--suppress ALL -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:task="http://www.springframework.org/schema/task" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd"
default-autowire="byName">
<mvc:annotation-driven />
<!-- controller包(自动注入) -->
<context:component-scan base-package="com.mvc.rest" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
<!-- 对模型视图名称的解析,在请求时模型视图名称添加前后缀 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/view/" p:suffix=".jsp" />
<mvc:view-controller path="/" view-name="login" />
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="10485760" />
</bean>
<!-- 配置拦截器, 多个拦截器,顺序执行
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/*" />
<bean class="com.mvc.rest.interceptor.CommonInterceptor"></bean>
</mvc:interceptor> </mvc:interceptors> -->
</beans>

第四步:我们配置web.xml

先配置CharacterEncodingFilter编码过滤器,此过滤器必须放在配置文件的最上面,有多个过滤器的时候,也应该放在第一位。encoding目标编码,forceEncoding设为true,会忽略请求来源的编码,强制使用encoding设置的编码。

<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

然后配置ContextLoaderListener,此监听用来加载我们写的配置文件

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

然后加载Spring配置文件

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:/spring/spring-common.xml
</param-value>
</context-param>

接下来就是配置SpringMVC的核心Servlet,所有请求都要先经过DispatcherServlet,然后进行分发到对应的控制器。该Servlet须第一个被加载,且在初始化的时候去加载SpringMVC的配置文件——spring-servlet.xml

<servlet>
<servlet-name>spring-mvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<description>spring mvc</description>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/spring/spring-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

然后设置DispatcherServlet拦截的请求,此处的servlet-name,即是上面配置的DispatcherServlet的name,url-pattern设置为斜杠,则会拦截所有请求,也即静态资源html、css、js也直接请求。

<servlet-mapping>
<servlet-name>spring-mvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

为此,我们需要设置,哪些资源不进行拦截

<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/html/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/js/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/css/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/images/*</url-pattern>
</servlet-mapping>

到此,SpringMVC就可以正常使用了。

欢迎页面的设置,原本此处只能设置视图名,*.jsp或者*.html,因为在spring-servlet.xml里设置了视图解析:<mvc:view-controller path="/" view-name="login" />,所以,此处设置为welcome-file设置为login,容器便会将其解析为视图login.jsp,绕过WEB-INFO下的资源无法直接访问的限制。

<welcome-file-list>
<welcome-file>login</welcome-file>
</welcome-file-list>

我们还可以设置error-page的页面

<error-page>
<error-code>404</error-code>
<location>/html/error/404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/html/error/500.html</location>
</error-page>

为了集成hibernate,我们还要配置OpenSessionInViewFilter,此过滤器会将Hibernate的Session和一次完整的请求过程绑定起来,事务控制,必须配置此过滤器。

<filter>
<filter-name>openSession</filter-name>
<filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>openSession</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

完整的web.xml的配置如下:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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_3_0.xsd"
id="WebApp_ID" version="3.0">
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:/spring/spring-common.xml
</param-value>
</context-param>
<servlet>
<servlet-name>spring-mvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<description>spring mvc</description>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/spring/spring-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<filter>
<filter-name>openSession</filter-name>
<filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>openSession</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet-mapping>
<servlet-name>spring-mvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>login</welcome-file>
</welcome-file-list>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/html/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/js/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/css/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/images/*</url-pattern>
</servlet-mapping>
<error-page>
<error-code>404</error-code>
<location>/html/error/404.html</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/html/error/500.html</location>
</error-page>
</web-app>

第五步:配置spring-common.xml(数据源、事务、sessionFactory)

配置数据源jdbc.properties:

jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc\:mysql\://121.40.90.125\:3306/test
jdbc.username=root
jdbc.password=exceptoin882465\!@\#

解析properties:

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<span style="font-family:Microsoft YaHei;"> </span><property name="locations">
<value>classpath:jdbc.properties</value>
<span style="font-family:Microsoft YaHei;"> </span></property>
</bean>

数据库连接池的配置取properties中的值:

<bean id="dataSource" destroy-method="close"<span style="font-family:Microsoft YaHei;">  </span>class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
</bean>

若不设置url的编码,在MySQL数据库里,保存进去的中文会变成问号。

配置sessionFactory

<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
</props>
</property>
<!-- 注解方式配置 -->
<property name="packagesToScan">
<list>
<value>com.mvc.rest.entity</value>
</list>
</property>
</bean>

packagesToScan扫描我们的hibernate实体文件。

最后配置事务

<bean id="txManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="save*" propagation="REQUIRED" />
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="edit*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="register*" propagation="REQUIRED" />
<tx:method name="all" propagation="REQUIRED" />
<tx:method name="changePassword*" propagation="REQUIRED" />
<tx:method name="restPassword*" propagation="REQUIRED" />
<tx:method name="authorize*" propagation="REQUIRED" />
<tx:method name="send*" propagation="REQUIRED" />
<tx:method name="init*" propagation="REQUIRED" />
<!-- <tx:method name="*" read-only="true"/> -->
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="serviceOperation"
expression="execution(* com.mvc.rest.service.impl.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
</aop:config>

完整的spring-common.xml的配置如下:

<?xml version="1.0" encoding="UTF-8"?>
<!--suppress ALL -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:task="http://www.springframework.org/schema/task" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd">
<context:component-scan base-package="com.mvc.rest" />
<!-- properties文件解析器 -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>classpath:jdbc.properties</value>
</property>
</bean>
<!-- 配置数据源 -->
<bean id="dataSource" destroy-method="close"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
</props>
</property>
<!-- 注解方式配置 -->
<property name="packagesToScan">
<list>
<value>com.mvc.rest.entity</value>
</list>
</property>
</bean>
<bean id="txManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="save*" propagation="REQUIRED" />
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="edit*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="register*" propagation="REQUIRED" />
<tx:method name="all" propagation="REQUIRED" />
<tx:method name="changePassword*" propagation="REQUIRED" />
<tx:method name="restPassword*" propagation="REQUIRED" />
<tx:method name="authorize*" propagation="REQUIRED" />
<tx:method name="send*" propagation="REQUIRED" />
<tx:method name="init*" propagation="REQUIRED" />
<!-- <tx:method name="*" read-only="true"/> -->
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="serviceOperation"
expression="execution(* com.mvc.rest.service.impl.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceOperation" />
</aop:config>
</beans>

到此,基于全注解的SpringMVC+Spring4.2+hibernate4.3框架搭建大功告成。

第六步:运行

DB安装:

当然,你不安装也是可以的,本项目可以通过hibernate反向创建db和表,但数据没法创建,而且密码我们采用MD5加密,所以,为了省事,建议执行以下脚本,这个脚本是已经包含了创建DB的了。

DB安装后,需要配置下项目的jdbc连接:

配置如下:

请根据自己的实际情况修改。

然后是运行起来:

注:本文著作权归作者,由demo大师发表,拒绝转载,转载需要作者授权

基于全注解的SpringMVC+Spring4.2+hibernate4.3框架搭建的更多相关文章

  1. 基于SpringMVC下的Rest服务框架搭建【1、集成Swagger】

    基于SpringMVC下的Rest服务框架搭建[1.集成Swagger] 1.需求背景 SpringMVC本身就可以开发出基于rest风格的服务,通过简单的配置,即可快速开发出一个可供客户端调用的re ...

  2. [转]基于全注解的Spring3.1 mvc、myBatis3.1、Mysql的轻量级项目

    摘要 对于现在主流的j2ee企业级开发而言,ssh(struts+hibernate+spring)依然是一个事实的标准.由struts充当的mvc调度控制:hibernate的orm持久化映射:sp ...

  3. 基于SpringMVC下的Rest服务框架搭建【集成Swagger】

    1.需求背景 SpringMVC本身就可以开发出基于rest风格的服务,通过简单的配置,即可快速开发出一个可供客户端调用的rest服务,通常这些服务要不就是用于手机app的开发,要不就是提供给第三方开 ...

  4. 基于SSH2的OA项目1.0_20161206_需求分析与框架搭建

    1. SSH项目 OA项目,办公自动化,将公司的数据,文档,流程实现在系统中的管理. 降低人员交流过程中的成本.提高办公的效率. 2 .系统管理 主要实现系统权限的管理,不同的用户登陆后看到菜单项不一 ...

  5. struts2 spring3.2 hibernate4.1 框架搭建 整合

    ssh是企业开发中常遇到的框架组合,现将框架的搭建过程记录下来,以便以后查看.我的搭建过程是,首先struts,然后spring,最后hibernate.struts2的最新版本为2.3.8,我下载的 ...

  6. Struts2.3+Spring3.2+Hibernate4.2框架搭建

    一.环境 SSH使用的版本:struts2.3.14.spring3.2.2.hibernate4.2.0 数据库:MYSQL tomcat版本:apache-tomcat-7.0.42 二.所需要导 ...

  7. 基于IDEA 最新Spirng3.2+hibernate4+struts2.3 全注解配置 登录

    原文 基于IDEA 最新Spirng3.2+hibernate4+struts2.3 全注解配置 登录 首先说说 IDEA 12,由于myeclipse越来越卡,我改用idea12 了,发现其功能强悍 ...

  8. 基于已构建S2SH项目配置全注解方式简化配置文件

    如果还不熟悉s2sh项目搭建的朋友可以先阅读 eclipse环境下基于tomcat-7.0.82构建struts2项目 eclipse环境下基于已构建struts2项目整合spring+hiberna ...

  9. 最新版本的Struts2+Spring4+Hibernate4三大框架整合(截止2014-10-15,提供源码下载)

    一. 项目名称:S2316S411H436 项目原型:Struts2.3.16 + Spring4.1.1 + Hibernate4.3.6 + Quartz2.2.1 源代码下载地址: 基本版:ht ...

随机推荐

  1. iOS:自定义导航栏,随着tableView滚动显示和隐藏

    自定义导航栏,随着tableView滚动显示和隐藏 一.介绍 自定义导航栏是APP中很常用的一个功能,通过自定义可以灵活的实现动画隐藏和显示效果.虽然处理系统的导航栏也可以实现,但是这个是有弊端的,因 ...

  2. verilog语法实例学习(2)

    Verilog中的信号类型 线网类型 线网类型表示一个或多个门或者其它类型的信号源驱动的硬件连线.如果没有驱动源,则线网的默认值为z.verilog中定义的线网类型有以下几种:     wire,tr ...

  3. codeforce 192 div2解题报告

    今天大家一起做的div2,怎么说呢,前三题有点坑,好多特判.... A. Cakeminator 题目的意思是说,让你吃掉cake,并且是一行或者一列下去,但是必须没有草莓的存在.这道题目,就是判断一 ...

  4. WHY数学图形显示工具

    软件功能:输入一个二元数学表达式,含有两个参数变量X和Y,显示该数学表达式的三维图形. 很久之前就有写这个软件的想法,却一直没有激情和动力,终于在年假这两天完成了.以此软件纪念我那十几年前的高中生活, ...

  5. FastReport.Net 入门

    任何一门编程技术入门体验都是以“Hello World”开始的,但我想再复杂一点的“Hello World”,才能算真正的入门.   FastReport.Net V1.2.76 ,vs2008 在 ...

  6. WebView JS交互 JSBridge 案例 原理 MD

    Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...

  7. 第一个手写Win32窗口程序

    第一个手写Win32窗口程序 一 Windows编程基础 1 Win32应用程序的基本类型 1.1 控制台程序 不需要完善的Windows窗口,可以使用DOS窗口 的方式显示. 1.2 Win32窗口 ...

  8. 斯坦福深度学习与nlp第四讲词窗口分类和神经网络

    http://www.52nlp.cn/%E6%96%AF%E5%9D%A6%E7%A6%8F%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E4%B8%8Enlp%E7%A ...

  9. 机器学习算法与Python实践之(七)逻辑回归(Logistic Regression)

    http://blog.csdn.net/zouxy09/article/details/20319673 机器学习算法与Python实践之(七)逻辑回归(Logistic Regression) z ...

  10. ASP入门(十三)-Server对象

    Server 对象用于处理服务器上的一些特殊任务,例如,创建组件实例.获取文件路径.执行ASP脚本文件等. Server 对象是体现 ASP 强大功能的一个对象,之前介绍的对象都是针对获取.请求以及简 ...