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

网站建设策划案模版做个公司网站一般需要多少钱

网站建设策划案模版,做个公司网站一般需要多少钱,自己做盗版小说网站,wordpress 增加浮动条一、概述 自动装配是根据指定规则(属性名称或者属性类型),Spring自动将匹配的属性值进行注入。 二、分类 xml自动装配分为按照属性名称自动装配(byName)和按照属性类型自动装配(byType)。 2.1…

一、概述

        自动装配是根据指定规则(属性名称或者属性类型),Spring自动将匹配的属性值进行注入。

二、分类

        xml自动装配分为按照属性名称自动装配(byName)和按照属性类型自动装配(byType)

2.1、byName

@AllArgsConstructor
@NoArgsConstructor
@Data
public class Department implements Serializable {/*** 部门名称*/private String name;}@Data
@AllArgsConstructor
@NoArgsConstructor
public class Employee implements Serializable {/*** 员工名称*/private String name;/*** 性别*/private String gender;/*** 部门*/private Department department;
}<?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="employee" class="org.star.entity.Employee" autowire="byName"><property name="name" value="李白"></property><property name="gender" value="男"></property><property name="department" ref="department"></property></bean><bean id="department" class="org.star.entity.Department"><property name="name" value="研发部"></property></bean></beans>/*** IOC操作bean管理(xml自动装配-byName)*/
@Test
public void beanManagementTest12() {ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext12.xml");Employee employee = context.getBean("employee", Employee.class);System.out.println("byName employee = " + employee);
}
// 控制台打印结果
byName employee = Employee(name=李白, gender=男, department=Department(name=研发部))

2.2、byType

@AllArgsConstructor
@NoArgsConstructor
@Data
public class Department implements Serializable {/*** 部门名称*/private String name;}@Data
@AllArgsConstructor
@NoArgsConstructor
public class Employee implements Serializable {/*** 员工名称*/private String name;/*** 性别*/private String gender;/*** 部门*/private Department department;
}<?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="employee" class="org.star.entity.Employee" autowire="byType"><property name="name" value="李白"></property><property name="gender" value="男"></property><property name="department" ref="department"></property></bean><bean id="department" class="org.star.entity.Department"><property name="name" value="研发部"></property></bean></beans>/*** IOC操作bean管理(xml自动装配-byType)*/
@Test
public void beanManagementTest13() {ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext13.xml");Employee employee = context.getBean("employee", Employee.class);System.out.println("byType employee = " + employee);
}
// 控制台打印结果
byType employee = Employee(name=李白, gender=男, department=Department(name=研发部))

http://www.wangmingla.cn/news/114978.html

相关文章:

  • 龙岩网站建设设计服务网站推广排名服务
  • 西宁网站建设有限公司百度做广告多少钱一天
  • 建网站需要有啥能力青岛网
  • 燃烧学课程网站建设谷歌关键词排名优化
  • 网站建设需求指引百度seo关键词报价
  • 东莞手机网站制作公司重庆seo网站推广优化
  • 有几家做网站的公司互联网推广销售
  • 织梦xml网站地图在线seo诊断
  • 做网站服务器多钱seo怎么做优化排名
  • WordPress 同步网易博客seo网站推广免费
  • 云瓣科技做网站seo服务商技术好的公司
  • 自己做的网站做登录最近一周新闻热点大事件
  • 制作网页时固定定位是最常用的定位模式重庆seo网站系统
  • 桂林商品房做民宿在哪个网站登记好seo推广方案怎么做
  • 大创项目做英语网站产品推广运营的公司
  • 无为县住房和城乡建设局网站首页公关公司排名
  • 网站源码资源广告联盟骗局
  • 白银市做网站怎样推广自己的网站
  • 做网站公司 陕西渭南枣庄网站建设制作
  • 男女做那事是什 网站app拉新推广代理平台
  • 申请免费网站多少钱包就业的培训学校
  • 做网站怎么备案网站设计与建设
  • 电商公司怎么注册营业执照seo常见优化技术
  • 哪个公司建立网站好外贸建站服务推广公司
  • 企业动态网站开发周期搞一个公司网站得多少钱
  • 建立网站需要服务器吗百度seo怎么做网站内容优化
  • 网站开发 视频存储百度查重入口
  • 做电子请帖网站有哪些58同城关键词怎么优化
  • 大良购物网站建设aso优化方案
  • 网站做ppt模板网络代运营推广