Spring JavaConfig Reference Guide - Spring Web Services - Parent ...
Spring JavaConfig Reference Guide - Spring Web Services - Parent ... Spring JavaConfig Reference Guide - Spring Web Services - Parent ...
New & Noteworthy in 1.0.0.m3dataSource.setUrl(url());}return dataSource;@ExternalValuepublic abstract String username();@ExternalValuepublic abstract String password();}@ExternalValue("jdbc.url")public abstract String url();com/myapp/datasource.properties:username=scottpassword=tigerjdbc.url=...See Section 5.5, “Externalizing values with @ExternalValue and @ResourceBundles” for full detailsSpring JavaConfig 7
Chapter 3. Quick startThis chapter provides a basic tutorial for getting started with JavaConfig. For full details on JavaConfig'scapabilities, please refer to Part II, “API Reference”3.1. Download JavaConfigLike any Java library, you'll first need to get the JavaConfig jar (and the jars it depends on) into your classpath.3.1.1. Manual downloadPlease visit http://www.springframework.org/javaconfig where you'll find links to zip file distributions. Threedistributions are available:1. spring-javaconfig-1.0.0.m4-SNAPSHOT.zip2. spring-javaconfig-1.0.0.m4-SNAPSHOT-with-minimal-dependencies.zip3. spring-javaconfig-1.0.0.m4-SNAPSHOT-with-dependencies.zipThe -with-minimal-dependencies zip contains only those jars that are required for basic JavaConfigfunctionality, while the -with-dependencies zip contains all dependencies, including those required for AOPsupport.3.1.2. Maven 2Assuming your project uses a Maven2 build infrastructure, using JavaConfig is as simple as adding thefollowing to your POMorg.springframework.javaconfigspring-javaconfig1.0.0.m4-SNAPSHOTNotePlease note that this release is not published at the central Maven repository. Instead it is publishedon Amazon's S3 service, like all Spring milestones. To use it, add the following repository to yourPOM:spring-milestoneSpring Milestone Repositoryhttp://s3.amazonaws.com/maven.springframework.org/milestoneTipSee Appendix C, Maven2 POM configurations for more information about using Maven2 withSpring JavaConfigSpring JavaConfig 8
- Page 2 and 3: About this document ...............
- 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 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
New & Noteworthy in 1.0.0.m3dataSource.setUrl(url());}return dataSource;@ExternalValuepublic abstract String username();@ExternalValuepublic abstract String password();}@ExternalValue("jdbc.url")public abstract String url();com/myapp/datasource.properties:username=scottpassword=tigerjdbc.url=...See Section 5.5, “Externalizing values with @ExternalValue and @ResourceBundles” for full details<strong>Spring</strong> <strong>JavaConfig</strong> 7