SSM 框架-05-详细整合教程(Eclipse版)(Spring+SpringMVC+MyBatis)
SSM 框架-05-详细整合教程(Eclipse版)(Spring+SpringMVC+MyBatis)
如果你使用的是 Intellij IDEA,请查看:
SSM的配置流程详细的写了出来,方便很少接触这个框架的朋友使用,文中各个资源均免费提供!
一.创建web项目(eclipse)
File-->new-->Dynamic Web Project (这里我们创建的项目名为SSM)
下面是大致目录结构
二. SSM所需jar包。
jar包链接:https://pan.baidu.com/s/1dTClhO 密码:n4mm
三.整合开始
1.mybatis配置文件(resource/mybatis/SqlMapConfig.xml)
- 
<?xml version="1.0" encoding="UTF-8" ?>
 
- 
<!DOCTYPE configuration
 
- 
		PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
 
- 
		"http://mybatis.org/dtd/mybatis-3-config.dtd">
 
- 
<configuration>
 
- 
 
 
- 
</configuration>
 
2.Dao,mybatis整合spring,通过spring管理
SqlSessionFactory、mapper代理对象
(resource/spring/applicationContext-dao.xml)
- 
<?xml version="1.0" encoding="UTF-8"?>
 
- 
<beans xmlns="http://www.springframework.org/schema/beans"
 
- 
	xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
 
- 
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
 
- 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
- 
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
 
- 
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
 
- 
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
 
- 
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
 
- 
 
 
- 
	<!-- 数据库连接池 -->
 
- 
	<!-- 加载配置文件 -->
 
- 
	<context:property-placeholder location="classpath:*.properties" />
 
- 
	<!-- 数据库连接池 -->
 
- 
	<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
 
- 
		destroy-method="close">
 
- 
		<property name="url" value="${jdbc.url}" />
 
- 
		<property name="username" value="${jdbc.username}" />
 
- 
		<property name="password" value="${jdbc.password}" />
 
- 
		<property name="driverClassName" value="${jdbc.driver}" />
 
- 
		<property name="maxActive" value="10" />
 
- 
		<property name="minIdle" value="5" />
 
- 
	</bean>
 
- 
	<!-- 让spring管理sqlsessionfactory 使用mybatis和spring整合包中的 -->
 
- 
	<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
 
- 
		<!-- 数据库连接池 -->
 
- 
		<property name="dataSource" ref="dataSource" />
 
- 
		<!-- 加载mybatis的全局配置文件 -->
 
- 
		<property name="configLocation" value="classpath:mybatis/SqlMapConfig.xml" />
 
- 
	</bean>
 
- 
	<!-- 自动扫描 将Mapper接口生成代理注入到Spring -->
 
- 
	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
 
- 
		<property name="basePackage" value="com.mapper" />
 
- 
	</bean>
 
- 
</beans>
 
这里用的是阿里的连接池,当然也可以用c3p0,个人建议用阿里
3. 所有的实现类都放到spring容器中管理。由spring创建数据库连接池,并有spring管理实务。
(resource/spring/applicationContext-service.xml)
- 
<?xml version="1.0" encoding="UTF-8"?>
 
- 
<beans xmlns="http://www.springframework.org/schema/beans"
 
- 
	xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
 
- 
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
 
- 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
- 
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
 
- 
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
 
- 
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
 
- 
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
 
- 
		
 
- 
		<!-- spring自动去扫描base-pack下面或者子包下面的java文件-->
 
- 
		<!--管理Service实现类-->
 
- 
		<context:component-scan base-package="com.service"/>
 
- 
</beans>
 
配置spring管理实务
(resource/spring/applicationContext-trans.xml)
- 
<?xml version="1.0" encoding="UTF-8"?>
 
- 
<beans xmlns="http://www.springframework.org/schema/beans"
 
- 
	xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
 
- 
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
 
- 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
- 
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
 
- 
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
 
- 
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
 
- 
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
 
- 
	<!-- 事务管理器 -->
 
- 
	<bean id="transactionManager"
 
- 
		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
 
- 
		<!-- 数据源 -->
 
- 
		<property name="dataSource" ref="dataSource" />
 
- 
	</bean>
 
- 
	<!-- 通知 -->
 
- 
	<tx:advice id="txAdvice" transaction-manager="transactionManager">
 
- 
		<tx:attributes>
 
- 
			<!-- 传播行为 -->
 
- 
			<tx:method name="save*" propagation="REQUIRED" />
 
- 
			<tx:method name="insert*" propagation="REQUIRED" />
 
- 
			<tx:method name="add*" propagation="REQUIRED" />
 
- 
			<tx:method name="create*" propagation="REQUIRED" />
 
- 
			<tx:method name="delete*" propagation="REQUIRED" />
 
- 
			<tx:method name="update*" propagation="REQUIRED" />
 
- 
			<tx:method name="find*" propagation="SUPPORTS" read-only="true" />
 
- 
			<tx:method name="select*" propagation="SUPPORTS" read-only="true" />
 
- 
			<tx:method name="get*" propagation="SUPPORTS" read-only="true" />
 
- 
		</tx:attributes>
 
- 
	</tx:advice>
 
- 
	<!-- 切面 -->
 
- 
	<aop:config>
 
- 
		<aop:advisor advice-ref="txAdvice"
 
- 
			pointcut="execution(* com.service.*.*(..))" />
 
- 
	</aop:config>
 
- 
</beans>
 
4. Springmvc整合spring框架,由springmvc管理controller
(resource/spring/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:p="http://www.springframework.org/schema/p"
 
- 
	xmlns:context="http://www.springframework.org/schema/context"
 
- 
	xmlns:mvc="http://www.springframework.org/schema/mvc"
 
- 
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
 
- 
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
 
- 
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
 
- 
	
 
- 
	<!-- 扫描controller -->
 
- 
	<context:component-scan base-package="com.controller" />
 
- 
	
 
- 
	<!-- Spring 来扫描指定包下的类,并注册被@Component,@Controller,@Service,@Repository等注解标记的组件 -->
 
- 
	<mvc:annotation-driven />
 
- 
	
 
- 
	<!-- 配置SpringMVC的视图解析器-->
 
- 
	<bean
 
- 
		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
 
- 
		<property name="prefix" value="/WEB-INF/jsp/" />
 
- 
		<property name="suffix" value=".jsp" />
 
- 
	</bean>
 
- 
</beans>
 
5. 2中加载的属性配置文件(dbconfig.properties)
根据自己的数据库更改用户名密码以及库
- 
jdbc.driver=com.mysql.jdbc.Driver
 
- 
jdbc.url=jdbc:mysql://localhost:3306/ssm?characterEncoding=utf-8
 
- 
jdbc.username=root
 
- 
jdbc.password=123456
 
6. 配置log4j
(log4j.properties)
- 
log4j.rootLogger=error,CONSOLE,A
 
- 
log4j.addivity.org.apache=false
 
- 
 
 
- 
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
 
- 
log4j.appender.CONSOLE.Threshold=error
 
- 
log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss} -%-4r [%t] %-5p  %x - %m%n
 
- 
log4j.appender.CONSOLE.Target=System.out
 
- 
log4j.appender.CONSOLE.Encoding=gbk
 
- 
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
 
- 
 
 
- 
 
 
- 
log4j.appender.A=org.apache.log4j.DailyRollingFileAppender  
 
- 
log4j.appender.A.File=${catalina.home}/logs/FH_log/PurePro_
 
- 
log4j.appender.A.DatePattern=yyyy-MM-dd'.log'
 
- 
log4j.appender.A.layout=org.apache.log4j.PatternLayout  
 
- 
log4j.appender.A.layout.ConversionPattern=[FH_sys]  %d{yyyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L \: %m%n
 
- 
 
 
- 
 
 
(log4j.xml)
- 
<?xml version="1.0" encoding="UTF-8"?>
 
- 
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
 
- 
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
 
- 
 
 
- 
	<!-- Appenders -->
 
- 
	<appender name="console" class="org.apache.log4j.ConsoleAppender">
 
- 
		<param name="Target" value="System.out" />
 
- 
		<layout class="org.apache.log4j.PatternLayout">
 
- 
			<param name="ConversionPattern" value="%d{yyyy HH:mm:ss} %-5p %c - %m%n" />
 
- 
		</layout>
 
- 
	</appender>
 
- 
	
 
- 
	<!-- Application Loggers -->
 
- 
	<logger name="com">
 
- 
		<level value="error" />
 
- 
	</logger>
 
- 
	
 
- 
	<!-- 3rdparty Loggers -->
 
- 
	<logger name="org.springframework.core">
 
- 
		<level value="error" />
 
- 
	</logger>	
 
- 
	
 
- 
	<logger name="org.springframework.beans">
 
- 
		<level value="error" />
 
- 
	</logger>
 
- 
	
 
- 
	<logger name="org.springframework.context">
 
- 
		<level value="error" />
 
- 
	</logger>
 
- 
 
 
- 
	<logger name="org.springframework.web">
 
- 
		<level value="error" />
 
- 
	</logger>
 
- 
 
 
- 
	<logger name="org.springframework.jdbc">
 
- 
		<level value="error" />
 
- 
	</logger>
 
- 
 
 
- 
	<logger name="org.mybatis.spring">
 
- 
		<level value="error" />
 
- 
	</logger>
 
- 
	<logger name="java.sql">
 
- 
		<level value="error" />
 
- 
	</logger>
 
- 
	<!-- Root Logger -->
 
- 
	<root>
 
- 
		<priority value="error" />
 
- 
		<appender-ref ref="console" />
 
- 
	</root>
 
- 
	
 
- 
</log4j:configuration>
 
SSM框架整合完成,至于mybatis逆向工程生成的mapper.xml和pojo请放到第一张图的目录下
注:逆向工程是根据数据库表反向生成pojo以及mapper.xml,所以,请先自动在数据库配置好user表。逆向工程得配置在下面得链接里面有详细注释。
测试数据库表(User)
private String id;
private String username;
private String password;
private String company;
private Integer age;
private Integer sex;
根据类型创建表即可
逆向工程项目我会贴出链接,解压导入改路径运行main方法就会自动生成了,注意配置生成的路径
逆向工程链接: 链接:https://pan.baidu.com/s/1QvSskH2UEC6EQF7MgVDOAQ 密码:t2pc
到这里项目整合完成,接下来是测试!
 UserController.java
- 
package com.controller;
 
- 
 
 
- 
import javax.annotation.Resource;
 
- 
import javax.servlet.http.HttpServletRequest;
 
- 
import org.springframework.stereotype.Controller;
 
- 
import org.springframework.web.bind.annotation.RequestMapping;
 
- 
import org.springframework.web.servlet.ModelAndView;
 
- 
import com.pojo.User;
 
- 
import com.service.UserService;
 
- 
 
 
- 
@Controller
 
- 
@RequestMapping("/user")  
 
- 
public class UserController {
 
- 
	
 
- 
	@Resource(name="userService")
 
- 
	private UserService userService;
 
- 
	/**
 
- 
	 * 根据id查询
 
- 
	 */
 
- 
	@RequestMapping(value="/queryById")
 
- 
	public ModelAndView queryById(HttpServletRequest request){
 
- 
		ModelAndView mv = new ModelAndView();
 
- 
		String id = request.getParameter("id");
 
- 
		try{
 
- 
			User var = userService.findById(id);
 
- 
			mv.setViewName("index");
 
- 
			mv.addObject("var", var);
 
- 
		} catch(Exception e){
 
- 
            e.printStackTrace();
 
- 
		}
 
- 
		return mv;
 
- 
	}
 
- 
}
 
UserService.java
- 
package com.service;
 
- 
 
 
- 
import javax.annotation.Resource;
 
- 
 
 
- 
import org.springframework.stereotype.Service;
 
- 
 
 
- 
import com.mapper.UserMapper;
 
- 
import com.pojo.User;
 
- 
 
 
- 
@Service("userService")
 
- 
public class UserService {
 
- 
	@Resource
 
- 
	private UserMapper dao;
 
- 
	/*
 
- 
	* 通过id获取数据
 
- 
	*/
 
- 
	public User findById(String id)throws Exception{
 
- 
		return (User)dao.selectByPrimaryKey(id);
 
- 
	}
 
- 
}
 
补上之前漏掉得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_2_5.xsd"
 
- 
	id="WebApp_ID" version="2.5">
 
- 
	<welcome-file-list>
 
- 
		<welcome-file>index.jsp</welcome-file>
 
- 
	</welcome-file-list>
 
- 
	<!-- 加载spring容器 -->
 
- 
	<context-param>
 
- 
		<param-name>contextConfigLocation</param-name>
 
- 
		<param-value>classpath:spring/applicationContext*.xml</param-value>
 
- 
	</context-param>
 
- 
	<listener>
 
- 
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 
- 
	</listener>
 
- 
 
 
- 
	<!-- 解决post乱码 -->
 
- 
	<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>
 
- 
 
 
- 
 
 
- 
	<!-- springmvc的前端控制器 -->
 
- 
<!-- 	<servlet>
 
- 
		<servlet-name>taotao-manager</servlet-name>
 
- 
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 
- 
		contextConfigLocation不是必须的, 如果不配置contextConfigLocation, springmvc的配置文件默认在:WEB-INF/servlet的name+"-servlet.xml"
 
- 
		<init-param>
 
- 
			<param-name>contextConfigLocation</param-name>
 
- 
			<param-value>classpath:spring/springmvc.xml</param-value>
 
- 
		</init-param>
 
- 
		<load-on-startup>1</load-on-startup>
 
- 
	</servlet>
 
- 
	<servlet-mapping>
 
- 
		<servlet-name>SSM</servlet-name>
 
- 
		<url-pattern>/</url-pattern>
 
- 
	</servlet-mapping> -->
 
- 
	
 
- 
	  <servlet>
 
- 
    <servlet-name>springMvc</servlet-name>
 
- 
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 
- 
    <init-param>
 
- 
      <param-name>contextConfigLocation</param-name>
 
- 
      <param-value>classpath:spring/springmvc.xml</param-value>
 
- 
    </init-param>
 
- 
    <load-on-startup>1</load-on-startup>
 
- 
  </servlet>
 
- 
  <servlet-mapping>
 
- 
    <servlet-name>springMvc</servlet-name>
 
- 
    <url-pattern>/</url-pattern>
 
- 
  </servlet-mapping>
 
- 
	
 
- 
</web-app>
 
为节省篇幅,更快的搭建成功,这里只写了一个方法,根据id查询数据
WebContent/index.jsp
- 
<%@ page language="java" contentType="text/html; charset=utf-8"
 
- 
    pageEncoding="utf-8"%>
 
- 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
- 
<%
 
- 
	String path = request.getContextPath();
 
- 
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 
- 
%>
 
- 
<html>
 
- 
<head>
 
- 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
- 
<title>查询用户</title>
 
- 
</head>
 
- 
<body>
 
- 
	<form action="user/queryById.do" method="post">
 
- 
		输入要查询的id:	<input type="text" name="id" value="123456"/>
 
- 
		<button type="submit">提交</button>
 
- 
	</form>
 
- 
</body>
 
- 
</html>
 
WebContent/WEB-INF/jsp/index.jsp
- 
<%@ page language="java" contentType="text/html; charset=utf-8"
 
- 
    pageEncoding="utf-8"%>
 
- 
<%@page import="com.pojo.*"%>
 
- 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
- 
<html>
 
- 
<head>
 
- 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
- 
<title>Insert title here</title>
 
- 
<style type="text/css">
 
- 
	.td td{
 
- 
		width: 100px;
 
- 
	}
 
- 
	.table{
 
- 
		text-align: center;
 
- 
		margin: 0 auto;
 
- 
	}
 
- 
</style>
 
- 
</head>
 
- 
<body>
 
- 
<%
 
- 
	User user = ((User)request.getAttribute("var"));
 
- 
%>
 
- 
 
 
- 
	<table class="table">
 
- 
		<tr class="td">
 
- 
			<td>ID</td>
 
- 
			<td>用户名</td>
 
- 
			<td>密码</td>
 
- 
			<td style="width: 200px">公司</td>
 
- 
			<td>年龄</td>
 
- 
			<td>性别</td>
 
- 
		</tr>
 
- 
<%if(user!=null){%>
 
- 
		<tr class="td">
 
- 
			<td><%=user.getId()%></td>
 
- 
			<td><%=user.getUsername()%></td>
 
- 
			<td><%=user.getPassword()%></td>
 
- 
			<td><%=user.getCompany()%></td>
 
- 
			<td><%=user.getAge()%></td>
 
- 
			<td><%=user.getSex()==1?"男":"女"%></td>
 
- 
		</tr>
 
- 
	<%}else{ %>
 
- 
		<tr class="td">
 
- 
			<td style="color: red;">暂无相关数据</td>
 
- 
		</tr>
 
- 
<%} %>
 
- 
	</table>
 
- 
 
 
- 
</body>
 
- 
</html>
 
启动项目,输入localhost:8080/SSM 访问
为方便新手查错,博主按照博文重新搭建了一次,测试无误后将项目打包,上传至云盘,供您使用。(建议:希望您按照博文从头搭建,便于印象深刻)
项目完整链接(含数据库): https://pan.baidu.com/s/17O8HgkoSYblFfC3uziMrdA 密码:cw77
更多链接
SSM 框架-05-详细整合教程(Eclipse版)(Spring+SpringMVC+MyBatis)的更多相关文章
- SSM 框架-06-详细整合教程(IDEA版)(Spring+SpringMVC+MyBatis)
		
SSM 框架-06-详细整合教程(IDEA版)(Spring+SpringMVC+MyBatis) SSM(Spring.Spring MVC和Mybatis)如果你使用的是 Eclipse,请查看: ...
 - SSM框架搭建web服务器实现登录功能(Spring+SpringMVC+Mybatis)
		
初学java EE,虽然知道使用框架会使开发更加便捷高效,但是对于初学者来说,感到使用框架比较迷惑,尤其是各种jar包的引用.各种框架的配置.注解的使用等等. 最好的学习方法就是实践,于是下载了一个现 ...
 - SSM框架简介及整合教程
		
1.Spring Spring 框架是 Java 应用最广的框架,它的成功来源于理念,而不是技术本身,它的理念包括 IoC (控制反转) 和 A面向切面编程).Spring框架是个轻量级的Java E ...
 - SSM整合+WebUpload使用(spring+springmvc+mybatis+maven)
		
SSM框架整合以及webupload的集成与使用 在项目中最近用到了webupload.js,也方方面面遇到了不少问题,比如上传文件前对表单参数校验,当校验失败不予提交,及在文件上传成功后,选择同 ...
 - 记录-项目java项目框架搭建的一些问题(maven+spring+springmvc+mybatis)
		
伴随着项目框架的落成后,本以为启动就能成功的,but.... 项目启动开始报错误1:java.lang.ClassNotFoundException: org.springframework.web. ...
 - Spring+SpringMvc+Mybatis框架集成搭建教程
		
一.背景 最近有很多同学由于没有过SSM(Spring+SpringMvc+Mybatis , 以下简称SSM)框架的搭建的经历,所以在自己搭建SSM框架集成的时候,出现了这样或者那样的问题,很是苦恼 ...
 - Spring+SpringMVC+Mybatis(SSM)框架集成搭建
		
Spring+SpringMVC+Mybatis框架集成搭建教程 一.背景 最近有很多同学由于没有过SSM(Spring+SpringMvc+Mybatis , 以下简称SSM)框架的搭建的经历,所以 ...
 - SSM框架——详细整合教程
		
SSM框架——详细整合教程(Spring+SpringMVC+MyBatis) 1.基本概念 1.1.Spring Spring是一个开源框架,Spring是于2003 年兴起的一个轻量级的Jav ...
 - SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)【转载】
		
最近在学习Spring+SpringMVC+MyBatis的整合.以下是参考网上的资料自己实践操作的详细步骤. 1.基本概念 1.1.Spring Spring是一个开源框架,Spring是于20 ...
 
随机推荐
- testng XMl 参数化
			
方法一: 方法二: 方法三: (1)如果测试的数据较多的情况下,很显然这种方式不适合,那么可以通过@DataProvider生成测试数据,通过@Test(dataProvider = "&q ...
 - js实现瀑布流布局
			
window.onload = function () { var d1 = new Waterfall(); d1.init();};//构造函数function Waterfall() { thi ...
 - 高性能的数据压缩库libzling-20140324
			
libzling(https://github.com/richox/libzling,求观看[watch],求星[star],求叉[fork])是一款高性能的数据压缩库,在压缩时间和压缩率上都超过了 ...
 - 对于maven创建spark项目的pom.xml配置文件(图文详解)
			
不多说,直接上干货! http://mvnrepository.com/ 这里,怎么创建,见 Spark编程环境搭建(基于Intellij IDEA的Ultimate版本)(包含Java和Scala版 ...
 - Ubuntu14.04下Cloudera安装搭建部署大数据集群(图文分五大步详解)(博主强烈推荐)(在线或离线)
			
第一步: Cloudera Manager安装之Cloudera Manager安装前准备(Ubuntu14.04)(一) 第二步: Cloudera Manager安装之时间服务器和时间客户端(Ub ...
 - JavaScript设计模式-5.接口
			
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
 - js 页面间的通信
			
看了一下公司原来的代码,原页面ajax post返回一个页面完整的HTML,然后再打开一个新页面并输出ajax返回的所有代码到新页面上,在新页面上以表单提交的形式实现重定向. 任凭我想了半天也没想出来 ...
 - file_get_contents 抓取网页乱码。
			
iconv string iconv ( string $in_charset , string $out_charset , string $str ) mb_convert_encoding st ...
 - CSS选择器详解(二)通用选择器和高级选择器
			
目录 通用选择器 高级选择器 子选择器 相邻兄弟选择器 属性选择器 通用选择器 通用选择器可以选择页面上的所有元素,并对它们应用样式,用 * 来表示. 语法: * { property1: value ...
 - i.mx6 Android5.1.1 Zygote
			
0. 总结: 0.1 相关源码目录: framework/base/cmds/app_process/app_main.cppframeworks/base/core/jni/AndroidRunti ...