Cela fonctionne:Le printemps évitant les haricots: les haricots et les haricots d'écriture à la place?
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd">
<beans:bean id="test2" name="name" class="org.chicago.home.Test2"> </beans:bean>
<beans:bean id="test1" class="org.chicago.home.Test1">
<beans:constructor-arg ref="test2"/>
</beans:bean>
</beans:beans>
Ce n'est pas. Mais, je trouve mieux ce type de configuration. Que dois-je faire à l'espace de noms pour faire fonctionner cette configuration ci-dessous?
De même, puis-je passer idref dans le constructeur-arg? Cela ne semble pas fonctionner pour moi. Ni idref bean = "" ni idref local = "" dans le constructeur-arg travaille.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd">
< I am pressing Ctrl + Space here, but it says beans doesn't have any child tags.
</beans>