学习SSM笔记-2(Spring初识)

基于文件通信的QMT量化交易信号桥接方案设计与实现 在量化交易系统开发中,进程间通信(IPC)是连接不同计算模块、实现策略逻辑与交易执行解耦的关键技术。其核心原理在于允许运行于独立环境或进程的程序安全、可靠地交换数据。文件系统通信作为一种经典的IPC方法,因其实现简单、跨平台兼容性好且数据可持久化,在非高频场景下具有重要技术价值。它尤其适用于需要将外部复杂计算环境(如配备丰富数据科学库的Python环境)与专用交易终端(如迅投QMT)集成的应用场景。通过约定文件路径与数据格式,外部程序可将包含交易指令的JSON信号文件写入特定目录,而交易终端通过轮询或监听机 阅读详情

Spring初解

是一个开源的容器(可以管理所有的组件(或者类))框架

核心是IOC(反转控制)和AOP(面向切面编程)

优点:

  1. 非侵入式
  2. 依赖注入
  3. 面向切面编程
  4. 容器
  5. 组件化
  6. 一站式(spring本身包含表现层的MVC和持久层的JDBC)

IOC(反转控制)

控制指的是资源获取的方式,分为主动式和被动式。

主动式:开发者主动去创建所需的资源(例如:主动去new一个对象)

被动式:资源的获取不是通过开发者主动创建而是由容器来创建(例如:声明对象直接使用而无需去new)

DI(依赖注入)

DI:组件以预先定义好的方式接收来自容器的资源注入,也就是说,容器能知道一个组件(类)运行的时候需要哪些其他组件(类),容器将通过反射的形式将容器中准备好的其他组件(类)的对象注入到这个组件中。

AOP(面向切面编程)

AOP是一种新的方法论,是对传统 OOP(面向对象编程)的补充。AOP操作的主要对象是切面,而切面将横切关注点模块化。

在应用 AOP 编程时,仍然需要定义公共的功能,但可以明确地定义这个功能应用在哪里,以什么方式应用,而不必修改受影响的类。这样一来横切关注点就被模块化到特殊的类里——这样的类我们通常称之为切面。

注:在通过 IOC 容器读取 Bean 的实例之前,需要先将 IOC 容器本身实例化。

Spring 提供了两种 IOC 容器的实现方式 :

  1. BeanFactory:IOC 容器的基本实现,是 Spring 内部的基础设施,是面向 Spring 本身的,不是提供给开发人员使用的。
  2. ApplicationContext:BeanFactory 的子接口,提供了更多高级特性。面向 Spring 的使用者 ,几乎所有场合都使用ApplicationContext 而不是底层 的 BeanFactory。

BeanFactory完整继承关系和方法
在这里插入图片描述

ApplicationContext 完整继承关系和方法
在这里插入图片描述
ClassPathXmlApplicationContext:对应类路径下的 XML 格式的配置文件
FileSystemXmlApplicationContext:对应文件系统中的 XML 格式的配置文件

注:在初始化时就创建单例的 bean,也可以通过配置的方式指定创建的 Bean 是多实例的。
我们可以发现其实在ApplicationContext是没有getBean方法的,调用的是BeanFactory的getBean方法。

IOC测试

我们用GregoriacalnCalendar(日志类)来测试体验一下IOC

TestSpring.java

package controller;
import org.springframework.context.ApplicationContext;
import org.junit.Test;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestSpring {
@Test
public void test01(){
	ApplicationContext ac= new ClassPathXmlApplicationContext("applicationContext.xml");
	System.out.println(ac);
	Object obj = ac.getBean("cal");
	System.out.println(obj);
	//销毁ac对象
	//((AbstractApplicationContext)ac).close();
	}
}

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" xmlns:util="http://www.springframework.org/schema/util"  
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
	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/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
	<!-- 构造器创建对象 -->
	<bean id="cal" class="java.util.GregoriacalnCalendar"></bean>
</beans>

样例输出:

org.springframework.context.support.ClassPathXmlApplicationContext@1cab0bfb: startup date [Sun Aug 23 10:49:10 CST 2019]; root of context hierarchy
java.util.GregorianCalendar[time=1598150951138,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Asia/Shanghai",offset=28800000,dstSavings=0,useDaylight=false,transitions=29,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2020,MONTH=7,WEEK_OF_YEAR=35,WEEK_OF_MONTH=5,DAY_OF_MONTH=23,DAY_OF_YEAR=236,DAY_OF_WEEK=1,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=49,SECOND=11,MILLISECOND=138,ZONE_OFFSET=28800000,DST_OFFSET=0]

获取配置文件中bean的几种方式

Spring的配置文件是一个xml文件,我们可以自定义名字,一般使用applicationContext.xml作为配置文件名。

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" xmlns:util="http://www.springframework.org/schema/util"  
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
	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/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
	
	<!-- 定义bean对象 -->
	<bean id="stu" class="enity.Student">
        
        <bean id="pho" class="enity.Phone">
		<property name="brand" value="Huawei"></property>
		<property name="system" value="android"></property>
		<property name="memory" value="64G"></property>
	</bean>
</beans>
    

Student.java


package enity;

public class Student {
	private String name;
	//无参构造函数
	public Student() {
		System.out.println("初始化");
	}
	//定义get方法
	public String getName() {
		return name;
	}
	//定义set方法
	public void setName(String name) {
		this.name = name;
	}
    //重写toString方法
	@Override
	public String toString() {
		return "学生的名字是 " + name ;
	}
}

通过配置文件中的id获取

TestSpring.java


public class TestSpringIOC {
@Test
public void test02(){
    //指定配置文件对象ac
	ApplicationContext ac= new ClassPathXmlApplicationContext("applicationContext.xml");
    //通过ac创建指定的bean对象,并命名为stu
	Object stu= ac.getBean("stu");
    //打印出这个对象
    System.out.println(stu);
	}
}

通过bean类型获取

从 IOC 容器中获取 bean 时,除了通过 id 值获取,还可以通过 bean 的类型获取。但如 果同一个类型的 bean 在 XML 文件中配置了多个,则获取时会抛出异常,所以同一个类 型的 bean 在容器中必须是唯一的。

TestSpring.java


public class TestSpringIOC {
@Test
public void test02(){
    //指定配置文件对象ac
	ApplicationContext ac= new ClassPathXmlApplicationContext("applicationContext.xml");
    //通过ac创建指定的bean对象,并命名为stu
	Object stu= ac.getBean(Student.class);
    //打印出这个对象
    System.out.println(stu);
	}
}

给 bean 的属性赋值

我就以自己的手机的配置来演示一下

通过getting、setting来赋值

通过getting、setting给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" xmlns:util="http://www.springframework.org/schema/util"  
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
	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/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
	
	<!-- 定义bean对象 -->
        <bean id="pho" class="enity.Phone">
		<property name="brand" value="Huawei"></property>
		<property name="system" value="android"></property>
		<property name="memory" value="64G"></property>
	</bean>
</beans>
    

TestSpring.java

public class TestSpring {
@Test
public void test03(){
	Object pho= ac.getBean("pho");
	//Object pho= ac.getBean(Phone.class);
	System.out.println(pho);
	}
}

Phone.java


package enity;

public class Phone {
private String brand;
private String system;
private String memory;

public void setBrand(String brand) {
	this.brand = brand;
}

public void setSystem(String system) {
	this.system = system;
}

public void setMemory(String memory) {
	this.memory = memory;
}

@Override
	public String toString() {
		
		return "brand="+brand+"\n"+"system="+system+"\n"+"memory="+memory;
	}
}

样例输出


brand=Huawei
system=android
memory=64G

通过自动匹配构造函数来赋值

通过自动匹配构造函数的方式来赋值,要考虑到参数的顺序和参数的个数,如果想要指定赋值的顺序,请加上index属性。

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" xmlns:util="http://www.springframework.org/schema/util"  
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
	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/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
	
	<!-- 定义bean对象 -->
    <bean id="pho" class="enity.Phone">
		<constructor-arg value="HuaWei" />
		<constructor-arg value="android" />
		<constructor-arg value="64G" />
	</bean>
	<bean id="pho1" class="enity.Phone">
		<constructor-arg value="Iphone" />
		<constructor-arg value="IOS" />

	</bean>
	<bean id="pho2" class="enity.Phone">
		<constructor-arg value="Samsung" />
	</bean>
</beans>
    

Phone.java


package enity;

public class Phone {
private String brand ;
private String system ;
private String memory ;

//无参构造函数
public Phone() {
}
//含三个参数的构造函数
public Phone(String brand,String system,String memory) {
	this.brand=brand;
	this.system=system;
	this.memory=memory;
}
//含两个参数的构造函数
public Phone(String brand,String system) {
	this.brand=brand;
	this.system=system;
}
//含一个参数的构造函数
public Phone(String brand) {
	this.brand=brand;
}
@Override
	public String toString() {
		
		return "brand="+brand+"\n"+"system="+system+"\n"+"memory="+memory;
	}
}

TestSpring.java
Juint测试类

public class TestSpring {
@Test
public void test04(){
	Object pho= ac.getBean("pho");
	//Object pho= ac.getBean(Phone.class);
	System.out.println(pho);
	}
@Test
public void test05(){
	Object pho= ac.getBean("pho1");
	//Object pho= ac.getBean(Phone.class);
	System.out.println(pho1);
	}
@Test
public void test06(){
	Object pho= ac.getBean("pho2");
	//Object pho= ac.getBean(Phone.class);
	System.out.println(pho2);
	}
}

样例输出
test04

brand=Huawei
system=android
memory=64G

test05

brand=Iphone
system=IOS

test06

brand=Samsung

你可能会问:如果参数不够,会不会报错?
答案是:当然不会,因为当你不给bean的属性赋值时,在创建的时候bean的属性都是默认为null的,如果你赋值的个数不够,那么那些没有赋值的属性就为空,如下图。

在这里插入图片描述

通过index来指定赋值顺序

只需要在applicationContext.xml文件bean中的constructor-arg加入index,例如
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" xmlns:util="http://www.springframework.org/schema/util"  
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
	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/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
	
	<!-- 定义bean对象 -->
    <bean id="pho" class="enity.Phone">
		<constructor-arg value="HuaWei" index="2"/>
		<constructor-arg value="android" index="1"/>
		<constructor-arg value="64G" index="0"/>
	</bean>
	<bean id="pho1" class="enity.Phone">
		<constructor-arg value="Iphone" />
		<constructor-arg value="IOS" />

	</bean>
	<bean id="pho2" class="enity.Phone">
		<constructor-arg value="Samsung" />
	</bean>
</beans>
    

样例输出
之前的test04就会变为下面这样

brand=64G
system=android
memory=Huawei

通过type来区分重载的构造器

只需要在applicationContext.xml文件bean中的constructor-arg加入type

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" xmlns:util="http://www.springframework.org/schema/util"  
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
	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/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
		http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
	
	<!-- 定义bean对象 -->
    <bean id="pho" class="enity.Phone">
		<constructor-arg value="HuaWei" index="0" type="java.lang.String"/>
		<constructor-arg value="android" index="1" type="java.lang.String"/>
		<constructor-arg value="64" index="2" type="java.lang.Integer"/>
	</bean>
</beans>
    

type要和属性的类型相匹配,如果我不修改之前的Phone.java,会报错,内容如下

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pho' defined in class path resource [applicationContext.xml]: Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)

大概意思就是无法解析需要匹配的构造函数
所以我们要修改Phone.java中memory的类型
修改后如下

package enity;

public class Phone {
private String brand;
private String system;
private Integer memory;
public Phone() {
	
}
public Phone(String brand,String system,Integer memory) {
	this.brand=brand;
	this.system=system;
	this.memory=memory;
}

@Override
	public String toString() {
	
	return "brand="+brand+"\n"+"system="+system+"\n"+"memory="+memory;
	}
}

样例输出

brand=HuaWei
system=android
memory=64
数据挖掘实战-基于长短期记忆网络(LSTM)的黄金价格预测模型 | 97% 准确度 本实验基于Kaggle上提供的从2013年到2023年的黄金价格数据集,运用长短期记忆网络(LSTM)构建了黄金价格预测模型。该数据集详细记录了每日的黄金价格信息,包括开盘价、收盘价、高点、低点和交易量等,为模型的训练提供了丰富的数据支持。 阅读详情

相关推荐

大数据之父_BIM先驱Charles (Chuck) M. Eastman逝世——致敬“BIM之父”

原标题:BIM先驱Charles (Chuck) M. Eastman逝世——致敬“BIM之父”BIM研究的先驱、佐治亚理工教授Charles (Chuck) M. Eastman于本周一(11月9日)在其Atlanta家中逝世。特转韩国Yonsei大学Ghang Lee教授的讣文以作纪念。过世原因未说明。BIM的出现是与当今时代科技的发展分不开的。在信息时代建筑发展面临的挑战巨大:建筑物越建越高...

weixin_39941262的博客 3302

【SSM】Spring学习笔记2:注解配置bean

传统bean的定义方式是在配置文件applicationContext.xml文件中进行,如下这句代码的意思是将类“org.example.dao.impl.BookDaoImpl”配置成一个id为“bookDao”的bean。注解式开发将不再使用这种bean的配置方式,而使用Spring提供的注解@Component。将@Component标记在要配置为bean的类上,在applicationContext.xml中声明扫描某个包下面的含有@Component注解的类,即可完成bean的配置。

2301_76391858的博客 1326

线性分类器(Linear Classifier)

线性分类器 如上图所示,这是二维空间中的一个数据集,如果他正好能够被一条直线分成两类,那么我们称它为线性可分数据集,这条直线就是一个线性分类器。 在三维空间中,如果数据集线性可分,是指能够被一个平面分为两类。 在一维空间中,所有的点都在一条直线上,如果线性可分。可以理解为它们能够被一个点分开。 这里的直线、平面、点被分为决策边界。 一个 m 维空间中的数据集,如果能够被一个超平面一分为二,那么这个数据集就是线性可分的,这个超平面就是决策边界。 例如,这是二维平面上的一条直线, 它可以把平面切分成两

xuechanba的博客 1万+

【SSM】Spring学习笔记1: IoC的XML配置

文章基于。

2301_76391858的博客 1219

GD32F103RCT6/GD32F303RCT6(6.2)USART串口实战:从寄存器配置到DMA高效传输

本文详细介绍了GD32F103RCT6和GD32F303RCT6的USART串口通信实战,从寄存器配置到DMA高效传输的全过程。通过具体的代码示例和优化建议,帮助开发者快速掌握串口通信的关键技术,提升嵌入式开发效率。特别强调了DMA在高速数据传输中的优势和应用技巧。

weixin_33725239的博客 308

comsol 多物理场仿真流程-以开关柜为例

1、主要方法 在SolidWorks中对于开关柜的内部与外部结构进行建模,生成能够导入软件计算的3D模型。将SolidWorks中的模型导入comsol软件中,设置参数进行多物理场耦合仿真。 1、具体步骤 删除高压开关柜中对其内部电磁环境无较大影响的结构,如低压测量柜、断路器内部结构等。 导入模型:将厂家提供的3D模型转化为solidworks结构模型。 修复模型:修复已转化模型中转化错误的部分、修复已转化模型中非实体部分、修复已转化模型中重叠实体部分 化简模型:去除过于...

健忘16的博客 7020

尚硅谷ssm整合实战项目笔记

前言 该笔记为尚硅谷SSM实战演练丨ssm整合快速开发CRUD学习笔记 github项目地址:https://github.com/xjhqre/sgg-ssm-demo 一、SSM整合 1、项目介绍 使用SSM框架搭建出一套简单的CRUD项目示例,包括分页查询、Ajax请求、数据校验等。 2、功能点 分页查询 数据校验:JQuery前端校验+JSR-303后端校验 Ajax请求 REST风格的URI:GET查询、POST新增、DELETE删除、PUT修改 3、技术点 基础框架-SSM(Sprin

xjhqre的博客 9083

Python 逆向解析知乎盐选反爬字体,实现内容精准还原

本文详细解析了知乎盐选内容的反爬字体机制,并提供了使用Python逆向解析WOFF字体文件的完整方案。通过fontTools库构建解码字典,实现乱码文本的精准还原,帮助开发者应对动态字体策略,同时强调法律与道德风险。

weixin_29268385的博客 1296

【SSM整合】SSM整合学习-2022详细学习笔记

学习尚硅谷2022版SSM教程的详细学习笔记 SpringMVC和Spring可以整合也可以不整合,不整合就是Spring和SpringMVC用同一个IOC容器,整合就是各自创建IOC容器去管理自己的。SpringMVC的IOC容器是在DispatcherServlet进行初始化的时候创建的,那么Spring的IOC容器应该在什么时候创建呢?SpringMVC管理的是控制层组件,而其他的需要交给Spring管理,而controller需要自动装配service层.........

gdxdekx的博客 4708

零基础学习CANoe Panel(17)—— Panel CAPL Function

CANoe内置了几个CAPLFunction,允许我们在CAPL运行时动态的更改Panel控件的属性,比如打开某个panel,禁用某个控件,更改控件颜色等。

蚂蚁小兵 3516

关于React Native Android找不到node的错误

最近,按照官方文档初始化了一个React Native项目,但是在Android端运行的时候,报了如下的一个错误。 org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:recordFilesBeforeBundleCommandDebug'. Caused by: org.gradle.process.internal.ExecException: A problem occurred starting p

xiangzhihong8的专栏 4246

黑马SSM学习笔记

Spring ,SpringMVC ,MyBatis-Plus

十二间记,知不足而奋斗,望远山而前行。千里不辞行路远,时光早晚到天涯。 2130

【硬件的单元测试 UT 3】PCIe 3.0及信号完整性测试方法

PCIe标准自从推出以来,1代和2代标准已经在PC和Server上逐渐普及,用于满足高速显卡、高速存储设备对于高速数据传输的要求。出于支持更高总线数据吞吐率的目的,PCI-SIG组织在2010年制定了PCIe 3.0,即PCIe 3代的规范,数据速率达到8Gbps。

qq_43416206的博客 1415

【SSM】Spring学习笔记5:Spring事务

保证数据层或者业务层对数据库操作的时候,所有操作同时成功或者同时失败。即保证数据一致性。

2301_76391858的博客 690

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

【SSM】Spring学习笔记4:Spring的AOP编程

定义一个类,类中定义一个方法,该方法的方法体就是额外执行的操作。这个类需要加上@Component注解以配置成一个为Spring管理的bean;加上@Aspect注解将这个类标记为进行AOP操作配置的类。@Component //通知类必须配置成Spring管理的bean@Aspect //设置当前类为切面类类。

2301_76391858的博客 927

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

基于SSM的学习笔记分享系统

本设计以MySQL为后端数据库,以IDEA为开发平台,采用SSM架构,建立以个人中心,用户管理,笔记本管理,笔记分享管理,分享类型管理,学习资料管理,购买资料管理,完整资料管理,系统管理等必要功能的、稳定的学习笔记系统。

namixuezhang11的博客 420

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

ssm框架学习笔记

title: ssm框架学习笔记 date: 2018-03-21 16:49:52 updated: 2020-03-12 14:34:23 categories: spring tags: - spring 此文档记录研二学习ssm框架的知识点笔记 SSM简介 最初:jsp + servlet + jdbc 现在:springmvc + spring + mybatis 官网地址: lo...

Pop_Rain的博客 2238

图解SSM和Spring Boot的区别

且视他人之疑目如盏盏鬼火,大胆地去走你的夜路。——史铁生

山河已无恙 9311

有了Spring Boot,还有学习SSM的意义么?

01丨Spring Boot和SSM的关系 如果你要问我,现在开发企业级的应用是否应该使用Spring Boot框架? 我的回答是肯定的。不仅如此,我甚至推荐将原来基于S2SH、SSM开发的项目都重构成基于Spring Boot的——前提是你有扎实的技术功底,不担心重构过程中引入一些未知的错误、最后导致项目出错。 ▊ 为何如此推崇Spring Boot? 这是由企业开发的特性所决定的,对于企业开发来说,必须追求稳定性和快捷性,而Spring Boot的作用是什么? Spring Boot是一个快速

javalingyu的博客 3575

【SSM】Spring学习笔记3:Spring整合MyBatis和Junit

这一小节的阅读需要一定的。Mybatis主要通过一个核心配置文件(xml文件)来进行数据源的配置和映射管理。映射指的是将一些方法和具体的sql语句绑定起来,使得执行方法的时候自动连接到数据库执行sql语句。具体映射主要通过映射文件进行配置,或者使用注解进行配置。使用注解的方式更加便捷,因此例子中映射方式使用的是注解的形式。

2301_76391858的博客 926

Spring Securit学习笔记之整合SSM

文章目录Spring Securit学习笔记1. Spring Security+SSM环境整合1. 创建maven项目,配置pom.xml2. 创建Spring核心配置文件Spring-core.xml3. 创建数据源配置文件jdbc-data.properties4. 创建SpringMVC配置文件spring-mvc.xml5. 创建Spring Security配置文件spring-sec...

IT小浣熊的博客 379

【SSM学习】01-2-Spring IOC

SSM(B站黑马)学习笔记 01-2-Spring IOC

weixin_48074431的博客 1273

Spring是什么?SSM框架是什么?怎么学习?

SSM框架是Spring、SpringMVC、Mybatis框架的整合,是标准的MVC模式。SSM框架有四层,分别是dao层(mapper)、service层、controller层、View层。使用Spring实现业务对象管理,使用Spring MVC负责请求的转发和视图管理,Mybatis作为数据对象的持久化引擎。SpringMVC是一种基于 Java 的实现MVC 设计模型的请求驱动类型的轻量级Web 框架,属于的后续产品,已经融合在 Spring Web Flow 中。

黑马程序员官方博客 1622

ssm学习笔记

在五天前的2020/9/19号,整理好了自己近期的学习计划后,开始了自己的ssm框架学习。 首先,我找的学习教程为B站的传智播客与黑马程序员合作开设的ssm教程视频,感觉有一点历史了,但是听了一些感觉mybatis讲的是真的很好,就决定选择学习该门课程了,课程bv为:BV1mE411X7yp 原本课程设定为4天的mybatis课程,我花了五天时间,主要原因是跟着综合案例开始时环境依赖遇到了些问题,我已经整理发在了我的博客,就是mybatis的学习笔记,里面还有一些我的其他笔记,链接如下: https://b

Jancy2265的博客 954

学习SSM和Spring Boot的三点建议

  国内知名高端IT技术图书作家,已出版《疯狂Java讲义》、《疯狂Android讲义》、《轻量级JavaEE企业应用实战》等著作。其中《疯狂Java讲义》销量达几十万册,被北大信科老师实名推荐并先后选作教材及参考书,此书已被翻译成繁体中文版,授权到宝岛台湾。...

linjingyg的博客 1391

SSM框架学习总结第二篇--Spring

系列文章目录 提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加 例如:第一章 Python 机器学习入门之pandas的使用 提示:写完文章后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录系列文章目录前言一、Spring是什么?1.1 定义1.2 优势1.3 Spring体系结构二、使用步骤2.1 引入库三、原理解读3.1 IoC3.1.1 耦合与解耦3.1.2 控制反转-Inversion Of Control3.2 使用 spring 的 IOC 解决程序耦合3.2.1 前

ggs_27的博客 2926
上一篇: 学习SSM笔记-1(web框架初识)
下一篇: 关于web.xml的详细解释,分层解析每一个标签(第一部分)
IT_Joliu
博客等级 码龄9年 32粉丝 45原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值