框架整合的配置SSS"/>
框架整合的配置SSS
这是一个基于Spring的框架 表现层利用SpringMVC 服务层利用Spring 在持久层利用SpringData 关于数据库有两种情况,这一次的框架整合时基于关系型的数据库MySQL的整合,下面就直接占代码,关于一些注意的点,以及一些别的内容会在注释中详细的给出,若有不足或者是写错的地方,请多多指教,留下你宝贵的意见
这次使用的工具是IDEA,代码使用到的是Maven这个自动化的构建工具
(一):关于pom.xml文件,连接了本地仓库以及关联了远程仓库
<project xmlns=".0.0" xmlns:xsi=""xsi:schemaLocation=".0.0 .xsd"><modelVersion>4.0.0</modelVersion><groupId>com.qf.hhh</groupId><artifactId>SSSJ</artifactId><packaging>war</packaging><version>1.0</version><name>SSSJ Maven Webapp</name><url>;/url><dependencies><!-- 添加junit单元测试包,版本为4.12 --><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version><scope>test</scope></dependency><!-- 添加servlet核心包 关联tomcat8.5 --><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId><version>3.1.0</version><scope>provided</scope></dependency><dependency><groupId>javax.servlet.jsp</groupId><artifactId>javax.servlet.jsp-api</artifactId><version>2.3.2-b01</version><scope>provided</scope></dependency><!-- jstl --><dependency><groupId>javax.servlet</groupId><artifactId>jstl</artifactId><version>1.2</version></dependency><!-- 日志记录所需包 --><dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>1.7.5</version></dependency><dependency><groupId>org.slf4j</groupId><artifactId>slf4j-log4j12</artifactId><version>1.7.5</version><scope>runtime</scope></dependency><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17</version><scope>runtime</scope></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>5.1.34</version></dependency><!-- hibernate --><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-core</artifactId><version>5.2.10.Final</version></dependency><!-- for JPA, use hibernate-entitymanager instead of hibernate-core --><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-entitymanager</artifactId><version>5.2.10.Final</version></dependency><!-- optional --><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-osgi</artifactId><version>5.2.10.Final</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-envers</artifactId><version>5.2.10.Final</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-c3p0</artifactId><version>5.2.10.Final</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-proxool</artifactId><version>5.2.10.Final</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-infinispan</artifactId><version>5.2.10.Final</version></dependency><dependency><groupId>org.hibernate</groupId><artifactId>hibernate-ehcache</art
更多推荐
框架整合的配置SSS
发布评论