当前位置: 首页 > news >正文

现货交易平台有哪些免费seo网站

现货交易平台有哪些,免费seo网站,网站页面设计价格,美国一个人做的网站Spring的IOC/DI,依赖注入的实现 https://download.csdn.net/download/weixin_41957626/87546826 资源地址 1.什么是Spring 1.1spring3 的体系结构图 图1 spring3的体系结构图 图2 spring4体系结构图 比较spring3的体系结构图,spring4去掉了spring3中的st…

Spring的IOC/DI,依赖注入的实现

https://download.csdn.net/download/weixin_41957626/87546826 资源地址

 

1.什么是Spring

1.1spring3 的体系结构图

图1 spring3的体系结构图

图2 spring4体系结构图

比较spring3的体系结构图,spring4去掉了spring3中的struts模块,添加了messaging模块和websocket模块,其他模块保持不变。spring的jar包有20个。

1.下面是spring4和5的区别?

在增强开发方面spring4是web开发增强,spring5是JDK8的增强。

在特性改进方面spring4是注解、脚本、任务、MVC等其他特性改进,spring5是测试方面的改进。

2.IOC/DI

2.1 IOC/DI

1.控制反转或者是依赖注入的含义。面向接口的编程。

2.实现方式

  • 采用工厂类的方式
  • 采用spring的ioc实现

2.2Spring的配置

1.依赖导入

<!--        spring依赖-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>5.3.24</version>
        </dependency>

2.创建配置文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       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.xsd"><!--    配置bean
id指定的是bean的名称
class指定的是bean所在的地址
ref指定的是要引入的bean
property设置的是bean的依赖的项,ref采用的是引用的数据类型的方式,value是赋一般的值的形式
-->
    <bean id="studentDao" class="cn.lxz.dao.impl.StudentDaoImpl"/>
    <bean id="studentService" class="cn.lxz.service.impl.StudentServiceImpl">
        <property name="studentDao" ref="studentDao"/>
    </bean></beans>

3.项目目录

图3 项目目录

4.实现的代码

采用的是gif的形式展示

 

图4 spring代码展示

测试类代码

    @Test
    public void testContext(){
        //采用的是读取xml的文件的配置形式
        ApplicationContext context= new ClassPathXmlApplicationContext("Spring-context.xml");
        StudentService service1=   context.getBean(StudentService.class);
        StudentService service2= (StudentService)context.getBean("studentService");
        System.out.println(service1);
        System.out.println(service2);
        service1.addStudent(new Student(1,"张三"));
    }

图5 效果图

http://www.hkea.cn/news/607727/

相关文章:

  • 网站投稿系统怎么做网站制作流程是什么
  • 交警网站建设整改百度推广怎么推广
  • 重庆网站建设哪里比较好呢网站下载
  • 网站运行速度慢的原因看b站二十四小时直播间
  • 电商网站开发服务全网营销骗局揭秘
  • 个人网站怎么做互联网营销师培训课程免费
  • 微信网站建设价格网站开发报价方案
  • wordpress utc时间慢8小时大连seo关键词排名
  • 中国建设承包商网站创建软件平台该怎么做
  • 中小企业网站建设费用海外推广服务
  • 企业名称的英文做网站名seo是怎么优化推广的
  • 手机在线建站西安seo服务公司
  • 网站开发有前途吗我也要投放广告
  • 备案 网站名称怎么写crm软件
  • 扁平式网站模板b2b网站推广优化
  • 做外贸网站网络营销咨询服务
  • 江门网站建设方案报价淘宝seo优化怎么做
  • 盘龙城做网站推广网站推广
  • 如何做电子书网站域名站长工具
  • 物联网平台有哪些排名优化外包公司
  • 秦皇岛汽车网站制作数字营销工具
  • 培训教育的网站怎么做东莞做网站的联系电话
  • 云南做网站的公司外贸谷歌优化
  • 网页设计学徒培训可试学巢湖seo推广
  • 让顾客心动的句子seo模拟点击软件源码
  • 设计类专业包括哪些kj6699的seo综合查询
  • 手机网站制作哪家好查关键词
  • 米拓企业网站管理系统电商培训机构排名前十
  • 做效果图有哪些网站seo点击排名
  • 网络营销推广网站收录seo推广排名平台有哪些