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

网站建设方法牜金手指下拉覀做ipad的网站尺寸是多少

网站建设方法牜金手指下拉覀,做ipad的网站尺寸是多少,手机可以做软件开发吗,wordpress slider设置Spring 就是⼀个包含了众多工具方法的 IoC 容器。既然是容器那么它就具备两个最基本的功能#xff1a; 将对象存储到容器#xff08;Spring#xff09;中从容器中将对象取出来 接下来使用 Maven 方式来创建一个 Spring 项目#xff0c;创建 Spring 项目和 Servlet 类似 将对象存储到容器Spring中从容器中将对象取出来 接下来使用 Maven 方式来创建一个 Spring 项目创建 Spring 项目和 Servlet 类似 在 Java 语言中对象也叫做 Bean所以后面咱们再遇到对象就以 Bean 著称。 1.创建 Spring 项目 接下来使用 Maven 方式来创建一个 Spring 项目创建 Spring 项目和 Servlet 类似总共分为以下3步 创建⼀个普通 Maven 项目添加 Spring 框架支持spring-context、spring-beans添加启动类 1.创建一个普通 Maven 项目 2.添加 Spring 依赖 在项目的 pom.xml 中添加 Spring 框架的支持 dependenciesdependencygroupIdorg.springframework/groupIdartifactIdspring-context/artifactIdversion5.2.3.RELEASE/version/dependencydependencygroupIdorg.springframework/groupIdartifactIdspring-beans/artifactIdversion5.2.3.RELEASE/version/dependency/dependencies?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdorg.example/groupIdartifactIdtest-2023-11-15/artifactIdversion1.0-SNAPSHOT/versionpropertiesmaven.compiler.source8/maven.compiler.sourcemaven.compiler.target8/maven.compiler.targetproject.build.sourceEncodingUTF-8/project.build.sourceEncoding/propertiesdependenciesdependencygroupIdorg.springframework/groupIdartifactIdspring-context/artifactIdversion5.2.3.RELEASE/version/dependencydependencygroupIdorg.springframework/groupIdartifactIdspring-beans/artifactIdversion5.2.3.RELEASE/version/dependency/dependencies/project3.创建启动类 2.将 Bean 对象存储到 Spring (IoC容器) 1.创建一个 Bean 对象 2.将 Bean 存储到 Spring 中 在创建好的项目中添加 Spring 配置文件 spring-config.xml将此文件放到 resources 的根目录下 ?xml version1.0 encodingUTF-8? beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd/beans接下来再将 User 对象注册到 Spring 中就可以 bean iduser classcom.wjh.demo.UserService/bean3.从容器中获取 Bean 对象 1.得到 Spring 上下文对象 public class App {public static void main(String[] args) {//1.先得到 Spring 上下文对象ApplicationContext context new ClassPathXmlApplicationContext(spring-config.xml);} }2.获取到 Bean 对象 public class App {public static void main(String[] args) {//1.先得到 Spring 上下文对象ApplicationContext context new ClassPathXmlApplicationContext(spring-config.xml);//2.得到 Beancontext.getBean(user);} } 3.使用 Bean 对象 public class App {public static void main(String[] args) {//1.先得到 Spring 上下文对象ApplicationContext context new ClassPathXmlApplicationContext(spring-config.xml);//2.得到 Bean [依赖查找 - IoC 的一种实现]UserService userService (UserService) context.getBean(user);//3.使用 Bean 对象userService.sayHello();} }4.方法2 public class App2 {public static void main(String[] args) {//1.得到 Spring 上下文对象BeanFactory context new XmlBeanFactory(new ClassPathResource(spring-config.xml));//2.获取 BeanUserService userService (UserService) context.getBean(user);//3.使用 BeanuserService.sayHello();} }5.ApplicationContext 和 BeanFactory 的区别 保证线程安全问题: 1.使用锁 ( synchronized 锁升级的流程) 2.使用线程安全的容器 (底层锁实现) 3.ThreadLocal (本地线程变量) 相同点 : 都是容器管理对象,都可以获取到 Bean 对象 不同点: ApplicationContext 属于 BeanFactory 的子类,ApplicationContext 拥有更多的功能(对国际化支持、资源访问支持、以及事件传播等方面的支持…)加载 Bean 机制不同: BeanFactory 懒加载,按需加载(使用一个 Bean 加载一个 Bean) ApplicationContext 是⼀次性加载并初始化所有的 Bean 对象 我们加入一个 Student 类 public class App {public static void main(String[] args) {//1.先得到 Spring 上下文对象ApplicationContext context new ClassPathXmlApplicationContext(spring-config.xml);/* //2.得到 Bean [依赖查找 - IoC 的一种实现]UserService userService (UserService) context.getBean(user);//3.使用 Bean 对象userService.sayHello();*/} } public class App2 {public static void main(String[] args) {//1.得到 Spring 上下文对象BeanFactory context new XmlBeanFactory(new ClassPathResource(spring-config.xml));/* //2.获取 BeanUserService userService (UserService) context.getBean(user);//3.使用 BeanuserService.sayHello();*/} }6.getBean 方法的更多用法 根据名称获取 Bean 根据类型获取 Bean public class GetBeanExample {public static void main(String[] args) {//1.得到上下文对象ApplicationContext context new ClassPathXmlApplicationContext(spring-config.xml);//2.获取 BeanUserService userService context.getBean(UserService.class);//3.使用 BeanuserService.sayHello();} }区别就是:当有⼀个类型被重复注册到 spring-config.xml 中时只能使用根据名称获取了 根据 名称 类型 获取 public class GetBeanExample {public static void main(String[] args) {//1.得到上下文对象ApplicationContext context new ClassPathXmlApplicationContext(spring-config.xml);//2.获取 BeanUserService userService context.getBean(user, UserService.class);//3.使用 BeanuserService.sayHello();} }4.操作流程图
http://www.hkea.cn/news/14446416/

相关文章:

  • 珠海网站建设哪个平台好网站建设扁平化
  • 如何用手机制作网站网站开发php岗位职责
  • 做网站公司郑州郑州的网站建设公司哪家好广州做外贸网站的公司简介
  • 制作网站什么制作在线制作印章公章
  • 复旦学霸张立勇做的有关寺庙网站网站三层结构示意图
  • 玉田县建设局网站网络营销策划课程
  • 网站无障碍建设报告wordpress增加访问速度
  • 什么样的公司需要做网站广州短视频运营营销报价
  • apache建立多个网站创业融资平台
  • 从化网站建设推广工作邮箱认证提额
  • 建设银行网站打不开别的网站可以用吗手机获取短信验证码 wordpress
  • 给手机做网站的公司深圳建设交易平台官网
  • 高端品销售网站wordpress 修改html代码
  • steam官方网站下载了解目前网站建设情况
  • 陕西电商网站建设安徽公共资源交易中心
  • 公司网站 数据库如何做网站可以吗
  • 做网站需要多少资金哪里可以做期货网站平台
  • 兰州市建设工程质量监督站网站成都建设网站哪个好
  • 过期网站.wordpress自带轮播
  • 佛山高端网站制作公司网络营销平台建设
  • 网站开发90天wordpress支付宝即时到帐
  • 深圳网站优化公司北京住房和建设部网站
  • 汉中市网站建设跳舞游戏做的广告视频网站
  • 企业建设网站有用么因酷网站建设
  • 在天猫开店需要什么条件与费用无锡网站排名优化报价
  • 网站验证码目录引擎seo如何优化
  • 图表生成网站客户管理软件crm
  • 江门建设银行网站白云网站建设公
  • 使用nas服务器建设网站南宁seo推广优化
  • 网站流量方案做商品网站