|
Spring Framework example source code file (overrides.xml)
The Spring Framework overrides.xml source code<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="overrideOneMethod" class="org.springframework.beans.factory.xml.OverrideOneMethod"> <lookup-method name="getPrototypeDependency" bean="jenny"/> <lookup-method name="protectedOverrideSingleton" bean="david"/> </bean> <!-- Test that overrides work on an inherited method --> <bean id="overrideInheritedMethod" class="org.springframework.beans.factory.xml.OverrideOneMethodSubclass"> <lookup-method name="getPrototypeDependency" bean="jenny"/> <lookup-method name="protectedOverrideSingleton" bean="david"/> </bean> <!-- We can use this to test the construction cost of beans with method overrides --> <bean id="overrideOnPrototype" singleton="false" class="org.springframework.beans.factory.xml.OverrideOneMethod"> <lookup-method name="getPrototypeDependency" bean="jenny"/> <lookup-method name="protectedOverrideSingleton" bean="david"/> </bean> <!-- Effect of overrides is swapped --> <bean id="overrideOneMethodSwappedReturnValues" class="org.springframework.beans.factory.xml.OverrideOneMethod"> <lookup-method name="getPrototypeDependency" bean="david"/> <lookup-method name="protectedOverrideSingleton" bean="jenny"/> </bean> <bean id="jenny" class="org.springframework.beans.TestBean" singleton="false"> <property name="name"> Other Spring Framework examples (source code examples)Here is a short list of links related to this Spring Framework overrides.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.