|
Spring Framework example source code file (bsh-with-xsd.xml)
The Spring Framework bsh-with-xsd.xml source code
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd">
<lang:bsh id="messenger" script-source="classpath:org/springframework/scripting/bsh/Messenger.bsh"
script-interfaces="org.springframework.scripting.Messenger"
init-method="init" destroy-method="destroy">
<lang:property name="message" value="Hello World!"/>
</lang:bsh>
<lang:bsh id="messengerPrototype" script-source="classpath:org/springframework/scripting/bsh/Messenger.bsh"
script-interfaces="org.springframework.scripting.ConfigurableMessenger"
scope="prototype" init-method="init" destroy-method="destroy">
<lang:property name="message" value="Hello World!"/>
</lang:bsh>
<lang:bsh id="messengerImpl" script-source="classpath:org/springframework/scripting/bsh/MessengerImpl.bsh"
init-method="init" destroy-method="destroy">
<lang:property name="message" value="Hello World!"/>
</lang:bsh>
<lang:bsh id="messengerInstance" script-source="classpath:org/springframework/scripting/bsh/MessengerInstance.bsh"
init-method="init" destroy-method="destroy">
<lang:property name="message" value="Hello World!"/>
</lang:bsh>
<lang:bsh id="messengerByType" script-source="classpath:org/springframework/scripting/bsh/MessengerImpl.bsh"
autowire="byType" dependency-check="objects" init-method="init" destroy-method="destroy">
</lang:bsh>
<lang:bsh id="messengerByName" script-source="classpath:org/springframework/scripting/bsh/MessengerImpl.bsh"
autowire="byName" init-method="init" destroy-method="destroy">
</lang:bsh>
<bean id="testBean" class="org.springframework.beans.TestBean"/>
<lang:bsh id="calculator" script-interfaces="org.springframework.scripting.Calculator">
<lang:inline-script>
int add(int x, int y) {
return x + y;
}
</lang:inline-script>
</lang:bsh>
<lang:bsh id="refreshableMessenger" script-interfaces="org.springframework.scripting.Messenger"
script-source="classpath:org/springframework/scripting/bsh/Messenger.bsh" refresh-check-delay="5000"
init-method="init" destroy-method="destroy">
<lang:property name="message" value="Hello World!"/>
</lang:bsh>
</beans>
Other Spring Framework examples (source code examples)Here is a short list of links related to this Spring Framework bsh-with-xsd.xml source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.