Spring JavaConfig Reference Guide - Spring Web Services - Parent ...
Spring JavaConfig Reference Guide - Spring Web Services - Parent ... Spring JavaConfig Reference Guide - Spring Web Services - Parent ...
About this document ........................................................................................................................ iv1. Document structure .............................................................................................................. iv2. Target audience ....................................................................................................................iv3. Code conventions ................................................................................................................. ivPreface to the third milestone release ..................................................................................................vI. Introduction ...................................................................................................................................11. Overview ............................................................................................................................. 21.1. What is JavaConfig? ................................................................................................... 21.2. Why JavaConfig? ....................................................................................................... 21.3. Requirements ............................................................................................................. 21.3.1. Runtime Environment ...................................................................................... 21.3.2. Project Dependencies ....................................................................................... 21.4. History .......................................................................................................................32. New & Noteworthy in 1.0.0.m3 ............................................................................................ 42.1. AnnotationApplicationContext deprecated ................................................................42.2. Type-safety improvements .......................................................................................... 42.3. First-class support for JavaConfig in the web tier ..........................................................42.4. New semantics for nested @Configuration classes ....................................................... 52.5. Modularization improvements with @Import ................................................................ 62.6. Support for externalizing string values with @ExternalValue ........................................ 63. Quick start ...........................................................................................................................83.1. Download JavaConfig .................................................................................................83.1.1. Manual download ............................................................................................ 83.1.2. Maven 2 .......................................................................................................... 83.2. Create bean definitions ................................................................................................93.3. Retrieve bean instances ............................................................................................... 93.4. Summary ................................................................................................................... 9II. API Reference ............................................................................................................................ 104. Creating and using bean definitions ...................................................................................114.1. @Configuration ....................................................................................................... 114.2. @Bean ....................................................................................................................... 114.2.1. Declaring a bean ............................................................................................ 114.2.2. Using *Aware interfaces ..................................................................................124.2.3. Bean visibility ................................................................................................124.2.4. Bean scoping ................................................................................................. 134.2.5. Bean naming ..................................................................................................144.3. JavaConfigApplicationContext ...............................................................................144.3.1. Construction Options ......................................................................................154.3.2. Accessing beans with getBean() .....................................................................165. Modularizing configurations ..............................................................................................185.1. Partitioning bean definitions across multiple @Configuration classes .......................... 185.2. Referencing externally defined beans with @ExternalBean .......................................... 195.3. Importing @Configuration classes with @Import ........................................................195.4. ConfigurationSupport .............................................................................................205.5. Externalizing values with @ExternalValue and @ResourceBundles ............................. 205.6. Nesting @Configuration classes ................................................................................216. Using aspects ..................................................................................................................... 226.1. Embedded aspects .....................................................................................................226.2. Reusable aspects .......................................................................................................227. Developing web applications with JavaConfig ................................................................... 247.1. JavaConfigWebApplicationContext ......................................................................... 248. Combining configuration approaches ................................................................................ 25Spring JavaConfigii
Spring JavaConfig Reference Guide8.1. JavaConfig and XML ................................................................................................258.1.1. Bootstrapping JavaConfig from XML with ConfigurationPostProcessor ....... 25III. Appendices ............................................................................................................................... 26A. Roadmap ............................................................................................................................27B. Visualizing configurations with Spring IDE ..........................................................................28C. Maven2 POM configurations ............................................................................................... 29C.1. Minimal ...................................................................................................................29C.2. AOP ........................................................................................................................29D. Additional resources ........................................................................................................... 31D.1. Core Spring documentation ...................................................................................... 31D.2. Community forums .................................................................................................. 31D.3. Issue tracking ...........................................................................................................31D.4. SpringSource team blog ............................................................................................31D.5. Consulting and training services ................................................................................31Spring JavaConfigiii
- Page 4 and 5: About this document1. Document stru
- Page 6 and 7: Part I. IntroductionIn Part I we ex
- Page 8 and 9: Overviewconfigurations, the depende
- Page 10 and 11: New & Noteworthy in 1.0.0.m3context
- Page 12 and 13: New & Noteworthy in 1.0.0.m3dataSou
- Page 14 and 15: Quick start3.2. Create bean definit
- Page 16 and 17: Chapter 4. Creating and using bean
- Page 18 and 19: Creating and using bean definitions
- Page 20: Creating and using bean definitions
- Page 23 and 24: Chapter 5. Modularizing configurati
- Page 25: Modularizing configurations5.4. Con
- Page 28 and 29: Using aspects}}...JavaConfigApplica
- Page 30 and 31: Chapter 8. Combining configuration
- Page 32 and 33: Appendix A. RoadmapSee the JavaConf
- Page 34 and 35: Appendix C. Maven2 POM configuratio
- Page 36: Appendix D. Additional resourcesD.1
About this document ........................................................................................................................ iv1. Document structure .............................................................................................................. iv2. Target audience ....................................................................................................................iv3. Code conventions ................................................................................................................. ivPreface to the third milestone release ..................................................................................................vI. Introduction ...................................................................................................................................11. Overview ............................................................................................................................. 21.1. What is <strong>JavaConfig</strong>? ................................................................................................... 21.2. Why <strong>JavaConfig</strong>? ....................................................................................................... 21.3. Requirements ............................................................................................................. 21.3.1. Runtime Environment ...................................................................................... 21.3.2. Project Dependencies ....................................................................................... 21.4. History .......................................................................................................................32. New & Noteworthy in 1.0.0.m3 ............................................................................................ 42.1. AnnotationApplicationContext deprecated ................................................................42.2. Type-safety improvements .......................................................................................... 42.3. First-class support for <strong>JavaConfig</strong> in the web tier ..........................................................42.4. New semantics for nested @Configuration classes ....................................................... 52.5. Modularization improvements with @Import ................................................................ 62.6. Support for externalizing string values with @ExternalValue ........................................ 63. Quick start ...........................................................................................................................83.1. Download <strong>JavaConfig</strong> .................................................................................................83.1.1. Manual download ............................................................................................ 83.1.2. Maven 2 .......................................................................................................... 83.2. Create bean definitions ................................................................................................93.3. Retrieve bean instances ............................................................................................... 93.4. Summary ................................................................................................................... 9II. API <strong>Reference</strong> ............................................................................................................................ 104. Creating and using bean definitions ...................................................................................114.1. @Configuration ....................................................................................................... 114.2. @Bean ....................................................................................................................... 114.2.1. Declaring a bean ............................................................................................ 114.2.2. Using *Aware interfaces ..................................................................................124.2.3. Bean visibility ................................................................................................124.2.4. Bean scoping ................................................................................................. 134.2.5. Bean naming ..................................................................................................144.3. <strong>JavaConfig</strong>ApplicationContext ...............................................................................144.3.1. Construction Options ......................................................................................154.3.2. Accessing beans with getBean() .....................................................................165. Modularizing configurations ..............................................................................................185.1. Partitioning bean definitions across multiple @Configuration classes .......................... 185.2. Referencing externally defined beans with @ExternalBean .......................................... 195.3. Importing @Configuration classes with @Import ........................................................195.4. ConfigurationSupport .............................................................................................205.5. Externalizing values with @ExternalValue and @ResourceBundles ............................. 205.6. Nesting @Configuration classes ................................................................................216. Using aspects ..................................................................................................................... 226.1. Embedded aspects .....................................................................................................226.2. Reusable aspects .......................................................................................................227. Developing web applications with <strong>JavaConfig</strong> ................................................................... 247.1. <strong>JavaConfig</strong><strong>Web</strong>ApplicationContext ......................................................................... 248. Combining configuration approaches ................................................................................ 25<strong>Spring</strong> <strong>JavaConfig</strong>ii