SSM【史上最详细整合】

SSM框架讲解(史上最详细的文章) SSM框架是spring、springMVC、和mybatis框架的整合,是标准的MVC模式。标准的SSM框架有四层,分别是dao层(mapper),service层,controller层和View层。使用spring实现业务对象管理,使用springMVC负责请求的转发和视图管理,mybatis作为数据对象的持久化引擎。1)持久层dao层(mapper)层作用主要是做数据持久层的工作,负责与数据库进行联络的一些任务都封装在此。2)业务层Service层作用3)表现层作用作用。... 阅读详情

导入开发包

整合Spring与Mybatis

相关的配置文件

log4j.properties

# Rules reminder:# DEBUG < INFO < WARN < ERROR < FATAL# Global logging configurationlog4j.rootLogger=debug,stdout# My logging configuration...log4j.logger.cn.jbit.mybatisdemo=DEBUG## Console output...log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern=%5p %d %C: %m%nlog4j.logger.org.apache.ibatis=DEBUG## log4j.logger.org.apache.jdbc.SimpleDataSource=DEBUGlog4j.logger.org.apache.ibatis.jdbc.ScriptRunner=DEBUG## log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapclientDelegate=DEBUGlog4j.logger.java.sql.Connection=DEBUGlog4j.logger.java.sql.Statement=DEBUGlog4j.logger.java.sql.PreparedStatement=DEBUG

# Global logging configuration
log4j.rootLogger=debug,stdout

# My logging configuration...
log4j.logger.cn.jbit.mybatisdemo=DEBUG


## Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p %d %C: %m%n

log4j.logger.org.apache.ibatis=DEBUG
## log4j.logger.org.apache.jdbc.SimpleDataSource=DEBUG
log4j.logger.org.apache.ibatis.jdbc.ScriptRunner=DEBUG
## log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapclientDelegate=DEBUG
log4j.logger.java.sql.Connection=DEBUG
log4j.logger.java.sql.Statement=DEBUG
log4j.logger.java.sql.PreparedStatement=DEBUG

myBatis-config.xml文件

通过package, 可以直接指定package的名字, mybatis会自动扫描你指定包下面的javabean,并且默认设置一个别名,默认的名字为非限定类名来作为它的别名。

<?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><!-- 通过别名简化对类的使用 --><typeAliases><!--         <typeAlias type="cn.itcast.scm.entity.Dept" alias="Dept" /> --> <!--         通过package, 可以直接指定package的名字, mybatis会自动扫描你指定包下面的javabean,      并且默认设置一个别名,默认的名字为非限定类名来作为它的别名。           --> <package name="zhongfucheng.entity"/> </typeAliases><!--     <mappers>        <mapper resource="cn/itcast/scm/entity/DeptMapper.xml" />    </mappers>         --></configuration>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>
<!-- 通过别名简化对类的使用 -->
<typeAliases>
<!--         <typeAlias type="cn.itcast.scm.entity.Dept" alias="Dept" />
-->

<!--
       通过package, 可以直接指定package的名字, mybatis会自动扫描你指定包下面的javabean,
     并且默认设置一个别名,默认的名字为非限定类名来作为它的别名。    
      -->


<package name="zhongfucheng.entity"/>
</typeAliases>

<!--     <mappers>
       <mapper resource="cn/itcast/scm/entity/DeptMapper.xml" />
   </mappers>
        -->

</configuration>

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:tx="http://www.springframework.org/schema/tx"       xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"       xmlns:p="http://www.springframework.org/schema/p"       xsi:schemaLocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans-3.2.xsd    http://www.springframework.org/schema/context     http://www.springframework.org/schema/context/spring-context-3.2.xsd    http://www.springframework.org/schema/tx     http://www.springframework.org/schema/tx/spring-tx-3.2.xsd    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">    <!-- 配置数据源,记得去掉myBatis-config.xml的数据源相关配置 -->    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">        <property name="driverClass" value="com.mysql.jdbc.Driver" />        <property name="jdbcUrl"                  value="jdbc:mysql://localhost:3306/scm?useUnicode=true&amp;characterEncoding=UTF-8" />        <property name="user" value="root" />        <property name="password" value="root" />    </bean>    <!-- 配置session工厂 -->    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">        <property name="dataSource" ref="dataSource" />        <property name="configLocation" value="classpath:myBatis-config.xml" />        <!--配置扫描式加载SQL映射文件,记得去掉mybatis-config配置-->    <!--    <property name="mapperLocations" value="classpath:zhongfucheng/dao/*.xml"/>-->    </bean>    <!-- 配置事务管理器,管理数据源事务处理 -->    <bean id="transactionManager"          class="org.springframework.jdbc.datasource.DataSourceTransactionManager">        <property name="dataSource" ref="dataSource" />    </bean>    <!-- 配置事务通知 -->    <tx:advice id="advice" transaction-manager="transactionManager">        <tx:attributes>            <!-- 默认只处理运行时异常,可加rollback-for="Exception/Throwable"等处理所有异常或包括错误 -->            <tx:method name="insert*" propagation="REQUIRED"                       rollback-for="Exception" />            <tx:method name="update*" propagation="REQUIRED"                       rollback-for="Exception" />            <tx:method name="delete*" propagation="REQUIRED"                       rollback-for="Exception" />            <tx:method name="*" propagation="SUPPORTS" />        </tx:attributes>    </tx:advice>    <!-- 配置切面织入的范围,后边要把事务边界定在service层 -->    <aop:config>        <aop:advisor advice-ref="advice"                     pointcut="execution(* cn.itcast.scm.service.impl.*.*(..))" />    </aop:config>    <!-- 配置SessionTemplate,已封装了繁琐的数据操作,提交事务都不用做了。 -->    <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">        <constructor-arg name="sqlSessionFactory" ref="sqlSessionFactory" />    </bean>    <!-- <context:component-scan base-package="*" /> -->    <!-- 自动扫描组件,要把controller去除,他们是在spring-mvc.xml中配置,如果不去除会影响事务管理。 -->    <context:component-scan base-package="cn.itcast">        <context:exclude-filter type="annotation"                                expression="org.springframework.stereotype.Controller" />    </context:component-scan>    <!-- 配置 转换器,对于在basePackage设置的包(包括子包)下的接口类,    如果接口类的全类名在Mapper.xml文件中和定义过命名空间一致,     将被转换成spring的BEAN,在调用         的地方通过@Autowired方式将可以注入接口实例 --><!--    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">        <property name="sqlSessionFactory" ref="sqlSessionFactory" />        &lt;!&ndash;这里包名留意要不要改&ndash;&gt;        <property name="basePackage" value="zhongfucheng.dao" />    </bean>--></beans>
<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
      xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
      xmlns:p="http://www.springframework.org/schema/p"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
   http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring-context-3.2.xsd
   http://www.springframework.org/schema/tx
   http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
   http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd"
>



   <!-- 配置数据源,记得去掉myBatis-config.xml的数据源相关配置 -->
   <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
       <property name="driverClass" value="com.mysql.jdbc.Driver" />
       <property name="jdbcUrl"
                 value="jdbc:mysql://localhost:3306/scm?useUnicode=true&amp;characterEncoding=UTF-8" />

       <property name="user" value="root" />
       <property name="password" value="root" />
   </bean>
   <!-- 配置session工厂 -->
   <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
       <property name="dataSource" ref="dataSource" />
       <property name="configLocation" value="classpath:myBatis-config.xml" />
       <!--配置扫描式加载SQL映射文件,记得去掉mybatis-config配置-->
   <!--    <property name="mapperLocations" value="classpath:zhongfucheng/dao/*.xml"/>-->


   </bean>

   <!-- 配置事务管理器,管理数据源事务处理 -->
   <bean id="transactionManager"
         class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

       <property name="dataSource" ref="dataSource" />
   </bean>
   <!-- 配置事务通知 -->
   <tx:advice id="advice" transaction-manager="transactionManager">
       <tx:attributes>
           <!-- 默认只处理运行时异常,可加rollback-for="Exception/Throwable"等处理所有异常或包括错误 -->
           <tx:method name="insert*" propagation="REQUIRED"
                      rollback-for="Exception" />

           <tx:method name="update*" propagation="REQUIRED"
                      rollback-for="Exception" />

           <tx:method name="delete*" propagation="REQUIRED"
                      rollback-for="Exception" />

           <tx:method name="*" propagation="SUPPORTS" />
       </tx:attributes>
   </tx:advice>
   <!-- 配置切面织入的范围,后边要把事务边界定在service层 -->
   <aop:config>
       <aop:advisor advice-ref="advice"
                    pointcut="execution(* cn.itcast.scm.service.impl.*.*(..))" />

   </aop:config>
   <!-- 配置SessionTemplate,已封装了繁琐的数据操作,提交事务都不用做了。 -->
   <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
       <constructor-arg name="sqlSessionFactory" ref="sqlSessionFactory" />
   </bean>

   <!-- <context:component-scan base-package="*" /> -->


   <!-- 自动扫描组件,要把controller去除,他们是在spring-mvc.xml中配置,如果不去除会影响事务管理。 -->
   <context:component-scan base-package="cn.itcast">
       <context:exclude-filter type="annotation"
                               expression="org.springframework.stereotype.Controller" />

   </context:component-scan>

   <!-- 配置 转换器,对于在basePackage设置的包(包括子包)下的接口类,
   如果接口类的全类名在Mapper.xml文件中和定义过命名空间一致,
    将被转换成spring的BEAN,在调用
       的地方通过@Autowired方式将可以注入接口实例 -->


<!--
   <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
       <property name="sqlSessionFactory" ref="sqlSessionFactory" />

       &lt;!&ndash;这里包名留意要不要改&ndash;&gt;
       <property name="basePackage" value="zhongfucheng.dao" />
   </bean>
-->




</beans>

编写实体及sql映射文件

SQL脚本

drop database if exists mybatis;create database mybatis CHARACTER SET UTF8;use mybatis;create table dept(    dept_id int primary key auto_increment,    dept_name varchar(50),    dept_address varchar(50));insert into dept(dept_name,dept_address) values('研发部一部','广州');insert into dept(dept_name,dept_address) values('研发部二部','广州');insert into dept(dept_name,dept_address) values('研发部三部','深圳');select * from dept;database if exists mybatis;
create database mybatis CHARACTER SET UTF8;
use mybatis;

create table dept(
   dept_id int primary key auto_increment,
   dept_name varchar(50),
   dept_address varchar(50)
);


insert into dept(dept_name,dept_address) values('研发部一部','广州');
insert into dept(dept_name,dept_address) values('研发部二部','广州');
insert into dept(dept_name,dept_address) values('研发部三部','深圳');
select * from dept;

实体:

package zhongfucheng.entity;import java.io.Serializable;public class Dept implements Serializable {    private Integer deptId;    private String deptName;    private String deptAddress;    public Integer getDeptId() {        return deptId;    }    public void setDeptId(Integer deptId) {        this.deptId = deptId;    }    public String getDeptName() {        return deptName;    }    public void setDeptName(String deptName) {        this.deptName = deptName;    }    public String getDeptAddress() {        return deptAddress;    }    public void setDeptAddress(String deptAddress) {        this.deptAddress = deptAddress;    }    @Override    public String toString() {        return "Dept [deptId=" + deptId + ", deptName=" + deptName                + ", deptAddress=" + deptAddress + "]";    }}

import java.io.Serializable;

public class Dept implements Serializable {
   private Integer deptId;
   private String deptName;
   private String deptAddress;
   public Integer getDeptId() {
       return deptId;
   }
   public void setDeptId(Integer deptId) {
       this.deptId = deptId;
   }
   public String getDeptName() {
       return deptName;
   }
   public void setDeptName(String deptName) {
       this.deptName = deptName;
   }
   public String getDeptAddress() {
       return deptAddress;
   }
   public void setDeptAddress(String deptAddress) {
       this.deptAddress = deptAddress;
   }
   @Override
   public String toString() {
       return "Dept [deptId=" + deptId + ", deptName=" + deptName
               + ", deptAddress=" + deptAddress + "]";
   }

}

映射文件

<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="zhongfucheng.entity.DeptMapper">    <resultMap type="Dept" id="deptResultMap">        <id property="deptId" column="dept_id" />        <result property="deptName" column="dept_name" />        <result property="deptAddress" column="dept_address" />    </resultMap>    <!-- id和命名空间用来定位SQL语句,parameterType表示参数的类型,resultMap返回类型 -->    <select id="selectDept" parameterType="Integer" resultMap="deptResultMap">        <!--参数的写法#{deptID} -->        select * from dept where dept_id=#{deptID}    </select>    <insert id="insertDept" parameterType="Dept">        insert into dept(dept_name,dept_address) values(#{deptName},#{deptAddress});    </insert></mapper>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="zhongfucheng.entity.DeptMapper">
   <resultMap type="Dept" id="deptResultMap">
       <id property="deptId" column="dept_id" />
       <result property="deptName" column="dept_name" />
       <result property="deptAddress" column="dept_address" />
   </resultMap>
   <!-- id和命名空间用来定位SQL语句,parameterType表示参数的类型,resultMap返回类型 -->
   <select id="selectDept" parameterType="Integer" resultMap="deptResultMap">
       <!--参数的写法#{deptID} -->
       select * from dept where dept_id=#{deptID}
   </select>

   <insert id="insertDept" parameterType="Dept">
       insert into dept(dept_name,dept_address) values(#{deptName},#{deptAddress});
   </insert>

</mapper>

mybatis配置文件加载映射文件

<?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><!-- 通过别名简化对类的使用 --><typeAliases><!--         <typeAlias type="cn.itcast.scm.entity.Dept" alias="Dept" /> --> <!--         通过package, 可以直接指定package的名字, mybatis会自动扫描你指定包下面的javabean,      并且默认设置一个别名,默认的名字为非限定类名来作为它的别名。           --> <!--这里的包名留意要不要改--> <package name="zhongfucheng.entity"/> </typeAliases>    <mappers>        <mapper resource="zhongfucheng/dao/DeptMapper.xml" />    </mappers></configuration>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>
<!-- 通过别名简化对类的使用 -->
<typeAliases>
<!--         <typeAlias type="cn.itcast.scm.entity.Dept" alias="Dept" />
-->

<!--
       通过package, 可以直接指定package的名字, mybatis会自动扫描你指定包下面的javabean,
     并且默认设置一个别名,默认的名字为非限定类名来作为它的别名。    
      -->


<!--这里的包名留意要不要改-->
<package name="zhongfucheng.entity"/>
</typeAliases>

   <mappers>
       <mapper resource="zhongfucheng/dao/DeptMapper.xml" />
   </mappers>

</configuration>

编写Dao以及实现

接口

package zhongfucheng.dao;import zhongfucheng.entity.Dept;/** * Created by ozc on 2017/8/8. */public interface DeptDao {    Dept selectDept(Integer deptId);    int insertDept(Dept dept);}

import zhongfucheng.entity.Dept;

/**
* Created by ozc on 2017/8/8.
*/


public interface DeptDao {
   Dept selectDept(Integer deptId);
   int insertDept(Dept dept);
}

实现:

package zhongfucheng.dao.impl;import org.mybatis.spring.SqlSessionTemplate;import org.springframework.stereotype.Repository;import zhongfucheng.entity.Dept;import javax.annotation.Resource;/** * Created by ozc on 2017/8/8. */@Repository("deptDao")public class DeptDaoImpl implements zhongfucheng.dao.DeptDao {    @Resource    private SqlSessionTemplate sqlSessionTemplate;    /**     * 根据部门编号查询部门信息     * @param deptId 部门编号     * @return 部门信息     */    @Override    public Dept selectDept(Integer deptId){        Dept dept=    sqlSessionTemplate.selectOne("zhongfucheng.entity.DeptMapper.selectDept", deptId);        return dept;    }    /**     * 添加部门信息     * @param dept 部门信息     * @return 添加成功的记录数     */    @Override    public int insertDept(Dept dept){        System.out.println("------dao.dept:"+dept);        return sqlSessionTemplate.insert("zhongfucheng.entity.DeptMapper.insertDept", dept);    }}

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;
import zhongfucheng.entity.Dept;

import javax.annotation.Resource;

/**
* Created by ozc on 2017/8/8.
*/

@Repository("deptDao")
public class DeptDaoImpl implements zhongfucheng.dao.DeptDao {

   @Resource
   private SqlSessionTemplate sqlSessionTemplate;

   /**
    * 根据部门编号查询部门信息
    * @param deptId 部门编号
    * @return 部门信息
    */

   @Override
   public Dept selectDept(Integer deptId){
       Dept dept=    sqlSessionTemplate.selectOne("zhongfucheng.entity.DeptMapper.selectDept", deptId);
       return dept;
   }
   /**
    * 添加部门信息
    * @param dept 部门信息
    * @return 添加成功的记录数
    */

   @Override
   public int insertDept(Dept dept){
       System.out.println("------dao.dept:"+dept);
       return sqlSessionTemplate.insert("zhongfucheng.entity.DeptMapper.insertDept", dept);
   }
}

测试spring与mybatis整合

import org.junit.AfterClass;import org.junit.BeforeClass;import org.junit.Test;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;import zhongfucheng.dao.impl.DeptDaoImpl;import zhongfucheng.entity.Dept;/** * Created by ozc on 2017/8/8. */public class TestDeptDao {    //@Resource //这里没法使用,后继版本有其它方式可以注入    static private DeptDaoImpl deptDao;    @BeforeClass    public static void setUpBeforeClass() throws Exception {        ApplicationContext context =new ClassPathXmlApplicationContext("applicationContext.xml");        deptDao=(DeptDaoImpl) context.getBean("deptDao");    }    @AfterClass    public static void tearDownAfterClass() throws Exception {    }    @Test    public void testSelectDept() {        System.out.println(deptDao.selectDept(1));    }    @Test    public void testInsertDept() {        Dept dept=new Dept();        //dept.setDeptId(117);        dept.setDeptName("name117");        dept.setDeptAddress("address117");        System.out.println("受影响行数:"+deptDao.insertDept(dept));    }}
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import zhongfucheng.dao.impl.DeptDaoImpl;
import zhongfucheng.entity.Dept;

/**
* Created by ozc on 2017/8/8.
*/

public class TestDeptDao {

   //@Resource //这里没法使用,后继版本有其它方式可以注入
   static private DeptDaoImpl deptDao;
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
       ApplicationContext context =new ClassPathXmlApplicationContext("applicationContext.xml");
       deptDao=(DeptDaoImpl) context.getBean("deptDao");
   }

   @AfterClass
   public static void tearDownAfterClass() throws Exception {
   }

   @Test
   public void testSelectDept() {
       System.out.println(deptDao.selectDept(1));
   }

   @Test
   public void testInsertDept() {
       Dept dept=new Dept();
       //dept.setDeptId(117);
       dept.setDeptName("name117");
       dept.setDeptAddress("address117");
       System.out.println("受影响行数:"+deptDao.insertDept(dept));
   }
}

整合SpringMVC

配置文件

spring-mvc.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:mvc="http://www.springframework.org/schema/mvc"    xmlns:context="http://www.springframework.org/schema/context"    xmlns:p="http://www.springframework.org/schema/p"    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd    ">    <!-- 同时开启json格式的支持 -->    <mvc:annotation-driven></mvc:annotation-driven>    <!-- <context:component-scan base-package="*"/> -->    <!-- 扫描所有的controller 但是不扫描service -->    <context:component-scan base-package="zhongfucheng">        <context:include-filter type="annotation"            expression="org.springframework.stereotype.Controller" />        <context:exclude-filter type="annotation"            expression="org.springframework.stereotype.Service" />    </context:component-scan></beans>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:mvc="http://www.springframework.org/schema/mvc"
   xmlns:context="http://www.springframework.org/schema/context"
   xmlns:p="http://www.springframework.org/schema/p"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
   http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
   "
>

   <!-- 同时开启json格式的支持 -->
   <mvc:annotation-driven></mvc:annotation-driven>
   <!-- <context:component-scan base-package="*"/> -->

   <!-- 扫描所有的controller 但是不扫描service -->
   <context:component-scan base-package="zhongfucheng">
       <context:include-filter type="annotation"
           expression="org.springframework.stereotype.Controller" />

       <context:exclude-filter type="annotation"
           expression="org.springframework.stereotype.Service" />

   </context:component-scan>



</beans>

web.xml

<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"         version="3.1">    <!--Spring监听器-->    <listener>        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>    </listener>    <context-param>        <param-name>contextConfigLocation</param-name>        <param-value>classpath:applicationContext.xml</param-value>    </context-param>    <!--Mvc分配器-->    <servlet>        <servlet-name>mvc</servlet-name>        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>        <init-param>            <param-name>contextConfigLocation</param-name>            <param-value>classpath:spring-mvc.xml</param-value>        </init-param>        <load-on-startup>1</load-on-startup>    </servlet>    <servlet-mapping>        <servlet-name>mvc</servlet-name>        <url-pattern>*.action</url-pattern>    </servlet-mapping>    <!--中文过滤器-->    <filter>        <filter-name>encodingFilter</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>encodingFilter</filter-name>        <url-pattern>/*</url-pattern>    </filter-mapping></web-app>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
        version="3.1">



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


   <!--Mvc分配器-->
   <servlet>
       <servlet-name>mvc</servlet-name>
       <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
       <init-param>
           <param-name>contextConfigLocation</param-name>
           <param-value>classpath:spring-mvc.xml</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
       <servlet-name>mvc</servlet-name>
       <url-pattern>*.action</url-pattern>
   </servlet-mapping>

   <!--中文过滤器-->
   <filter>
       <filter-name>encodingFilter</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>encodingFilter</filter-name>
       <url-pattern>/*</url-pattern>
   </filter-mapping>
</web-app>

编写Action

package zhongfucheng.action;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import zhongfucheng.dao.impl.DeptDaoImpl;import zhongfucheng.entity.Dept;import javax.annotation.Resource;/** * Created by ozc on 2017/8/8. */@Controller@RequestMapping(value="/dept")public class DeptAction {    @Resource    private DeptDaoImpl deptDao;    @RequestMapping(value="/insert")    public String insert(Dept dept){        System.out.println("---action.dept:"+dept);        deptDao.insertDept(dept);        return "forward:/jsp/main.jsp";    }}

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import zhongfucheng.dao.impl.DeptDaoImpl;
import zhongfucheng.entity.Dept;

import javax.annotation.Resource;

/**
* Created by ozc on 2017/8/8.
*/

@Controller
@RequestMapping(value="/dept")
public class DeptAction {
   @Resource
   private DeptDaoImpl deptDao;

   @RequestMapping(value="/insert")
   public String insert(Dept dept){

       System.out.println("---action.dept:"+dept);
       deptDao.insertDept(dept);
       return "forward:/jsp/main.jsp";
   }
}

测试SSI整合

index.jsp页面

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><html><head></head><body>    <form action="dept/insert.action" method="post">        名称:<input type="text"   name="deptName"><br>         地址:<input type="text" name="deptAddress"><br>        <input type="submit" value="ok">    </form></body></html>
<html>
<head>
</head>
<body>
   <form action="dept/insert.action" method="post">
       名称:<input type="text"   name="deptName"><br>
       地址:<input type="text" name="deptAddress"><br>
       <input type="submit" value="ok">
   </form>
</body>
</html>

main.jsp页面:

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><html><head></head><body> this is main jsp</body></html>
<html>
<head>
</head>
<body>
this is main jsp
</body>
</html>
640?wx_fmt=png
这里写图片描述

优化

如果想要Spring与Mybatis更加完美地结合,其实我们的Dao并不需要写实现,直接写接口和映射文件就行了,这样一来,我们就可以舍弃DaoImpl了。

在Spring配置文件中加入以下的代码:

    <!-- 配置 转换器,对于在basePackage设置的包(包括子包)下的接口类,        如果接口类的全类名在Mapper.xml文件中和定义过命名空间一致,        将被转换成spring的BEAN,在调用的地方通过@Autowired方式将可以注入接口实例 -->    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">        <property name="sqlSessionFactory" ref="sqlSessionFactory" />        <!--这里包名留意要不要改-->        <property name="basePackage" value="zhongfucheng.dao" />    </bean>
   <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
       <property name="sqlSessionFactory" ref="sqlSessionFactory" />

       <!--这里包名留意要不要改-->
       <property name="basePackage" value="zhongfucheng.dao" />
   </bean>

我们的映射文件中把命名空间写成是Dao的全路径

//Dao的全路径,那么Spring就会自动帮我们创建对象,注入进去<mapper namespace="zhongfucheng.dao.DeptDao">    <resultMap type="Dept" id="deptResultMap">        <id property="deptId" column="dept_id" />        <result property="deptName" column="dept_name" />        <result property="deptAddress" column="dept_address" />    </resultMap>    <!-- id和命名空间用来定位SQL语句,parameterType表示参数的类型,resultMap返回类型 -->    <select id="selectDept" parameterType="Integer" resultMap="deptResultMap">        <!--参数的写法#{deptID} -->        select * from dept where dept_id=#{deptID}    </select>    <insert id="insertDept" parameterType="Dept">        insert into dept(dept_name,dept_address) values(#{deptName},#{deptAddress});    </insert></mapper><mapper namespace="zhongfucheng.dao.DeptDao">
   <resultMap type="Dept" id="deptResultMap">
       <id property="deptId" column="dept_id" />
       <result property="deptName" column="dept_name" />
       <result property="deptAddress" column="dept_address" />
   </resultMap>

   <!-- id和命名空间用来定位SQL语句,parameterType表示参数的类型,resultMap返回类型 -->
   <select id="selectDept" parameterType="Integer" resultMap="deptResultMap">
       <!--参数的写法#{deptID} -->
       select * from dept where dept_id=#{deptID}
   </select>

   <insert id="insertDept" parameterType="Dept">
       insert into dept(dept_name,dept_address) values(#{deptName},#{deptAddress});
   </insert>

</mapper>

在配置工厂的时候,我们可以配置mapperLocations属性,这样一来,我们就不用在Mybatis中逐个加载配置文件了。

    <!-- 配置session工厂 -->    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">        <property name="dataSource" ref="dataSource" />        <!--这里的路径和名字留意要不要改-->        <property name="configLocation" value="classpath:myBatis-config.xml" />        <!--配置扫描式加载SQL映射文件,记得去掉mybatis-config配置,使用了这个,在Mybatis配置文件中就不用加载对应的映射文件了-->        <!--这里留意路径是否要改-->        <property name="mapperLocations" value="classpath:zhongfucheng/dao/*.xml"/>    </bean>
   <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
       <property name="dataSource" ref="dataSource" />
       <!--这里的路径和名字留意要不要改-->
       <property name="configLocation" value="classpath:myBatis-config.xml" />

       <!--配置扫描式加载SQL映射文件,记得去掉mybatis-config配置,使用了这个,在Mybatis配置文件中就不用加载对应的映射文件了-->
       <!--这里留意路径是否要改-->
       <property name="mapperLocations" value="classpath:zhongfucheng/dao/*.xml"/>
   </bean>

总结

SSM整合和SSH整合的步骤差不多

如果文章有错的地方欢迎指正,大家互相交流。习惯在微信看技术文章,想要获取更多的Java资源的同学,可以关注微信公众号:Java3y


VLA模型(具身智能入门十) Vision Language Action(VLA)模型VLA模型是机器人领域的“感知-理解-执行”一体化框架,通过Transformer架构融合视觉、语言、动作模态,核心目标是让机器人在自然语言驱动下,自主完成复杂操控任务。其定义的核心在于“跨模态统一”与“具象化行动”——不仅能“看懂”“听懂”,更能“做出正确的动作”,是实现通用机器人智能的关键方向。提供通用序列建模骨架,让视觉、语言、动作能以“序列”形式统一处理;ViT将视觉输入转换为序列特征,提供“看”的能力;LLMs。 阅读详情

相关推荐

利用 Openocd 和 FT2232H 实现 ARMv8(Coretex-A53)高效调试方案

本文详细介绍了如何利用开源工具OpenOCD与高性能USB转接芯片FT2232H,构建一套针对ARMv8架构(如Cortex-A53)的高效、低成本调试方案。内容涵盖从环境搭建、驱动配置、核心调试架构解析到实战问题排查的全过程,帮助开发者实现对多核处理器的透明、可控调试,是嵌入式Linux及底层开发的实用指南。

weixin_29163581的博客 280

史上最全SSM框架整合(一)-----SSM整合思想

史上最全整合SSM框架 前言:        去年(2016.6)大米时代这个时候,项目组徐凤竹同志分享过新框架SSM,之前搭建过,也用过,在这次的淘淘商城项目中,非常详细的介绍了SSM框架的一点一滴,小编在这里也将和大家分享一步一步的SSM框架的搭建,希望对大家有所帮助:     本博文将分为系列性四篇,与大家分享SSM框架思想、原理、搭建以及整合的整个过程;

何新生(Daniel) 勇敢坚毅真正之才智乃刚毅之志向。 —— 拿破仑 8193

windows11 远程桌面连接 通过代理连接RDP桌面报错 错误代码0x904 拓展错误代码0x7

打开windows Defender防火墙设置--允许应用通过防火墙更改设置--允许其他应用浏览--进入C:\WINDOWS\system32目录选择mstsc.exe进入C:\Windows\SysWOW64目录h'qmstsc.exe添加后列表里多了一个远程桌面连接,还有一个Remote Desktop Connection,配置网络权限后保存连接成功。

weixin_43978891的博客 1万+

SSM框架超级详细整合记录:Spring+Spring MVC+MyBatis+Maven+MySQL

1.前言 本文主要对SSM框架整合的过程进行记录,作为之后参考的依据。 1.1.参考文章 Spring代码实例系列-绪论 Spring MVC代码实例系列-绪论 MyBatis代码实例系列-绪论 1.2.技术简介 在整合的SSM框架中,主要涉及的框架、插件或技术有: Spring:一个轻量级的控制反转(IoC)和面向切面(AOP)的容器框架。 Spring MVC:一个用...

韩超的博客 (hanchao5272) 7804

别再手搓SVG了!用Vue3+SVG.js快速搭建电力系统拓扑图(附完整代码)

本文介绍了如何利用Vue3和SVG.js实现电力系统拓扑图的低代码开发,通过组件化和响应式数据绑定,大幅提升开发效率。文章详细解析了SVG.js的核心功能,包括图形创建链式API、动态属性绑定和高级图形操作,并提供了断路器组件的完整实现代码。此外,还分享了性能优化策略和调试技巧,帮助开发者应对大规模拓扑图的挑战。

weixin_27717759的博客 354

【VAX 小番茄安装详细步骤】

本文详细介绍了在VS2022环境下安装Visual Assist X(番茄助手)的步骤及常见问题解决方案。主要内容包括:安装前的兼容性设置(需修改为Windows7兼容模式)、安装流程(卸载旧版本、勾选对应VS版本、替换关键dll文件)以及常见问题处理(如安装失败、工具栏图标缺失等)。文章提供了完整的下载链接和操作截图,特别强调了安装失败后的清理方法(注册表、安装目录和残余文件删除)。最后给出了安装成功后的测试运行指引。

qq_23962581的博客 1718

最全,最简单的SSM框架详细整合教程(Spring+SpringMVC+MyBatis)

传送门,原文地址 使用SSM(Spring、SpringMVC和Mybatis)已经有三个多月了,项目在技术上已经没有什么难点了,基于现有的技术就可以实现想要的功能,当然肯定有很多可以改进的地方。之前没有记录SSM整合的过程,这次刚刚好基于自己的一个小项目重新搭建了一次,而且比项目搭建的要更好一些。以前解决问题的过程和方法并没有及时记录,以后在自己的小项目中遇到我再整理分享一下。这次,先说说三大...

念念不忘,必有回响 1340

keil5编程前的工程文件配置,芯片型号支持包配置,用户文件配置,启动文件配置和库函数配置-江科大stm32学习 第一天

1.start文件夹中头文件需要配置路径path,另外user和library也需要,都是同样的操作。如图,在option界面c/c++中,在倒数第二空行的三个点处添加。2.需要设置一个宏,作用是使主函数头文件包含标准库函数,操作如图:复制头文件中8296行的字符串,在option界面的c/c++中第一行define粘贴这个字符串即可。一、首先,下载芯片支持包,选择你自己的器件型号,不懂的可以看我这篇选器件的方法(默认已经注册好用户)点击编译按钮,编译成功后即可在user文件夹里添加main.c正常使用。

weixin_50682964的博客 1952

IDEA 整合 SSM 框架学习

认识 Spring 框架 更多详情请点击这里:这里 Spring 框架是 Java 应用最广的框架,它的成功来源于理念,而不是技术本身,它的理念包括 IoC (Inversion of Control,控制反转) 和 AOP(Aspect Oriented Programming,面向切面编程)。 什么是 Spring: Spring 是一个轻量级的 DI / IoC 和...

我没有三颗心脏的博客 1655

Windows版TASSEL5的下载及安装

TASSEL5是一款用于研究表型和基因型关系的软件,由美国康奈尔大学Buckler实验室所研发。,选择Windows环境安装包下载并安装。1.安装成功后TASSEL5界面。

沉香best的博客 8188

uniapp:解决微信小程序包体积超过2M的优化方案+详解分包问题,编译小程序体积大于2M不能上传和预览提示体积太大的处理教程,uniApp微信小程序主包过大问题如何解决(排查可疑点+分包+最小改动)

uniapp微信小程序开发,如何解决打包太大无法预览发布的问题,uniApp微信小程序包体积超过2M的优化方法,uni-app打包微信小程序主包超2M终极解决方案,使用uniapp开发微信小程序使用uni_modules导致主包文件过大,无法发布的解决方法,UniApp开发的微信小程序主包过大问题及解决方案 编译小程序时Node-modules被打入主包,小程序体积大于2M不能上传和预览,怎么处理,解决微信小程序主包太大问题,微信小程序中主包和分包过大,详解分包问题,uni-app 微信小程序发布时,主包超

✅ 精选推荐文章 5066

SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)

使用SSM(Spring、SpringMVC和Mybatis)已经有三个多月了,项目在技术上已经没有什么难点了,基于现有的技术就可以实现想要的功能,当然肯定有很多可以改进的地方。之前没有记录SSM整合的过程,这次刚刚好基于自己的一个小项目重新搭建了一次,而且比项目搭建的要更好一些。以前解决问题的过程和方法并没有及时记录,以后在自己的小项目中遇到我再整理分享一下。这次,先说说三大框架整合过程。个人认

AndyLizh的专栏 156万+

uniapp - 解决App端报错reportJSException >>>> exception function:createInstanceContext, exception:white sc

uni-app,安卓Android,苹果ios,安卓app端,苹果App端,uniapp苹果安卓app,uniApp报错,reportJSException>>>>exceptionfunction:createInstanceContext,exception:whitescreencausecreateinstanceContextfailed,运行自定义基座时白屏,uniapp项目运行白屏reportJSException,检查没问题依旧报错,第三方库插件,组件,uniapp打包调试

🏆 前端领域优质创作者 1万+

史上最详细的IDEA优雅整合Maven+SSM框架(详细思路+附带源码)

网上很多整合SSM博客文章并不能让初探ssm的同学思路完全的清晰,可以试着关掉整合教程,摇两下头骨,哈一大口气,就在万事具备的时候,开整,这个时候你可能思路全无 ~中招了咩~ ,还有一些同学依旧在使用eclipse或者Myeclipse开发,我想对这些朋友说IDEA 的编译速度很快,人生苦短,来不及解释了,直接上手idea吧。这篇文章每一步搭建过程都测试过了,应该不会有什么差错。本文章还有个比较优秀的特点,就是idea的使用,基本上关于idea的操作都算是比较详细的,所以不用太担心不会撸idea!最后,本文

宜春 24万+

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

史上最良心最详细整合ssm框架图文教程(含项目源码下载地址)

整合SSM (SpringMVC+Spring+Mybatis)框架 一、项目前期准备 1、项目文件结构 2、新建动态web项目(Dynamic Web Project) 3、导入框架所需包 在项目的WebContent->WEB-INF->lib文件夹中粘贴以下jar包 (jar包见项目源码) 将文件夹中的jar包build到项目之中 4、创建数据库 本项目使用的是(Sql Server 2019),若想要更改成其它数据库简单修改配置文件和jar包即可。 创建数据库命名为ssm,建名为

This_pro的博客 3039

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

史上最详细的IDEA优雅整合Maven+SSM框架

该大佬整合了Maven+SSM框架,大家(萌新们)可以去撸一把,地址:https://blog.youkuaiyun.com/qq_44543508/article/details/100192558

hyddhy的博客 349

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

SSM整合,史上最详细的入门级代码,以后用的话直接往进套,复制即用

目录简单需求:用ssm实现表的查询和保存数据1.数据库ssm,表名account2.程序主框架3.详细代码--java(1)controller--AccountController(2)dao--AccountDao(3)daomain--Account(4)service--AccountServiceImpl和AccountService接口(5)test--TestMyBatis和Testspring4.详细代码--resources5.详细代码--webapp6.pom.xml7.效果图 简单需求

逆天的博客 789

史上最详细的SSM框架整合(Spring、SpringMVC、Mybatis)

#毫无疑问我们肯定是使用Spring去整合SpringMVC和Mybatis,在整合过程中我们首先要让各自的模块实现,然后再去使用Spring整合;比如我先实现Mybatis框架的配置,然后再通过测试看操作数据库能否成功,如果测试成功了我们再去使用Spring整合Mybatis;当然SpringMVC也一样,先编写SpringMVC所需要的一些配置项,测试web层能够实现之后再去使用Spring整合SpringMVC; 1.导入坐标 <dependencies> <depende

Kevinnsm的博客 398

史上最详细的IDEA优雅整合Maven+SSM框架(详细思路+附带源码)_ssm+maven项目

现在spring已经是在IOC容器中了,dao是一个接口,可以通过程序帮这个接口生成代理对象,我们要是可以把这个代理对象也放进IOC容器,那么service就可以拿到这个对象,之后在service中做一个注入,service从而调用dao代理对象的方法,那么我们怎么去实现dao接口生成的代理对象放入IOC容器呢?一看到Mybatis,就要想到dao,没错,MyBatis环境搭建首先是dao,搭建mybatis,之前要编写mapper映射的配置文件,其实挺麻烦的,所以我选择使用注解!

2401_84166376的博客 1374

史上最详细Maven+SSM整合教程,一看就会(详细教程+附带源码)

框架描述 ssm全称Spring+SpringMVC+MyBatis,是目前比较主流的Java EE企业级框架,适用于搭建各种大型的企业级应用系统。ssm还可指“软系统方法论”,是一项运用系统思考解决非系统问题的定性研究技术。 Spring   Spring就像是整个项目中装配bean的大工厂,在配置文件中可以指定使用特定的参数去调用实体类的构造方法来实例化对象。也可以称之为项目中的粘合剂。   Spring的核心思想是IoC(控制反转),即不再需要程序员去显式地`new`一个对象,而是让Spr...

weixin_52578018的博客 505

关于整合SSM的思维导图

关于整合SSM的思维导图 本文是参照了 https://blog.youkuaiyun.com/qq_44543508/article/details/100192558 史上最详细的IDEA优雅整合Maven+SSM框架(详细思路+附带源码) 宜春大佬的SSM整合文章 读完后受益颇丰 阅读后制作出的思路图 ps:由于是第一次写博客,不妥的地方欢迎大伙指出哈,谢谢! 希望对存在疑惑的人有帮助,谢谢~ ...

weixin_44939430的博客 911

史上最详细Spring+SpringMVC+Mybatis框架整合

文章目录SSM三大框架的整合搭建整合环境编写Spring框架编写SpringMVC框架Spring整合SpringMVC框架编写Mybatis框架Spring整合MyBatis框架Spring整合MyBatis框架配置事务总结 SSM三大框架的整合 搭建整合环境 1.整合说明:SSM整合有很多种方式,我们采用XML+注解的方式 2.整合思路: 先搭建整合的环境 先把Spring的配置搭建完成 使...

weixin_43949154的博客 2392

SSM整合,非常详细的SSM整合

对于ssm框架网上有很多,这里只是自己为大家提供的一个ssm整合框架参考分享,这个前提是基于maven的管理工具写的, 如果觉得写得不好,博主这边已经把代码上传了: 不妨可以参考代码再理解学习:https://download.youkuaiyun.com/download/qq_30764991/11012764 如果觉得文章不错,对你有帮助,请作者喝杯咖啡,谢谢!如果对您有帮助 ,请多多支持.多少都...

从放弃到开始 11万+
上一篇: Spring【AOP模块】就这么简单
下一篇: Mybatis与Spring整合
Java3y
Java3y 领域专家: 后端开发技术领域 领域专家: 后端开发技术领域
博客等级 码龄9年 1万+粉丝 509原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值