Spring框架
Spring框架
JSP课程设计毕业设计远吗
这个作者很懒,什么都没留下…
展开
-
Spring入门程序第一节
Spring入门程序第一节 1 spring 是开源的轻量级框架。 2. spring核心两部分: (1) aop: 面向切面编程,扩展功能不是修改源代码实现。 (2)Ioc:控制反转:比如有一个类,在类里面有方法(不是静态的方法),调用类里面的方法,创建类的对象,使用对象 调用方法,创建类对象的过程,需要new 出来对象。 把对象的创建不是通过new 方式...原创 2020-01-29 09:32:34 · 199 阅读 · 0 评论 -
Sring的ico属性注入,使用三种方法注入
Sring的ico属性注入 ioc入门案例 第一步 导入jar 包 第二步 创建类,在类里面创建方法 第三步 创建spring配置文件,配置创建类。 第四步 写代码测试对象创建 Bean 标签常用属性 (1) id属性: 起名称,id属性值名称任意命名 id属性值 ,不能包含特殊符号 (2) class属性 创建对象所在类的全路径...原创 2020-01-29 09:32:12 · 211 阅读 · 0 评论 -
Spring注入复杂类型属性
Spring注入复杂类型属性 ‘’ 1 数组 2 list集合 3 map集合 4 properties(键值对)类型 配置文件bean1.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema...原创 2020-01-29 09:31:38 · 125 阅读 · 0 评论 -
Spring整合web项目原理
Spring整合web项目原理 1 加载spring核心配置文件 (1)new 对象,功能可以实现,效率很低 2 实现思想:把加载配置文件和创建对象过程,在服务器启动时候完成。 3 实现原理 (1) ServletContext对象 (2)监听器 (3) 具体使用 在服务器启动时候,为每个项目创建一个ServletContext...原创 2020-01-29 09:29:50 · 105 阅读 · 0 评论 -
Spring整合web项目原理
Spring整合web项目原理 1 加载spring核心配置文件 (1)new 对象,功能可以实现,效率很低 2 实现思想:把加载配置文件和创建对象过程,在服务器启动时候完成。 3 实现原理 (1) ServletContext对象 (2)监听器 (3) 具体使用 在服务器启动时候,为每个项目创建一个ServletContext...原创 2020-01-29 09:29:20 · 97 阅读 · 0 评论 -
Spring的bean管理(注解创建对象)
Spring的bean管理(注解创建对象) AOP (1)aop概述 (2)aop底层原理 (3)aop操作相关术语 Spring的bean管理(注解) 注解介绍 1.代码里面特殊标记,使用注解可以完成功能。 2.注解写法@注解名称(属性名称=属性值) 3.注解使用在类上面,方法上面和属性上面。 Spring的bean管理注解准备 1 导入ja...原创 2020-01-29 09:28:49 · 125 阅读 · 0 评论 -
Spring的bean管理(注解注入属性和注解文件混合使用)
Spring的bean管理(注解注入属性和注解文件混合使用) 注解方式注入属性 1 创建service类,创建dao类,在service得到dao对象 注入属性第一个注解 @Autowired (1) 创建dao和service对象 (2) 在service类里面定义到类型属性 注入属性第一个注解 @Autowired ...原创 2020-01-29 09:28:09 · 156 阅读 · 0 评论 -
Spring的aspectj的AOP操作
Spring的aspectj的AOP操作 AOP概念 1 aop:面向切面(方面)编程,扩展功能不修改源代码实现. 2 aop采取横向抽取机制,取代了传统纵向继承体系重复代码。 3 aop底层使用动态代理实现 (1)第一种情况,有接口情况,使用动态代理创建接口实现类代理对象。 (2)第二种情况 ,有接口情况,使用动态代理创建类的子类代理对象。 ...原创 2020-01-29 09:27:29 · 172 阅读 · 0 评论 -
Spring的aspectj的AOP操作(前置增强 后置增强 环绕)
Spring的aspectj的AOP操作(前置增强 后置增强 环绕通知) bean3.xml 配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org...原创 2020-01-29 09:27:00 · 239 阅读 · 0 评论 -
spring配置c3p0连接池
spring配置c3p0连接池 Spring 配置连接池和dao使用jdbcTemplate 1 spring配置c3p0连接池 第一步 导入jar包 第二步 创建spring配置文件,配置连接池 (1)把代码在文件配置中进行配置 2 dao使用jdbcTemplate (1)创建ser...原创 2020-01-28 14:43:43 · 244 阅读 · 0 评论 -
spring的事务管理(配置文件方式和注解方式实现、转账环境搭建)
spring的事务管理(转账环境搭建) Spring的事务管理 事务概念 1 什么是事务 2 事务特性 3 不考虑隔离性产生读问题 4 解决读问题 (1)设置隔离级别 Spring事务管理api介绍 1 spring事务管理两种方式 第一种 编程式事务管理(不用) ...原创 2020-01-28 14:43:18 · 163 阅读 · 0 评论 -
ssh整合知识点介绍
ssh整合知识点介绍 SSH三大框架整合 (1)struts2 (2) hibernate5.x (3) spring4.x Hibernate框架 1 hibernate核心配置文件 orm思想 对象关系映射 (1)数据库信息 (2) hibernate信息 (3) 映射配置 (4) hibe...原创 2020-01-28 14:42:46 · 195 阅读 · 0 评论 -
整合struts和spring框架
整合struts和spring框架 1 把struts的action交给spring管理 2 实现过程 第一步 导入struts2的jar包 (1) 导入用于整合的jar包 整合ssh所需要的全部jar包 第二步 创建action 第三步 创建str...原创 2020-01-27 09:04:24 · 149 阅读 · 0 评论 -
Spring整合hibernate框架
Spring整合hibernate框架 1 把hibernate核心配置文件中配置数据库信息,把数据库信息在spring进行配置 2 把hibernate里面的sessionFactory创建交给spring管理 具体实现 第一步 导入hibernate的jar包 (1)导入struts2和hibernate的jar包时...原创 2020-01-27 09:03:46 · 181 阅读 · 0 评论 -
SpringMVC是如何让Controler替代Servlet工作的
在学到JavaEE的部分的时候,知道了我们自己写Servlet,然后来处理一个请求的get方法或者是post方法;但是在工作后,直接使用了SpringMVC的框架;工作的时候不再需要自己写Servlet,而是写一个Controler,然后将各种请求写成方法来处理即可; 两种工作方式的差异,让我觉得自己的知识出现了断层;即,Spring框架是如何操作,让Controler来替代Servlet的? ...原创 2020-01-27 09:03:16 · 558 阅读 · 0 评论 -
SpringMVC的学习
SpringMVC 当需要学习一个新的MVC框架需要从以下方面入手: 1、环境搭建:(实现helloworld) 2、如何完成Controller和Viewer的映射 3、如何传递参数到控制器Controller 4、如何从控制器Controller获取参数传递给Viewer 5、页面标签使用 6、如何完成文件的上传 7、如何完成验证 8、异常的处理 9、深入学习一些原...原创 2020-01-27 09:02:36 · 135 阅读 · 0 评论 -
SSH整合其他方式(没有hibernate的核心配置文件)
SSH整合其他方式(没有hibernate的核心配置文件) 在spring配置 <!-- 配置hibernate创建交给spring管理 - sessionFactory --> <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBea...原创 2020-01-25 20:21:39 · 120 阅读 · 0 评论 -
Spring分模块开发
Spring分模块开发 1 在spring里面配置多个内容,造成配合混乱,不利于维护 2 把spring核心配置文件中,一部分配置放到单独的配置文件中,在spring核心配置文件中引入单独 配置文件 3 重新引入一个新的xml文件,这样每个人写的,都可以单独引入。例如user.xml,,这里我把action单独拿了出来 <?xml version...原创 2020-01-25 20:21:02 · 123 阅读 · 0 评论