上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 52 下一页
摘要: 1. 1 package soundsystem; 2 3 public class SgtPeppers implements CompactDisc { 4 5 private String title = "Sgt. Pepper's Lonely Hearts Club Band"; 6 p 阅读全文
posted @ 2016-03-02 09:31 shamgod 阅读(261) 评论(0) 推荐(0) 编辑
摘要: spring的bean默认是单例,加载容器是会被化,spring会拦截其他再次请求bean的操作,返回spring已经创建好的bean. It appears that the CompactDisc is provided by calling sgtPeppers , but that’s no 阅读全文
posted @ 2016-03-01 16:21 shamgod 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1. package soundsystem; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuratio 阅读全文
posted @ 2016-03-01 16:20 shamgod 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 一、@ComponentScan 1. @Configuration //说明此类是配置文件 @ComponentScan //开启扫描,会扫描当前类的包及其子包 public class CDPlayerConfig { } 2. @ComponentScan(basePackages={"sou 阅读全文
posted @ 2016-03-01 15:51 shamgod 阅读(908) 评论(0) 推荐(0) 编辑
摘要: 1. 1 package soundsystem; 2 import org.springframework.context.annotation.ComponentScan; 3 import org.springframework.context.annotation.Configuration 阅读全文
posted @ 2016-03-01 15:30 shamgod 阅读(840) 评论(0) 推荐(0) 编辑
摘要: 一、 1. As you can see, a bean factory performs several setup steps before a bean is ready touse. Let’s break down figure 1.5 in more detail:1 Spring in 阅读全文
posted @ 2016-03-01 13:06 shamgod 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 一、 1. 1 package chapter01.sia.knights.config; 2 3 import org.springframework.context.annotation.Bean; 4 import org.springframework.context.annotation. 阅读全文
posted @ 2016-03-01 12:37 shamgod 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 一、目标 要在BraveKnight调用embarkOnQuest()前后各做一些处理(调用Minstrel的方法) 二、 1.minstrel.xml 1 <?xml version="1.0" encoding="UTF-8"?> 2 <beans xmlns="http://www.sprin 阅读全文
posted @ 2016-03-01 12:22 shamgod 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 一、 1.knight.xml 1 <?xml version="1.0" encoding="UTF-8"?> 2 <beans xmlns="http://www.springframework.org/schema/beans" 3 xmlns:xsi="http://www.w3.org/2 阅读全文
posted @ 2016-03-01 10:27 shamgod 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1.Spring’s fundamental mission: Spring simplifies Java development. 2.To back up its attack on Java complexity, Spring employs four key strategies:  阅读全文
posted @ 2016-02-29 23:05 shamgod 阅读(238) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 52 下一页
haha