spring学习(26):更优雅的依赖注入 在@bean注入参数

目录结构

pox.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.geyao</groupId><artifactId>spring01geyao</artifactId><version>1.0-SNAPSHOT</version><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>4.3.13.RELEASE</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>3.2.0.RELEASE</version></dependency><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17</version></dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>4.3.4.RELEASE</version><scope>test</scope></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>4.3.4.RELEASE</version><scope>test</scope></dependency></dependencies>
</project>

log4j.propreties

### 设置###
log4j.rootLogger = ERROR,stdout### 输出信息到控制抬 ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
log4j.category.org.springframework.beans.factory=DEBUG

Appconfig类

package com.geyao.demo.config;import com.geyao.demo.Service.impl.UserServiceNormal;
import com.geyao.demo.dao.UserDao;
import com.geyao.demo.dao.impl.UserDaoNormal;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;@Configurationpublic class Appconfig {@Beanpublic UserDao userDaoNormal(){System.out.println("创建UserDao对象");return  new UserDaoNormal();}@Beanpublic UserServiceNormal userServiceNormal(UserDao userDao){System.out.println("创建userservice对象");return new UserServiceNormal(userDao);}
}

userservice类

package com.geyao.demo.dao.impl;import com.geyao.demo.dao.UserDao;
import org.springframework.stereotype.Repository;public class UserDaoNormal implements UserDao {public void add(){System.out.println("添加到数据库中...");}
}

Userdao

package com.geyao.demo.dao;public interface UserDao {void add();
}

UserServiceNormal类

package com.geyao.demo.Service.impl;import com.geyao.demo.Service.UserService;
import com.geyao.demo.dao.UserDao;
import org.springframework.stereotype.Service;public class UserServiceNormal implements UserService {private UserDao userDao;public UserServiceNormal() {super();}public UserServiceNormal(UserDao userDao){this.userDao=userDao;}public void add(){userDao.add();}
}

UserService类

package com.geyao.demo.Service;public interface UserService {void add();
}

UserServiceTest类

package com.geyao.demo.service;import com.geyao.demo.Service.UserService;
import com.geyao.demo.config.Appconfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = Appconfig.class)
public class UserServiceTest {@Autowiredprivate UserService userService;@Testpublic void testAdd(){userService.add();}
}

运行结果

[DEBUG] 2019-11-01 22:25:32,893 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:32,898 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:32,927 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:32,931 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/geyao/.m2/repository/org/springframework/spring-core/4.3.13.RELEASE/spring-core-4.3.13.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[DEBUG] 2019-11-01 22:25:33,125 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,125 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,127 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:33,157 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,158 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,158 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,159 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:33,167 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,176 method:org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:730)
Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@43195e57: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,appconfig,userDaoNormal,userServiceNormal]; root of factory hierarchy
[DEBUG] 2019-11-01 22:25:33,177 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,177 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,177 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
[DEBUG] 2019-11-01 22:25:33,179 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor'
[DEBUG] 2019-11-01 22:25:33,180 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'org.springframework.context.event.internalEventListenerProcessor'
[DEBUG] 2019-11-01 22:25:33,184 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'org.springframework.context.event.internalEventListenerProcessor' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:33,189 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'org.springframework.context.event.internalEventListenerProcessor'
[DEBUG] 2019-11-01 22:25:33,190 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
[DEBUG] 2019-11-01 22:25:33,190 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'org.springframework.context.event.internalEventListenerFactory'
[DEBUG] 2019-11-01 22:25:33,191 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'org.springframework.context.event.internalEventListenerFactory' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:33,196 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'org.springframework.context.event.internalEventListenerFactory'
[DEBUG] 2019-11-01 22:25:33,196 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'appconfig'
[DEBUG] 2019-11-01 22:25:33,197 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'appconfig'
[DEBUG] 2019-11-01 22:25:33,198 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'appconfig' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:33,204 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'appconfig'
[DEBUG] 2019-11-01 22:25:33,204 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'userDaoNormal'
[DEBUG] 2019-11-01 22:25:33,204 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'userDaoNormal'
[DEBUG] 2019-11-01 22:25:33,207 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'appconfig'
创建UserDao对象
[DEBUG] 2019-11-01 22:25:33,247 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'userDaoNormal' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:33,251 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'userDaoNormal'
[DEBUG] 2019-11-01 22:25:33,251 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
Creating shared instance of singleton bean 'userServiceNormal'
[DEBUG] 2019-11-01 22:25:33,252 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:449)
Creating instance of bean 'userServiceNormal'
[DEBUG] 2019-11-01 22:25:33,252 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'appconfig'
创建userservice对象
[DEBUG] 2019-11-01 22:25:33,254 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'userDaoNormal'
[DEBUG] 2019-11-01 22:25:33,256 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Eagerly caching bean 'userServiceNormal' to allow for resolving potential circular references
[DEBUG] 2019-11-01 22:25:33,259 method:org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:485)
Finished creating instance of bean 'userServiceNormal'
[DEBUG] 2019-11-01 22:25:33,260 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
[DEBUG] 2019-11-01 22:25:33,316 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'lifecycleProcessor'
[DEBUG] 2019-11-01 22:25:33,325 method:org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:86)
Processing injected element of bean 'com.geyao.demo.service.UserServiceTest': AutowiredFieldElement for private com.geyao.demo.Service.UserService com.geyao.demo.service.UserServiceTest.userService
[DEBUG] 2019-11-01 22:25:33,330 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'userServiceNormal'
[DEBUG] 2019-11-01 22:25:33,331 method:org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.registerDependentBeans(AutowiredAnnotationBeanPostProcessor.java:535)
Autowiring by type from bean name 'com.geyao.demo.service.UserServiceTest' to bean named 'userServiceNormal'
添加到数据库中...
[DEBUG] 2019-11-01 22:25:33,340 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251)
Returning cached instance of singleton bean 'lifecycleProcessor'
[DEBUG] 2019-11-01 22:25:33,341 method:org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:512)
Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@43195e57: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,appconfig,userDaoNormal,userServiceNormal]; root of factory hierarchy

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/424444.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[dp] LeetCode 62. Unique Paths

输入&#xff1a;两个int m和n 输出&#xff1a;一个int,表示不同路径的个数。 规则&#xff1a;有一个m行n列的矩阵&#xff0c;一个机器人从左上角走到右下角&#xff0c;每次向下或者向右走一格。 分析&#xff1a;目的是要找到从(0,0)到(m-1,n-1)有多少种不同 的走法。如果…

spring学习(27):通过setter依赖注入

目录结构 pox.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

[密码学基础][每个信息安全博士生应该知道的52件事][Bristol52]50.什么是BLS基于对的签名方案?

这是一系列博客文章中最新的一篇&#xff0c;该文章列举了“每个博士生在做密码学时应该知道的52件事”:一系列问题的汇编是为了让博士生们在第一年结束时知道些什么。 转载链接&#xff1a;https://www.cnblogs.com/zhuowangy2k/p/12248721.html

深度学习04-RNN

文章目录1 为什么需要RNN1.1RNN的应用场景1.2 DNN和CNN不能解决的问题2 RNN的网络结构2.1 RNN基础结构2.2 不同类型的RNN3 RNN的优化算法BPTT4 LSTM5 GRU1 为什么需要RNN 1.1RNN的应用场景 1 模仿论文&#xff08;生成序列&#xff09;。输入是一堆的论文文章&#xff0c;输出…

spring学习(28):处理自动装配的歧义性

pox.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/POM/4.0.0 …

[密码学基础][每个信息安全博士生应该知道的52件事][Bristol52]51.基于ID的加密安全模型,描述IBE方案

这是一系列博客文章中最新的一篇&#xff0c;该文章列举了“每个博士生在做密码学时应该知道的52件事”:一系列问题的汇编是为了让博士生们在第一年结束时知道些什么。 在公钥密码学中&#xff0c;如果Alice想要给Bob发送一条消息&#xff0c;她需要Bob的公钥&#xff0c;一般来…

spring学习(29):xml配置规范

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

leetcode——背包问题汇总

本章来汇总一下leetcode中做过的背包问题&#xff0c;包括0-1背包和完全背包。 背包问题的通常形式为&#xff1a;有N件物品和一个最多能背重量为W 的背包。第i件物品的重量是weight[i]&#xff0c;得到的价值是value[i] 。求解将哪些物品装入背包里物品价值总和最大。0-1背包和…

spring学习(32):使用junit4测试

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

spring学习(33):id和name

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

[高效时间管理] 番茄工作钟 windows版本

【背景】 2019年本人学会了记录每日时间&#xff08;将每日分割成半小时一段的时间&#xff09; &#xff0c;但似乎是为了完成而完成&#xff0c;效果不佳&#xff0c;手机端的番茄钟总是诱惑太多&#xff0c;就在准备tb计时器的时候&#xff0c;发现了宝藏软件。 个人整理知…

IDEA设置取消自动显示参数提示

IDEA设置取消自动显示参数提示 最近在使用IDEA的过程中&#xff0c;发现方法中一直显示形参名的提示&#xff0c;无法选中&#xff0c;也无法删除&#xff0c;基于不同人的使用习惯不同&#xff0c;有的人不喜欢这种提示&#xff0c;我也在网上寻找各种解决方案&#xff0c;由于…

spring学习(34):构造函数依赖注入

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

[高效时间管理]复盘篇

【背景】 2019年本人在公众号中阅读了《时间管理&#xff0c;这篇就够了》&#xff0c;学习了其中的内容并开始记录每日所做&#xff0c;偶尔晚上进行复盘&#xff0c;对督促学习和反思起到一定的作用&#xff0c;故向大家分享经验。 为什么要时间管理&#xff1f; 时间管理…

spring学习(35):c名称空间注入

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

spring学习(36):注入简单类型

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

spring学习(37):注入list类型

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

spring学习(38):注入set类型

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

spring学习(39):注入map类型

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

NanUI文档 - 如何实现C#与Javascript的相互通信

NanUI文档目录 NanUI简介开始使用NanUI打包并使用内嵌式的HTML/CSS/JS资源使用网页来设计整个窗口如何实现C#与Javascript的相互通信如何处理NanUI中的下载过程 - DonwloadHandler的使用(待更新。。。)如何处理NanUI中的弹窗过程 - LifeSpanHandler的使用(待更新。。。)如何控制…