摘要: 1,scope="singleton" 这里指的是在创建该bean(组件)时 ,只会创建一次其他都为该对象的引用(即 A a = new A ,其余的都是 A c = a ;) 代码如下: 在Demo和Student两个类中都引用了school这个类 该bean的scope="singleton" 阅读全文
posted @ 2022-04-14 16:14 yfs1024 阅读(501) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 阅读全文
posted @ 2022-04-14 14:38 yfs1024 阅读(44) 评论(0) 推荐(0)
摘要: 1,properties里面的配置: <properties> <maven.compiler.source>1.8</maven.compiler.source> 源码编译 jdk 版本 <maven.compiler.target>1.8</maven.compiler.target> 运行代码 阅读全文
posted @ 2022-04-14 14:07 yfs1024 阅读(19) 评论(0) 推荐(0)