搭建Spring+SpringMVC+Hibernate的框架的思路如下:

1、创建Maven项目,按需映入Maven包依赖。

2、搭建Spring:配置Spring对控件层Bean的注入。

3、搭建Hibernate:配置数据源,配置SessionFactory,配置事务。

4、映入SpringMVC:配置SpringMVC配置信息。

5、配置web.xml容器

6、测试三个框架的整合:。

一、创建Maven项目、导入依赖

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.li</groupId>
<artifactId>SSHDemo</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>SSHDemo Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.0.7.RELEASE</version>
</dependency> <!-- https://mvnrepository.com/artifact/org.springframework/spring-beans -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-aop -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context-support -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-expression -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.46</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.3.1.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate.common/hibernate-commons-annotations -->
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>5.0.3.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-c3p0 -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>5.3.1.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/dom4j/dom4j -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.mchange/mchange-commons-java -->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>mchange-commons-java</artifactId>
<version>0.2.15</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging -->
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.3.2.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.spec.javax.transaction/jboss-transaction-api_1.2_spec -->
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
<version>1.0.0.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml/classmate -->
<dependency>
<groupId>com.fasterxml</groupId>
<artifactId>classmate</artifactId>
<version>1.4.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.mchange/c3p0 -->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-test -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.0.7.RELEASE</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-tx -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.persistence/javax.persistence -->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.2.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.22.0-GA</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss/jandex -->
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>2.0.5.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml/classmate -->
<dependency>
<groupId>com.fasterxml</groupId>
<artifactId>classmate</artifactId>
<version>1.4.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/antlr/antlr -->
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.bytebuddy/byte-buddy -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.8.12</version>
</dependency> </dependencies>
<build>
<finalName>SSHDemo</finalName>
</build>
</project>

二、配置web.xml

1.配置Spring的IOC容器

     <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

  在src/main/resources下新建文件config,将所有的配置文件放在里面。创建spring配置文件applicationContext.xml

2.配置SpringMVC的核心控制器

     <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:springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

  在config目录中创建SpringMVC的配置文件springmvc.xml

3.配置编码方式(过滤器),这个过滤器必须放在所有过滤器前。

     <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>
</filter>
<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

4.为了使用SpringMVC框架实现REST,需配置HiddenHttpMethodFilter。

     <filter>
<filter-name>hiddenHttpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hiddenHttpMethodFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

web.xml

 <?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_1529217958650">
<!-- 配置Spring IOC 容器 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> <!-- 配置Springmvc的核心控制器 -->
<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:springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!-- 配置编码方式过滤器,且必须配置在所有的过滤器最前面 -->
<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>
</filter>
<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 为了使用SpringMVC框架实现REST,需配置HiddenHttpMethodFilter -->
<filter>
<filter-name>hiddenHttpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>hiddenHttpMethodFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> </web-app>

三、配置SpringMVC

1.配置自动扫描的包

     <context:component-scan base-package="com.Spittr.dao.impl"
use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
<context:include-filter type="annotation"
expression="org.springframework.web.bind.annotation.ControllerAdvice" />
</context:component-scan>

2.配置视图解析器

  应用中所有的视图即JSP文件都放入WEB-INF下的view文件夹中。

     <bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/view/">
</property>
<property name="suffix" value=".jsp">
</property>
</bean>

3.配置静态资源

 <mvc:default-servlet-handler/>

4.配置注解

 <mvc:annotation-driven></mvc:annotation-driven>

springmvc.xml

 <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <!-- 配置自动扫描的包 -->
<context:component-scan base-package="com.Spittr.dao.impl"
use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
<context:include-filter type="annotation"
expression="org.springframework.web.bind.annotation.ControllerAdvice" />
</context:component-scan> <!-- 配置视图解析器 -->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/view/">
</property>
<property name="suffix" value=".jsp">
</property>
</bean>
<!-- 配置静态资源 -->
<mvc:default-servlet-handler/>
<!-- 配置注解 -->
<mvc:annotation-driven></mvc:annotation-driven>
</beans>

四、配置Spring

1.配置自动扫描的包

  包含Controller和ControllerAdvice注解的bean交给SpringMVC来扫描,Spring就不再扫描了,所以要把这两个注解排除在外。

     <context:component-scan base-package="com.Spittr"
use-default-filters="false">
<!-- 去除由Springmvc负责扫描的注解 -->
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
<context:exclude-filter type="annotation"
expression="org.springframework.web.bind.annotation.ControllerAdvice" />
</context:component-scan>

2.配置数据源

数据源配置文件:db.properties,也放在config文件夹中。

 jdbc.user=root
jdbc.password=123456
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.jdbcUrl=jdbc\:mysql\://localhost\:3306/spittr
 <context:property-placeholder location="classpath:/config/db.properties" />

3.配置DataSource,使用c3p0连接池。

     <bean class="com.mchange.v2.c3p0.ComboPooledDataSource" id="dataSource">
<property name="user" value="${jdbc.user}"></property>
<property name="password" value="${jdbc.password}"></property>
<property name="driverClass" value="${jdbc.driverClass}"></property>
<property name="jdbcUrl" value="${jdbc.jdbcUrl}"></property>
</bean>

五、配置Hibernate

1.配置SeeionFactory

     <bean class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"
id="sessionFactory"> </bean>

在SessionFactory中需要添加以下三个property:

1.1.配置数据源

 <property name="dataSource" ref="dataSource"></property>

1.2.配置实体包(pojo)

 <property name="PhysicalNamingStrategy">
<bean class="org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl"></bean>
</property>
<property name="packagesToScan" value="com.Spittr.entity"></property>

1.3.配置Hibernate的常用属性

 <property name="hibernateProperties">
<props>
<!-- 数据库的方言 -->
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>

2.配置hibernate的事务管理器

 <bean class="org.springframework.orm.hibernate5.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>

applicationContext.xml

 <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd"> <!-- 配置自动扫描的包 -->
<context:component-scan base-package="com.Spittr"
use-default-filters="false">
<!-- 去除由Springmvc负责扫描的注解 -->
<context:exclude-filter type="annotation"
expression="org.springframework.stereotype.Controller" />
<context:exclude-filter type="annotation"
expression="org.springframework.web.bind.annotation.ControllerAdvice" />
</context:component-scan> <!-- 配置数据源 -->
<context:property-placeholder location="classpath:/config/db.properties" /> <!-- 配置DataSource -->
<bean class="com.mchange.v2.c3p0.ComboPooledDataSource" id="dataSource">
<property name="user" value="${jdbc.user}"></property>
<property name="password" value="${jdbc.password}"></property>
<property name="driverClass" value="${jdbc.driverClass}"></property>
<property name="jdbcUrl" value="${jdbc.jdbcUrl}"></property>
</bean> <!-- 配置SeeionFactory -->
<bean class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"
id="sessionFactory">
<!-- 配置数据源 -->
<property name="dataSource" ref="dataSource"></property>
<!-- 配置实体包(pojo) -->
<property name="PhysicalNamingStrategy">
<bean
class="org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl"></bean>
</property>
<property name="packagesToScan" value="com.Spittr.entity"></property> <!-- 配置Hibernate的常用属性 -->
<property name="hibernateProperties">
<props>
<!-- 数据库的方言 -->
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean> <!-- 配置hibernate的事务管理器 -->
<bean class="org.springframework.orm.hibernate5.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
</beans>

六、测试

1.测试是否能得到配置文件applicationContext.xml

 private ApplicationContext ctx = null;
ctx = new ClassPathXmlApplicationContext("/config/applicationContext.xml");
System.out.println(ctx);

2.测试是否能获取数据源

 DataSource dataSource = ctx.getBean(DataSource.class);
System.out.println(dataSource.getConnection().toString());

3.测试Hibernate中SessionFactory是否能获取

 SessionFactory sessionFactory = ctx.getBean(SessionFactory.class);
System.out.println(sessionFactory);

4.对数据库进行操作

首先创建实体类:Spitter.java

 package com.Spittr.entity;

 import java.io.Serializable;

 import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table; @Entity
@Table(name = "spitter")
public class Spitter implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
int id;
String username;
String password;
String email; public Spitter() {
// TODO Auto-generated constructor stub
} public Spitter(String username, String password, String email) {
super();
this.username = username;
this.password = password;
this.email = email;
} public int getId() {
return id;
} public void setId(int id) {
this.id = id;
} public String getUsername() {
return username;
} public void setUsername(String username) {
this.username = username;
} public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password;
} public String getEmail() {
return email;
} public void setEmail(String email) {
this.email = email;
}
}

测试

         Session session = sessionFactory.openSession();
Transaction transaction = session.beginTransaction();
Spitter spitter = new Spitter("222qqqq222", "123123", "123213");
session.save(spitter);
transaction.commit();
session.close();

testSSH.java

 package com.Spittr.test;

 import java.sql.SQLException;

 import javax.sql.DataSource;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException; import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext; import com.Spittr.entity.Spitter; public class testSSH { private ApplicationContext ctx = null; @Test
public void testDataSource() throws SQLException, SecurityException, RollbackException, HeuristicMixedException,
HeuristicRollbackException, SystemException { ctx = new ClassPathXmlApplicationContext("/config/applicationContext.xml");
System.out.println(ctx);
// System.out.println();
// 测试数据源
DataSource dataSource = ctx.getBean(DataSource.class);
System.out.println(dataSource.getConnection().toString()); // 测试SessionFactory
SessionFactory sessionFactory = ctx.getBean(SessionFactory.class);
System.out.println(sessionFactory); // 测试操作数据库表(session)
Session session = sessionFactory.openSession();
Transaction transaction = session.beginTransaction();
Spitter spitter = new Spitter("222qqqq222", "123123", "123213");
session.save(spitter);
transaction.commit();
session.close(); } }

七、配置过程中遇到的问题

1.classpath的相关问题

前缀 说明
classpath 优先本项目class路径查找,没有的话依次在其他jar包中class路径查找,找到第一个匹配的为止
classpath* 加载到所有class路径下的配置文件,包括jar包的class路径下,最终加载所有匹配的
file 通过URL加载,来源为文件系统(注意文件读取权限)
http 通过URL加载,来源为网络

  在maven项目中,classpath对应的目录是Webapp\target\classes,也就是把配置文件都放入src/main/resources目录下即可,本例中是把config文件夹放入src/main/resources中,所以在读取config中的配置文件时,所以才会使用classpath:/config/***形式。

2.hibernate的配置

  org.hibernate.cfg.NamingStrategy接口允许你为数据库中的对象和schema 元素指定一个“命名标准”. 你可能会提供一些通过Java标识生成数据库标识或将映射定义文件中"逻辑"表/列名处理成"物理"表/列名的规则. 这个特性有助于减少冗长的映射定义文件。

  但是在Hibernate到5.1的后,hibernate.ejb.naming_strategy将不再被支持,而是被替换成了两个属性:

      • hibernate.physical_naming_strategy:隐式命名策略,使用此属性当我们使用的表或列没有明确指定一个使用的名称。
      • hibernate.implicit_naming_strategy:物理命名策略,用于转换“逻辑名称”(隐式或显式)的表或列成一个物理名称。

①对于physical_naming_strategy有两个常用的配置:

    • org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
    • org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

对于PhysicalNamingStrategyStandardImpl有DefaultNamingStrategy的效果;对于SpringPhysicalNamingStrategy有

ImprovedNamingStrategy的效果。

②在sessionFactory的bean里配置。

 <property name="PhysicalNamingStrategy">
<bean class="org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl"></bean>
</property>

 <property name="ImplicitNamingStrategy">
<bean class="org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl" />
</property>

八、代码下载

https://github.com/lyj8330328/SSHDemo-Maven-Webapp

最新文章

  1. 一个简单的tr:hover效果
  2. 在点击HOME键时, 在点击icon回到原来的应用。
  3. IE自动化 二(判断IP所在地)
  4. 【转】google谷歌百度收录网站的技巧方法,如何让百度收录?
  5. 谈谈C语言的数据类型
  6. 用lsb_release -a 查看linux版本
  7. linux下Java环境的配置
  8. 留言本,keyCode
  9. day2--通过setup设置网卡
  10. 关于磁盘冗余阵列、热备、群集、负载均衡、云计算、F5、Nginx等的概念和基本原理
  11. BZOJ 3879: SvT [虚树 后缀树]
  12. setsockopt()用法(参数详细说明) recv、send的超时处理
  13. Openlayers3学习心得(初识)
  14. hdu 3065 AC自动机 标记数组不清零
  15. NOIP2011提高组 选择客栈
  16. VHDL 乐曲演奏电路设计
  17. hdu2461 Rectangles 线段树--扫描线
  18. PHP企业微信配置点击事件。
  19. 质数——6N&#177;1法
  20. sql语句分组/排序/计算总数/连接等sql语句书写

热门文章

  1. vue中checkbox 样式自定义重写;循环遍历checkbox,拿到不同的v-model绑定值;及获取当前checked 状态,全选和全不选等功能。
  2. android 数据异步加载
  3. TypeError: Object of type &#39;int32&#39; is not JSON serializable
  4. 牛客练习赛48 C,D,E
  5. git安装和使用方法url
  6. 【LeetCode】Heap
  7. web.xml中配置——加载spring容器
  8. 安卓8.0真机运行appium1.4遇到的问题:运行自动化脚本,手机自动安装 settings.apk和unclock.apk,执行脚本时提示安装UnicodeIME-debug.apk失败,怎么关掉自动安装?
  9. Delphi 堆栈 [ heap(堆) 和 stack(栈) ]
  10. 【Dart学习】-- Dart之操作符