|
Spring Framework example source code file (jruby-with-xsd.xml)
The Spring Framework jruby-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/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd"> <lang:jruby id="messenger" script-source="classpath:org/springframework/scripting/jruby/Messenger.rb" script-interfaces="org.springframework.scripting.Messenger"> <lang:property name="message" value="Hello World!"/> </lang:jruby> <lang:jruby id="messengerPrototype" script-source="classpath:org/springframework/scripting/jruby/Messenger.rb" script-interfaces="org.springframework.scripting.ConfigurableMessenger" scope="prototype"> <lang:property name="message" value="Hello World!"/> </lang:jruby> <lang:jruby id="messengerByType" script-source="classpath:org/springframework/scripting/jruby/Messenger.rb" script-interfaces="org.springframework.scripting.TestBeanAwareMessenger" scope="prototype" autowire="byType" dependency-check="objects"> </lang:jruby> <lang:jruby id="messengerByName" script-source="classpath:org/springframework/scripting/jruby/Messenger.rb" script-interfaces="org.springframework.scripting.TestBeanAwareMessenger" scope="prototype" autowire="byName"> </lang:jruby> <bean id="testBean" class="org.springframework.beans.TestBean"/> <lang:jruby id="calculator" script-interfaces="org.springframework.scripting.Calculator"> <lang:inline-script> require 'java' class RubyCalculator include org.springframework.scripting.Calculator def add(x, y) x + y end end </lang:inline-script> </lang:jruby> <lang:jruby id="refreshableMessenger" script-source="classpath:org/springframework/scripting/jruby/Messenger.rb" script-interfaces="org.springframework.scripting.Messenger" refresh-check-delay="5000"> <lang:property name="message" value="Hello World!"/> </lang:jruby> <!-- just checking that multiple script interfaces are supported --> <lang:jruby id="calculatingMessenger" script-interfaces="org.springframework.scripting.Calculator, org.springframework.scripting.Messenger"> <lang:inline-script> <lang:property name="message" value="Hello World!"/> </lang:jruby> </beans> Other Spring Framework examples (source code examples)Here is a short list of links related to this Spring Framework jruby-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.