From a8b1176ffaa8a1b8ee63edf5d3191eec058b4464 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 27 Nov 2009 14:54:30 +0000 Subject: [PATCH] * added complete XML header to sample usage of namespace * fixes #164 git-svn-id: svn+ssh://svn.synyx.de/var/svn/synyx/opensource/hera/trunk@8084 5a64d73e-33d6-4ccc-9058-23f8668ecac9 --- core/src/doc/core.xml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/core/src/doc/core.xml b/core/src/doc/core.xml index f54754f..93841a6 100644 --- a/core/src/doc/core.xml +++ b/core/src/doc/core.xml @@ -141,13 +141,20 @@ public class HostImpl implements Host { Host configuration using the plugin namespace - <import resource="classpath*:com/acme/**/plugins.xml" /> + <beans xmlns="http://www.springframework.org/schema/beans" + xmlns:plugin="http://schemas.synyx.org/hera" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://schemas.synyx.org/hera http://schemas.synyx.org/hera/hera.xsd"> -<bean id="host" class="com.acme.HostImpl"> - <property name="plugins" ref="plugins" /> -</bean> + <import resource="classpath*:com/acme/**/plugins.xml" /> -<plugin:list id="plugins" class="org.acme.MyPluginInterface" /> + <bean id="host" class="com.acme.HostImpl"> + <property name="plugins" ref="plugins" /> + </bean> + + <plugin:list id="plugins" class="org.acme.MyPluginInterface" /> +</beans> Suggested you have added the namespace XSD into Eclipse and @@ -158,10 +165,6 @@ public class HostImpl implements Host { Using inner beans - - This feature is only available for version 0.3 and above! - - The listing above features an indirection for the plugin bean definition. Defining the plugin list as top level bean can have advantages: you easily could place all plugin lists