You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(387) |
May
(1066) |
Jun
(689) |
Jul
(504) |
Aug
(697) |
Sep
(660) |
Oct
(591) |
Nov
(393) |
Dec
(324) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(567) |
Feb
(448) |
Mar
(461) |
Apr
(368) |
May
(887) |
Jun
(243) |
Jul
(429) |
Aug
(670) |
Sep
(648) |
Oct
(684) |
Nov
(599) |
Dec
(317) |
2008 |
Jan
(388) |
Feb
(400) |
Mar
(323) |
Apr
(214) |
May
(228) |
Jun
(120) |
Jul
(168) |
Aug
(64) |
Sep
(78) |
Oct
(127) |
Nov
(28) |
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
(22) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Juergen H. <jho...@us...> - 2006-04-19 19:44:11
|
Update of /cvsroot/springframework/spring/src/org/springframework/core/io/support In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22459/src/org/springframework/core/io/support Modified Files: PropertiesLoaderSupport.java Log Message: added "propertiesArray" bean property, for merging multiple local Properties instances Index: PropertiesLoaderSupport.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/core/io/support/PropertiesLoaderSupport.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertiesLoaderSupport.java 2 Oct 2005 19:42:41 -0000 1.4 --- PropertiesLoaderSupport.java 19 Apr 2006 19:43:57 -0000 1.5 *************** *** 1,4 **** /* ! * Copyright 2002-2005 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright 2002-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 46,50 **** protected final Log logger = LogFactory.getLog(getClass()); ! private Properties properties; private Resource[] locations; --- 46,50 ---- protected final Log logger = LogFactory.getLog(getClass()); ! private Properties[] localProperties; private Resource[] locations; *************** *** 65,69 **** */ public void setProperties(Properties properties) { ! this.properties = properties; } --- 65,77 ---- */ public void setProperties(Properties properties) { ! this.localProperties = new Properties[] {properties}; ! } ! ! /** ! * Set local properties, e.g. via the "props" tag in XML bean definitions, ! * allowing for merging multiple properties sets into one. ! */ ! public void setPropertiesArray(Properties[] propertiesArray) { ! this.localProperties = propertiesArray; } *************** *** 139,147 **** } ! if (this.properties != null) { ! // Use propertyNames enumeration to also catch default properties. ! for (Enumeration en = this.properties.propertyNames(); en.hasMoreElements();) { ! String key = (String) en.nextElement(); ! result.setProperty(key, this.properties.getProperty(key)); } } --- 147,158 ---- } ! if (this.localProperties != null) { ! for (int i = 0; i < this.localProperties.length; i++) { ! Properties props = this.localProperties[i]; ! // Use propertyNames enumeration to also catch default properties. ! for (Enumeration en = props.propertyNames(); en.hasMoreElements();) { ! String key = (String) en.nextElement(); ! result.setProperty(key, props.getProperty(key)); ! } } } |
From: Juergen H. <jho...@us...> - 2006-04-19 19:44:08
|
Update of /cvsroot/springframework/spring/test/org/springframework/beans/factory/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22459/test/org/springframework/beans/factory/config Modified Files: PropertiesFactoryBeanTests.java Log Message: added "propertiesArray" bean property, for merging multiple local Properties instances Index: PropertiesFactoryBeanTests.java =================================================================== RCS file: /cvsroot/springframework/spring/test/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PropertiesFactoryBeanTests.java 24 Jun 2005 17:33:31 -0000 1.9 --- PropertiesFactoryBeanTests.java 19 Apr 2006 19:43:58 -0000 1.10 *************** *** 1,11 **** /* ! * Copyright 2002-2005 the original author or authors. ! * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ! * * http://www.apache.org/licenses/LICENSE-2.0 ! * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, --- 1,11 ---- /* ! * Copyright 2002-2006 the original author or authors. ! * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ! * * http://www.apache.org/licenses/LICENSE-2.0 ! * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, *************** *** 74,77 **** --- 74,105 ---- } + public void testWithPropertiesFileAndMultipleLocalProperties() throws Exception { + PropertiesFactoryBean pfb = new PropertiesFactoryBean(); + pfb.setLocation(new ClassPathResource("/org/springframework/beans/factory/config/test.properties")); + + Properties props1 = new Properties(); + props1.setProperty("key2", "value2"); + props1.setProperty("tb.array[0].age", "0"); + + Properties props2 = new Properties(); + props2.setProperty("spring", "framework"); + props2.setProperty("Don", "Mattingly"); + + Properties props3 = new Properties(); + props3.setProperty("spider", "man"); + props3.setProperty("bat", "man"); + + pfb.setPropertiesArray(new Properties[] {props1, props2, props3}); + pfb.afterPropertiesSet(); + + Properties props = (Properties) pfb.getObject(); + assertEquals("99", props.getProperty("tb.array[0].age")); + assertEquals("value2", props.getProperty("key2")); + assertEquals("framework", props.getProperty("spring")); + assertEquals("Mattingly", props.getProperty("Don")); + assertEquals("man", props.getProperty("spider")); + assertEquals("man", props.getProperty("bat")); + } + public void testWithPropertiesFileAndLocalPropertiesAndLocalOverride() throws Exception { PropertiesFactoryBean pfb = new PropertiesFactoryBean(); |
From: Rick E. <spr...@us...> - 2006-04-19 16:59:06
|
Update of /cvsroot/springframework/spring/docs/reference/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21259/docs/reference/src Modified Files: aspectj.xml metadata.xml new-in-2.0.xml transaction.xml Log Message: Added forward (TODO) pointers to the @Configurable section of the ref docs. Index: aspectj.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/aspectj.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** aspectj.xml 18 Apr 2006 16:46:02 -0000 1.8 --- aspectj.xml 19 Apr 2006 16:58:59 -0000 1.9 *************** *** 226,230 **** <para>[TODO]</para> </section> ! <section> <title>Using the AspectJ 5 <literal>@AspectJ</literal> annotation-style syntax in Spring AOP</title> <section> --- 226,230 ---- <para>[TODO]</para> </section> ! <section id="aspectj-ataspectj"> <title>Using the AspectJ 5 <literal>@AspectJ</literal> annotation-style syntax in Spring AOP</title> <section> *************** *** 465,468 **** --- 465,474 ---- </section> </section> + <section id="aspectj-atconfigurable"> + <title>Dependency injection using AspectJ with @<interfacename>Configurable</interfacename></title> + <para> + [TODO] + </para> + </section> <section> <title>AspectJ advice with pointcut expressions in Spring XML</title> *************** *** 621,631 **** Find below links to further resources about AspectJ. </para> - <para> - AspectJ is very well documented. The AspectJ - <ulink linkend="http://www.eclipse.org/aspectj/doc/released/progguide/index.html">Programmers Guide</ulink>, - included in the AspectJ 5 distribution, is an excellent starting point. - </para> <itemizedlist> <listitem> <para>The <ulink url="http://www.eclipse.org/aspectj/">AspectJ</ulink> homepage</para> </listitem> --- 627,639 ---- Find below links to further resources about AspectJ. </para> <itemizedlist> <listitem> + <para> + The AspectJ + <ulink linkend="http://www.eclipse.org/aspectj/doc/released/progguide/index.html">Programmers Guide</ulink>, + included in the AspectJ 5 distribution, is an excellent starting point. + </para> + </listitem> + <listitem> <para>The <ulink url="http://www.eclipse.org/aspectj/">AspectJ</ulink> homepage</para> </listitem> Index: transaction.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/transaction.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** transaction.xml 15 Mar 2006 13:51:11 -0000 1.31 --- transaction.xml 19 Apr 2006 16:58:59 -0000 1.32 *************** *** 737,755 **** is deployed as transactional is always deployed that way.</para> ! <sect3> ! <title>The <literal>Transactional</literal> Annotation</title> ! <para>The ! <literal>org.springframework.transaction.annotation.Transactional ! Annotation</literal> is used to indicate that an interface, interface method, class, or class method should have transaction semantics.</para> ! <para><programlisting>@Transactional public interface OrderService { void createOrder(Order order); ! List queryByCriteria(Order criteria);</programlisting>Used in bare form, this ! Annotation specifies that an interface, class, or method must be transactional. Default transaction semantics are read/write, PROPAGATION_REQUIRED, ISOLATION_DEFAULT, TIMEOUT_DEFAULT, with --- 737,758 ---- is deployed as transactional is always deployed that way.</para> ! <sect3 id="transaction-attransactional"> ! <title>@<interfacename>Transactional</interfacename></title> ! <para> ! The @<interfacename>Transactional</interfacename> annotation ! (in the <literal>org.springframework.transaction.annotation</literal> ! package) is used to indicate that an interface, interface method, class, or class method should have transaction semantics.</para> ! <programlisting><![CDATA[@Transactional public interface OrderService { void createOrder(Order order); ! List queryByCriteria(Order criteria);]]></programlisting> ! ! <para> ! Used in bare form, this Annotation specifies that an interface, class, or method must be transactional. Default transaction semantics are read/write, PROPAGATION_REQUIRED, ISOLATION_DEFAULT, TIMEOUT_DEFAULT, with *************** *** 761,765 **** <para><table> ! <title>Properties of the <literal>Transactional</literal> Annotation</title> <tgroup cols="3"> --- 764,768 ---- <para><table> ! <title>Properties of the <interfacename>Transactional</interfacename> Annotation</title> <tgroup cols="3"> *************** *** 853,857 **** <sect4> ! <title><literal>Transactional</literal> annotation examples</title> <para>Annotating a class definition:</para> --- 856,860 ---- <sect4> ! <title><interfacename>Transactional</interfacename> annotation examples</title> <para>Annotating a class definition:</para> *************** *** 886,890 **** <sect4> ! <title>Telling Spring to apply the <literal>Transactional</literal> annotation</title> <para>By itself, adding instances of this annotation to interface or --- 889,893 ---- <sect4> ! <title>Telling Spring to apply the <interfacename>Transactional</interfacename> annotation</title> <para>By itself, adding instances of this annotation to interface or *************** *** 920,924 **** <sect4> ! <title>Using AOP to ensure the <literal>Transactional</literal> annotation is applied</title> <para>The previous example is still more work than would be ideal. --- 923,927 ---- <sect4> ! <title>Using AOP to ensure the <interfacename>Transactional</interfacename> annotation is applied</title> <para>The previous example is still more work than would be ideal. *************** *** 938,942 **** processor, it gets a chance to look at every bean that is created as it is created. If the bean contains the ! <literal>Transactional</literal> annotation, a transactional proxy is automatically created to wrap it.</para> --- 941,945 ---- processor, it gets a chance to look at every bean that is created as it is created. If the bean contains the ! <interfacename>Transactional</interfacename> annotation, a transactional proxy is automatically created to wrap it.</para> Index: new-in-2.0.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/new-in-2.0.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** new-in-2.0.xml 19 Apr 2006 16:25:33 -0000 1.4 --- new-in-2.0.xml 19 Apr 2006 16:58:59 -0000 1.5 *************** *** 338,341 **** --- 338,347 ---- <xref linkend="metadata-annotations-required" /> </listitem> + <listitem> + <para><xref linkend="aspectj-atconfigurable"/></para> + </listitem> + <listitem> + <para><xref linkend="aspectj-ataspectj"/></para> + </listitem> </itemizedlist> </section> Index: metadata.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/metadata.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** metadata.xml 19 Apr 2006 16:25:32 -0000 1.14 --- metadata.xml 19 Apr 2006 16:58:59 -0000 1.15 *************** *** 262,265 **** --- 262,285 ---- <property name="requiredAnnotationType" value="your.company.package.Mandatory"/> </bean>]]></programlisting> + <section> + <title>Other @Annotations in Spring</title> + <para> + Annotations are also used in a number of other places throughout Spring. + Rather than being described here, these annotations are described in that + section or chapter of the reference documentation in which they are most + relevant. + </para> + <itemizedlist> + <listitem> + <para><xref linkend="transaction-attransactional"/></para> + </listitem> + <listitem> + <para><xref linkend="aspectj-atconfigurable"/></para> + </listitem> + <listitem> + <para><xref linkend="aspectj-ataspectj"/></para> + </listitem> + </itemizedlist> + </section> </section> </section> |
From: Keith D. <kd...@us...> - 2006-04-19 16:48:49
|
Update of /cvsroot/springframework/spring-projects/spring-webflow/src/java/org/springframework/webflow/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13376/src/java/org/springframework/webflow/builder Modified Files: DefaultFlowArtifactFactory.java Log Message: polish Index: DefaultFlowArtifactFactory.java =================================================================== RCS file: /cvsroot/springframework/spring-projects/spring-webflow/src/java/org/springframework/webflow/builder/DefaultFlowArtifactFactory.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DefaultFlowArtifactFactory.java 19 Apr 2006 15:35:53 -0000 1.10 --- DefaultFlowArtifactFactory.java 19 Apr 2006 16:48:47 -0000 1.11 *************** *** 116,120 **** public boolean isMultiAction(String actionId) throws FlowArtifactException { ! if (getServiceRegistry().containsBean(actionId)) { return MultiAction.class.isAssignableFrom(getServiceRegistry().getType(actionId)); } --- 116,120 ---- public boolean isMultiAction(String actionId) throws FlowArtifactException { ! if (containsService(actionId)) { return MultiAction.class.isAssignableFrom(getServiceRegistry().getType(actionId)); } *************** *** 125,129 **** public boolean isStatefulAction(String actionId) { ! if (getServiceRegistry().containsBean(actionId)) { return !getServiceRegistry().isSingleton(actionId); } --- 125,129 ---- public boolean isStatefulAction(String actionId) { ! if (containsService(actionId)) { return !getServiceRegistry().isSingleton(actionId); } *************** *** 153,157 **** } ! private Object getService(String id, Class artifactType, boolean enforceTypeCheck) { try { if (enforceTypeCheck) { --- 153,161 ---- } ! protected boolean containsService(String id) { ! return getServiceRegistry().containsBean(id); ! } ! ! protected Object getService(String id, Class artifactType, boolean enforceTypeCheck) { try { if (enforceTypeCheck) { *************** *** 167,171 **** } ! private Class getServiceType(String id, Class artifactType) { try { return getServiceRegistry().getType(id); --- 171,175 ---- } ! protected Class getServiceType(String id, Class artifactType) { try { return getServiceRegistry().getType(id); |
From: Rick E. <spr...@us...> - 2006-04-19 16:25:38
|
Update of /cvsroot/springframework/spring/docs/reference/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26600/docs/reference/src Modified Files: metadata.xml new-in-2.0.xml Log Message: [SPR-1921] Documented the @Required annotation. Index: new-in-2.0.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/new-in-2.0.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** new-in-2.0.xml 19 Apr 2006 14:26:45 -0000 1.3 --- new-in-2.0.xml 19 Apr 2006 16:25:33 -0000 1.4 *************** *** 335,338 **** --- 335,341 ---- <xref linkend="jdbc-SimpleJdbcTemplate" /> </listitem> + <listitem> + <xref linkend="metadata-annotations-required" /> + </listitem> </itemizedlist> </section> Index: metadata.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/metadata.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** metadata.xml 10 Feb 2006 16:49:48 -0000 1.13 --- metadata.xml 19 Apr 2006 16:25:32 -0000 1.14 *************** *** 1,25 **** ! <?xml version="1.0" encoding="UTF-8"?> <chapter id="metadata"> ! <title>Source Level Metadata Support</title> ! ! <sect1 id="metadata-concepts"> ! <title>Source-level metadata</title> ! ! <para>Source-level metadata is the ! addition of <emphasis>attributes</emphasis> or ! <emphasis>annotations</emphasis> to program elements: usually, classes [...1508 lines suppressed...] ! <section> ! <title>Adding support for additional metadata APIs</title> ! <para> ! Should you wish to provide support for another metadata API it is ! easy to do so. ! </para> ! <para> ! Simply implement the ! <classname>org.springframework.metadata.Attributes</classname> interface as a ! facade for your metadata API. You can then include this object in your ! bean definitions as shown above. ! </para> ! <para> ! All framework services that use metadata, such as AOP ! metadata-driven autoproxying, will then automatically be able to use your ! new metadata provider. ! </para> ! </section> </chapter> \ No newline at end of file |
From: Rick E. <spr...@us...> - 2006-04-19 15:41:09
|
Update of /cvsroot/springframework/spring/docs/reference/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22166/docs/reference/src Modified Files: beans.xml Log Message: Reformatted the code blocks in light of the larger font size change. Index: beans.xml =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/src/beans.xml,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** beans.xml 19 Apr 2006 13:38:00 -0000 1.95 --- beans.xml 19 Apr 2006 15:41:04 -0000 1.96 *************** *** 644,651 **** <programlisting><![CDATA[public class SimpleMovieLister { ! ]]><lineannotation>// the <classname>SimpleMovieLister</classname> has a dependency on the <interfacename>MovieFinder</interfacename> <emphasis>interface</emphasis></lineannotation><![CDATA[ private MovieFinder movieFinder; ! ]]><lineannotation>// a setter method so that the Spring container can 'inject' an appropriate <interfacename>MovieFinder</interfacename> <emphasis>implementation</emphasis></lineannotation><![CDATA[ public void setMoveFinder(MovieFinder movieFinder) { this.movieFinder = movieFinder; --- 644,651 ---- <programlisting><![CDATA[public class SimpleMovieLister { ! ]]><lineannotation>// the <classname>SimpleMovieLister</classname> has a dependency on the <interfacename>MovieFinder</interfacename></lineannotation><![CDATA[ private MovieFinder movieFinder; ! ]]><lineannotation>// a setter method so that the Spring container can 'inject' a <interfacename>MovieFinder</interfacename></lineannotation><![CDATA[ public void setMoveFinder(MovieFinder movieFinder) { this.movieFinder = movieFinder; *************** *** 673,680 **** <programlisting><![CDATA[public class SimpleMovieLister { ! ]]><lineannotation>// the <classname>SimpleMovieLister</classname> has a dependency on the <interfacename>MovieFinder</interfacename> <emphasis>interface</emphasis></lineannotation><![CDATA[ private MovieFinder movieFinder; ! ]]><lineannotation>// a constructor so that the Spring container can 'inject' an appropriate <interfacename>MovieFinder</interfacename> <emphasis>implementation</emphasis></lineannotation><![CDATA[ public SimpleMovieLister(MovieFinder movieFinder) { this.movieFinder = movieFinder; --- 673,680 ---- <programlisting><![CDATA[public class SimpleMovieLister { ! ]]><lineannotation>// the <classname>SimpleMovieLister</classname> has a dependency on the <interfacename>MovieFinder</interfacename></lineannotation><![CDATA[ private MovieFinder movieFinder; ! ]]><lineannotation>// a constructor so that the Spring container can 'inject' a <interfacename>MovieFinder</interfacename></lineannotation><![CDATA[ public SimpleMovieLister(MovieFinder movieFinder) { this.movieFinder = movieFinder; *************** *** 883,887 **** private int i; ! public ExampleBean(AnotherBean anotherBean, YetAnotherBean yetAnotherBean, int i) { this.beanOne = anotherBean; this.beanTwo = yetAnotherBean; --- 883,888 ---- private int i; ! public ExampleBean( ! AnotherBean anotherBean, YetAnotherBean yetAnotherBean, int i) { this.beanOne = anotherBean; this.beanTwo = yetAnotherBean; *************** *** 915,921 **** } ! // a static factory method ! // the arguments to this method can be considered the dependencies of the bean that ! // is returned, regardless of how those arguments are actually used. public static ExampleBean createInstance ( AnotherBean anotherBean, YetAnotherBean yetAnotherBean, int i) { --- 916,922 ---- } ! // a static factory method; the arguments to this method can be ! // considered the dependencies of the bean that is returned, ! // regardless of how those arguments are actually used. public static ExampleBean createInstance ( AnotherBean anotherBean, YetAnotherBean yetAnotherBean, int i) { *************** *** 989,994 **** public class ExampleBean { ! private int years; ]]><lineannotation>// No. of years to the calculate the Ultimate Answer</lineannotation><![CDATA[ ! private String ultimateAnswer; ]]><lineannotation>// The Answer to Life, the Universe, and Everything</lineannotation><![CDATA[ public ExampleBean(int years, String ultimateAnswer) { --- 990,998 ---- public class ExampleBean { ! ]]><lineannotation>// No. of years to the calculate the Ultimate Answer</lineannotation><![CDATA[ ! private int years; ! ! ]]><lineannotation>// The Answer to Life, the Universe, and Everything</lineannotation><![CDATA[ ! private String ultimateAnswer; public ExampleBean(int years, String ultimateAnswer) { *************** *** 1041,1061 **** <section id="beans-value-element"> <title>The <literal>value</literal> element</title> ! <para>The <literal>value</literal> element specifies a property or ! constructor argument as a human-readable string representation. As ! mentioned in detail <link linkend="beans-factory-collaborators-propertyeditor">previously</link>, ! JavaBeans PropertyEditors are used to convert these string values from ! a <literal>java.lang.String</literal> to the actual property or ! argument type.<programlisting><bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> ! <!-- results in a setDriverClassName(String) call --> ! <property name="driverClassName"> ! <value>com.mysql.jdbc.Driver</value> ! </property> ! <property name="url"> ! <value>jdbc:mysql://localhost:3306/mydb</value> ! </property> ! <property name="username"> ! <value>root</value> ! </property> ! </bean></programlisting></para> </section> <section id="beans-null-element"> --- 1045,1069 ---- <section id="beans-value-element"> <title>The <literal>value</literal> element</title> ! <para> ! The <literal>value</literal> element specifies a property or ! constructor argument as a human-readable string representation. As ! mentioned in detail <link linkend="beans-factory-collaborators-propertyeditor">previously</link>, ! JavaBeans PropertyEditors are used to convert these string values from ! a <literal>java.lang.String</literal> to the actual property or ! argument type. ! </para> ! <programlisting><![CDATA[<bean id="myDataSource" destroy-method="close" ! class="org.apache.commons.dbcp.BasicDataSource"> ! <!-- results in a setDriverClassName(String) call --> ! <property name="driverClassName"> ! <value>com.mysql.jdbc.Driver</value> ! </property> ! <property name="url"> ! <value>jdbc:mysql://localhost:3306/mydb</value> ! </property> ! <property name="username"> ! <value>root</value> ! </property> ! </bean>]]></programlisting> </section> <section id="beans-null-element"> *************** *** 1275,1279 **** </para> <programlisting><![CDATA[<property name="targetName"> ! ]]><lineannotation><!-- a bean with an id of 'target' must exist, else an XML parse exception will be thrown --></lineannotation><![CDATA[ <idref local="theTargetBean"/> </property>]]></programlisting> --- 1283,1289 ---- </para> <programlisting><![CDATA[<property name="targetName"> ! ]]><lineannotation><!-- ! a bean with an id of 'target' must exist, else an XML exception will be thrown ! --></lineannotation><![CDATA[ <idref local="theTargetBean"/> </property>]]></programlisting> *************** *** 1818,1872 **** <section id="beans-factory-dependencies"> <title>Checking for dependencies</title> ! <para>Spring has the ability to try to check for the existence of ! unresolved dependencies of a bean deployed into the BeanFactory. These ! are JavaBeans properties of the bean, which do not have actual values ! set for them in the bean definition, or alternately provided ! automatically by the autowiring feature.</para> ! <para>This feature is sometimes useful when you want to ensure that all ! properties (or all properties of a certain type) are set on a bean. Of ! course, in many cases a bean class will have default values for many ! properties, or some properties do not apply to all usage scenarios, so ! this feature is of limited use. Dependency checking can also be enabled ! and disabled per bean, just as with the autowiring functionality. The ! default is to <emphasis>not</emphasis> check dependencies. Dependency ! checking can be handled in several different modes. In an ! XmlBeanFactory, this is specified via the ! <literal>dependency-check</literal> attribute in a bean definition, ! which may have the following values.<table frame="all"> ! <title>Dependency checking modes</title> ! <tgroup cols="2"> ! <colspec colname="c1" colwidth="1*" /> ! <colspec colname="c2" colwidth="5*" /> ! <thead> ! <row> ! <entry>Mode</entry> ! <entry>Explanation</entry> ! </row> ! </thead> ! <tbody> ! <row> ! <entry>none</entry> ! <entry>No dependency checking. Properties of the bean which ! have no value specified for them are simply not set.</entry> ! </row> ! <row> ! <entry>simple</entry> ! <entry>Dependency checking is performed for primitive types ! and collections (everything except collaborators, i.e. other ! beans)</entry> ! </row> ! <row> ! <entry>object</entry> ! <entry>Dependency checking is performed for ! collaborators</entry> ! </row> ! <row> ! <entry>all</entry> ! <entry>Dependency checking is done for collaborators, ! primitive types and collections</entry> ! </row> ! </tbody> ! </tgroup> ! </table></para> </section> </section> --- 1828,1892 ---- <section id="beans-factory-dependencies"> <title>Checking for dependencies</title> ! <para> ! Spring has the ability to try to check for the existence of ! unresolved dependencies of a bean deployed into the BeanFactory. These ! are JavaBeans properties of the bean, which do not have actual values ! set for them in the bean definition, or alternately provided ! automatically by the autowiring feature. ! </para> ! <para> ! This feature is sometimes useful when you want to ensure that all ! properties (or all properties of a certain type) are set on a bean. Of ! course, in many cases a bean class will have default values for many ! properties, or some properties do not apply to all usage scenarios, so ! this feature is of limited use. Dependency checking can also be enabled ! and disabled per bean, just as with the autowiring functionality. The ! default is to <emphasis>not</emphasis> check dependencies. Dependency ! checking can be handled in several different modes. In an ! <classname>XmlBeanFactory</classname>, this is specified via the ! <literal>dependency-check</literal> attribute in a bean definition, ! which may have the following values. ! </para> ! <table frame="all"> ! <title>Dependency checking modes</title> ! <tgroup cols="2"> ! <colspec colname="c1" colwidth="1*" /> ! <colspec colname="c2" colwidth="5*" /> ! <thead> ! <row> ! <entry>Mode</entry> ! <entry>Explanation</entry> ! </row> ! </thead> ! <tbody> ! <row> ! <entry>none</entry> ! <entry>No dependency checking. Properties of the bean which ! have no value specified for them are simply not set.</entry> ! </row> ! <row> ! <entry>simple</entry> ! <entry>Dependency checking is performed for primitive types ! and collections (everything except collaborators, i.e. other ! beans)</entry> ! </row> ! <row> ! <entry>object</entry> ! <entry>Dependency checking is performed for ! collaborators</entry> ! </row> ! <row> ! <entry>all</entry> ! <entry>Dependency checking is done for collaborators, ! primitive types and collections</entry> ! </row> ! </tbody> ! </tgroup> ! </table> ! <para> ! If you are using Java5 (and thus have access to source level annotations), ! you may find the section entitled <xref linkend="metadata-annotations-required"/> ! (in the chapter entitled <xref linkend="metadata"/>) to be of interest. ! </para> </section> </section> *************** *** 2147,2151 **** <bean id="newsFeedManager" class="x.y.NewsFeedManager"> <property name="factory"> ! <bean class="org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean"> <property name="targetBeanName"> <idref local="newsFeed" /> --- 2167,2172 ---- <bean id="newsFeedManager" class="x.y.NewsFeedManager"> <property name="factory"> ! <bean ! class="org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean"> <property name="targetBeanName"> <idref local="newsFeed" /> *************** *** 2172,2176 **** public static void main(String[] args) throws Exception { ! <interfacename>ApplicationContext</interfacename> ctx = new ClassPathXmlApplicationContext("beans.xml"); NewsFeedManager manager = (NewsFeedManager) ctx.getBean("newsFeedManager"); manager.printNews(); --- 2193,2197 ---- public static void main(String[] args) throws Exception { ! ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); NewsFeedManager manager = (NewsFeedManager) ctx.getBean("newsFeedManager"); manager.printNews(); *************** *** 2259,2263 **** </bean> ! <bean id="inheritsWithDifferentClass" class="org.springframework.beans.DerivedTestBean" parent="inheritedTestBean" init-method="initialize"> <property name="name" value="override"/> --- 2280,2285 ---- </bean> ! <bean id="inheritsWithDifferentClass" ! class="org.springframework.beans.DerivedTestBean" parent="inheritedTestBean" init-method="initialize"> <property name="name" value="override"/> *************** *** 2461,2465 **** we will apply a <interfacename>PropertyPlaceholderConfigurer</interfacename> to the <interfacename>BeanFactory</interfacename> which will replace some properties of the datasource:</para> ! <programlisting><![CDATA[<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}"/> <property name="url" value="${jdbc.url}"/> --- 2483,2488 ---- we will apply a <interfacename>PropertyPlaceholderConfigurer</interfacename> to the <interfacename>BeanFactory</interfacename> which will replace some properties of the datasource:</para> ! <programlisting><![CDATA[<bean id="dataSource" destroy-method="close" ! class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="${jdbc.driverClassName}"/> <property name="url" value="${jdbc.url}"/> *************** *** 2785,2789 **** specify the locale that we want to resolve our (British) messages against.</para> <programlisting><![CDATA[# in 'exceptions_en_GB.properties' ! argument.required=Ebagum lad, the '{0}' argument is required, I say, I say, required.]]></programlisting> <programlisting><![CDATA[public static void main(final String[] args) { MessageSource resources = new ClassPathXmlApplicationContext("beans.xml"); --- 2808,2812 ---- specify the locale that we want to resolve our (British) messages against.</para> <programlisting><![CDATA[# in 'exceptions_en_GB.properties' ! argument.required=Ebagum lad, the '{0}' argument is required, I say, required.]]></programlisting> <programlisting><![CDATA[public static void main(final String[] args) { MessageSource resources = new ClassPathXmlApplicationContext("beans.xml"); *************** *** 2793,2797 **** }]]></programlisting> <para>The resulting output from the runnning of the above program will be...</para> ! <programlisting><![CDATA[Ebagum lad, the 'userDao' argument is required, I say, I say, required.]]></programlisting> <para>The <classname>MessageSourceAware</classname> interface can also be used to acquire a reference to any <classname>MessageSource</classname> that has been defined. Any bean --- 2816,2820 ---- }]]></programlisting> <para>The resulting output from the runnning of the above program will be...</para> ! <programlisting><![CDATA[Ebagum lad, the 'userDao' argument is required, I say, required.]]></programlisting> <para>The <classname>MessageSourceAware</classname> interface can also be used to acquire a reference to any <classname>MessageSource</classname> that has been defined. Any bean *************** *** 3159,3165 **** // will result in 11, which is the value of property 'spouse.age' of bean 'person' ! <bean id="theAge" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> ! <property name="targetBeanName"><value>person</value></property> ! <property name="propertyPath"><value>spouse.age</value></property> </bean>]]></programlisting> <para> --- 3182,3189 ---- // will result in 11, which is the value of property 'spouse.age' of bean 'person' ! <bean id="theAge" ! class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> ! <property name="targetBeanName" value="person"/> ! <property name="propertyPath" value="spouse.age"/> </bean>]]></programlisting> <para> *************** *** 3167,3174 **** </para> <programlisting><![CDATA[// will result in 12, which is the value of property 'age' of the inner bean ! <bean id="theAge" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> <property name="targetObject"> <bean class="org.springframework.beans.TestBean"> ! <property name="age"><value>12</value></property> </bean> </property> --- 3191,3199 ---- </para> <programlisting><![CDATA[// will result in 12, which is the value of property 'age' of the inner bean ! <bean id="theAge" ! class="org.springframework.beans.factory.config.PropertyPathFactoryBean"> <property name="targetObject"> <bean class="org.springframework.beans.TestBean"> ! <property name="age" value="12"/> </bean> </property> *************** *** 3179,3183 **** </para> <programlisting><![CDATA[// will result in 10, which is the value of property 'age' of bean 'person' ! <bean id="person.age" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>]]></programlisting> <para> This form does mean that there is no choice in the name of the bean, --- 3204,3209 ---- </para> <programlisting><![CDATA[// will result in 10, which is the value of property 'age' of bean 'person' ! <bean id="person.age" ! class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>]]></programlisting> <para> This form does mean that there is no choice in the name of the bean, *************** *** 3188,3192 **** <programlisting><![CDATA[<bean id="..." class="..."> <property name="age"> ! <bean id="person.age" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/> </property> </bean>]]></programlisting> --- 3214,3219 ---- <programlisting><![CDATA[<bean id="..." class="..."> <property name="age"> ! <bean id="person.age" ! class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/> </property> </bean>]]></programlisting> *************** *** 3223,3227 **** </para> <programlisting><![CDATA[<bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE" ! class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>]]></programlisting> <para> This does mean that there is no longer any choice in what the bean id is (so --- 3250,3254 ---- </para> <programlisting><![CDATA[<bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE" ! class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>]]></programlisting> <para> This does mean that there is no longer any choice in what the bean id is (so *************** *** 3234,3238 **** <property name="isolation"> <bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE" ! class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean" /> </property> </bean>]]></programlisting> --- 3261,3265 ---- <property name="isolation"> <bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE" ! class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean" /> </property> </bean>]]></programlisting> *************** *** 3303,3316 **** initialization: </para> ! <programlisting><![CDATA[<bean id="force-init" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> ! <property name="staticMethod"><value>com.example.MyClass.initialize</value></property> ! </bean> ! <bean id="bean1" class="..." depends-on="force-init"> ... ! </bean>]]></programlisting> <para> ! Note that the definition for ! <literal>bean1</literal> has used the <literal>depends-on</literal> attribute to refer to the <literal>force-init</literal> bean, which will trigger initializing <literal>force-init</literal> first, and thus calling --- 3330,3344 ---- initialization: </para> ! <programlisting><![CDATA[<bean id="force-init" ! class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> ! <property name="staticMethod" value="com.example.MyClass.initialize"/> ! </bean> ! <bean id="bean1" class="..." depends-on="force-init"> ... ! </bean>]]></programlisting> <para> ! Note that the definition for the <literal>bean1</literal> bean ! has used the <literal>depends-on</literal> attribute to refer to the <literal>force-init</literal> bean, which will trigger initializing <literal>force-init</literal> first, and thus calling *************** *** 3322,3327 **** a <literal>static</literal> factory method: </para> ! <programlisting><![CDATA[<bean id="myClass" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> ! <property name="staticMethod"><value>com.whatever.MyClassFactory.getInstance</value></property> </bean>]]></programlisting> <para> --- 3350,3357 ---- a <literal>static</literal> factory method: </para> ! <programlisting><![CDATA[<bean id="myClass" ! class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> ! <property name="staticMethod" ! value="com.whatever.MyClassFactory.getInstance"/> </bean>]]></programlisting> <para> *************** *** 3330,3339 **** verbose, but it works.) </para> ! <programlisting><![CDATA[<bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass"><value>java.lang.System</value></property> <property name="targetMethod"><value>getProperties</value></property> </bean> ! <bean id="javaVersion" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetObject"><ref local="sysProps"/></property> <property name="targetMethod"><value>getProperty</value></property> --- 3360,3371 ---- verbose, but it works.) </para> ! <programlisting><![CDATA[<bean id="sysProps" ! class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass"><value>java.lang.System</value></property> <property name="targetMethod"><value>getProperties</value></property> </bean> ! <bean id="javaVersion" ! class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetObject"><ref local="sysProps"/></property> <property name="targetMethod"><value>getProperty</value></property> *************** *** 3454,3458 **** <listener> ! <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> --- 3486,3492 ---- <listener> ! <listener-class> ! org.springframework.web.context.ContextLoaderListener ! </listener-class> </listener> *************** *** 3460,3464 **** <servlet> <servlet-name>context</servlet-name> ! <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> --- 3494,3500 ---- <servlet> <servlet-name>context</servlet-name> ! <servlet-class> ! org.springframework.web.context.ContextLoaderServlet ! </servlet-class> <load-on-startup>1</load-on-startup> </servlet> |
From: Ben H. <ne...@us...> - 2006-04-19 15:12:24
|
Update of /cvsroot/springframework/spring/docs/reference/styles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31082/docs/reference/styles Modified Files: html.css Log Message: Bumped the <TT> size to 110% Index: html.css =================================================================== RCS file: /cvsroot/springframework/spring/docs/reference/styles/html.css,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** html.css 19 Apr 2006 14:28:30 -0000 1.13 --- html.css 19 Apr 2006 15:12:10 -0000 1.14 *************** *** 192,196 **** TT { ! font-size: 90%; font-family: "Courier New", Courier, monospace; color: #000000; --- 192,196 ---- TT { ! font-size: 110%; font-family: "Courier New", Courier, monospace; color: #000000; |