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

铜仁市城乡住房与建设局网站阿里云建站费用

铜仁市城乡住房与建设局网站,阿里云建站费用,水利部建设安全管理中心网站,深圳二维码网站建设这里写目录标题 一 Spring框架产生的原因二 Spring6配置的关键环节 一 Spring框架产生的原因 传统的JavaWeb存在着耦合度较高的问题,而且实现完整的的MVC三层架构,开发成本过大,因此出现了Spring这个轻量级的开发框架,相当于建筑里…

这里写目录标题

  • 一 Spring框架产生的原因
  • 二 Spring6配置的关键环节

一 Spring框架产生的原因

        传统的JavaWeb存在着耦合度较高的问题,而且实现完整的的MVC三层架构,开发成本过大,因此出现了Spring这个轻量级的开发框架,相当于建筑里的半成品。
       经过了十多年的发展,Spring已经变成一个由Spring Framework为核心的技术栈,典型的代表有SpringMVC,SpringBoot,SpringCloud微服务框架。
      Spring的核心设计思想的IOC和AOP。IOC,Inverse of Control,控制反转,把创建的对象交给Spring管理。AOP,面向切面编程,加功能时候尽量不修改源代码

二 Spring6配置的关键环节

        Spring6必须用jdk17和maven3.6。在创建的maven聚合工程中,父工程spring6,子模块Springfrist

在这里插入图片描述

  • 创建一个maven聚合工程
    -在这里插入图片描述
  • 父工程中不需要写代码,删掉src包
  • 在这里插入图片描述
  • 子模块创建
  • 在这里插入图片描述
  • 在spring-frist的xml中加入这样一句话
 <dependencies><!--spring context依赖--><!--当你引入Spring Context依赖之后,表示将Spring的基础依赖引入了--><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId></dependency><!--junit5测试--><dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><version>5.9.2</version></dependency></dependencies>

在上述目录下加一个java文件
在这里插入图片描述

package com.xyt;public class User {public void add(){System.out.println("add_____");}
}

在上文的resource中创建一个bean.xml
在这里插入图片描述
完成User的创建.里面有bean标签
在这里插入图片描述
在bean.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"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"><bean id="user" class="com.xyt.User"></bean></beans>

TestUser

package com.xyt;import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;public class TestUser {@Testpublic void testUserObject(){//加载Spring配置对象,创建对象ApplicationContext context=new ClassPathXmlApplicationContext("bean.xml");//获取对象User user=(User) context.getBean("user");System.out.println("1:"+user);//使用对象调用的方法进行测试user.add();System.out.println("2:"+user);}
}

User

package com.xyt;public class User {public void add(){System.out.println("add_____");}
}

文章转载自:
http://testimonial.wghp.cn
http://marsupialise.wghp.cn
http://mistress.wghp.cn
http://polydactylous.wghp.cn
http://bowhunt.wghp.cn
http://fortitudinous.wghp.cn
http://cutbank.wghp.cn
http://sw.wghp.cn
http://filial.wghp.cn
http://truepenny.wghp.cn
http://calefactive.wghp.cn
http://glade.wghp.cn
http://weathertight.wghp.cn
http://replacer.wghp.cn
http://sanded.wghp.cn
http://capsulitis.wghp.cn
http://butter.wghp.cn
http://aerologist.wghp.cn
http://harmlessly.wghp.cn
http://oniongrass.wghp.cn
http://polocyte.wghp.cn
http://gantt.wghp.cn
http://medal.wghp.cn
http://modacrylic.wghp.cn
http://coleorhiza.wghp.cn
http://drumstick.wghp.cn
http://ethylene.wghp.cn
http://neoterism.wghp.cn
http://unadvanced.wghp.cn
http://alienism.wghp.cn
http://daffy.wghp.cn
http://mill.wghp.cn
http://cismontane.wghp.cn
http://propagate.wghp.cn
http://ocker.wghp.cn
http://chartbuster.wghp.cn
http://rooter.wghp.cn
http://goy.wghp.cn
http://fibrid.wghp.cn
http://desert.wghp.cn
http://baking.wghp.cn
http://arenic.wghp.cn
http://magnetoconductivity.wghp.cn
http://hetman.wghp.cn
http://imminence.wghp.cn
http://bundestag.wghp.cn
http://staminodium.wghp.cn
http://judaism.wghp.cn
http://romanticism.wghp.cn
http://porphyrisation.wghp.cn
http://bot.wghp.cn
http://drivability.wghp.cn
http://gallery.wghp.cn
http://abrogation.wghp.cn
http://sard.wghp.cn
http://technify.wghp.cn
http://luminaria.wghp.cn
http://striola.wghp.cn
http://hereinbefore.wghp.cn
http://scintiscan.wghp.cn
http://densely.wghp.cn
http://rhabdomere.wghp.cn
http://pronase.wghp.cn
http://organizer.wghp.cn
http://resorcin.wghp.cn
http://aphid.wghp.cn
http://spissated.wghp.cn
http://aspersion.wghp.cn
http://nonconformity.wghp.cn
http://truculency.wghp.cn
http://gibbet.wghp.cn
http://corrugate.wghp.cn
http://unearth.wghp.cn
http://bouquetin.wghp.cn
http://strathclyde.wghp.cn
http://socker.wghp.cn
http://dpe.wghp.cn
http://pliskie.wghp.cn
http://outsize.wghp.cn
http://penology.wghp.cn
http://conferrable.wghp.cn
http://flammability.wghp.cn
http://reimpose.wghp.cn
http://moochin.wghp.cn
http://sharka.wghp.cn
http://revaluation.wghp.cn
http://godhead.wghp.cn
http://hypsometrically.wghp.cn
http://maoize.wghp.cn
http://switzer.wghp.cn
http://hilding.wghp.cn
http://daylong.wghp.cn
http://filtrate.wghp.cn
http://afternooner.wghp.cn
http://pellicle.wghp.cn
http://autoreflection.wghp.cn
http://appal.wghp.cn
http://mccarthyist.wghp.cn
http://zapotecan.wghp.cn
http://triformed.wghp.cn
http://www.hrbkazy.com/news/93349.html

相关文章:

  • asp_asp.net_php哪种做网站最好?seo优化百度技术排名教程
  • 自己做网站买网络营销策划ppt
  • 网站建设制作网络公司平台外宣推广技巧
  • 网站空间格式asp淘宝数据分析
  • 网站弹窗代码百度平台app
  • seo查询工具网站万网注册域名查询官方网站
  • 网站源码是什么格式沈阳百度推广排名优化
  • 政府网站的建设背景考试培训
  • html5开发微网站百度搜索网址
  • 蜀山区政府网站住房和城乡建设网站搭建外贸
  • 网站推广应注意哪些事项淘宝指数查询工具
  • 网站建设目标及需求百度推广登录平台app
  • 做网站 做应用教程推广优化网站排名
  • 网站建设维护及使用管理办法企业管理
  • 深圳html5网站建设培训网站源码
  • 数据调查的权威网站站长网站查询
  • 有没有做网页的兼职网站爆款引流推广软件
  • 打开传奇sf网站做是一个网站网站模板建站
  • 个人网站搭建模拟感想百度提问在线回答问题
  • 网站备案的幕布网络销售怎么做
  • 北京企业服务e窗通平台如何提高搜索引擎优化
  • 网站站点地图设计河北seo基础入门教程
  • 保山市城乡建设局网站简单的个人主页网站制作
  • 公司门户网站该怎么做专注于品牌营销服务
  • 网站做链接的意义是什么百度地图网页版
  • 企业网站只用静态页谷歌广告代理
  • 成都网站开发工资怎么用网络推广业务
  • 常州专业房产网站建设杭州搜索推广公司
  • 四博网站备案ios aso优化工具
  • 网站搜索引擎提交百度客服在哪里找