Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-09-09 08:00:05 +0000
committerGreg Wilkins2013-09-09 08:01:03 +0000
commit8c0f6328a199183d1c6991575984b21b898173e7 (patch)
treeae61601fa9685fee289e0f1e356e6051a0437775 /jetty-spring/src
parent5d21e4246b69c026c740c6c5cb04ab92c0cf8be1 (diff)
downloadorg.eclipse.jetty.project-8c0f6328a199183d1c6991575984b21b898173e7.tar.gz
org.eclipse.jetty.project-8c0f6328a199183d1c6991575984b21b898173e7.tar.xz
org.eclipse.jetty.project-8c0f6328a199183d1c6991575984b21b898173e7.zip
415401 Add initalizeDefaults call to SpringConfigurationProcessor
remove deprecated XmlBeansFactory usage
Diffstat (limited to 'jetty-spring/src')
-rw-r--r--jetty-spring/src/main/java/org/eclipse/jetty/spring/SpringConfigurationProcessor.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/jetty-spring/src/main/java/org/eclipse/jetty/spring/SpringConfigurationProcessor.java b/jetty-spring/src/main/java/org/eclipse/jetty/spring/SpringConfigurationProcessor.java
index 89108bc73d..f226e6725e 100644
--- a/jetty-spring/src/main/java/org/eclipse/jetty/spring/SpringConfigurationProcessor.java
+++ b/jetty-spring/src/main/java/org/eclipse/jetty/spring/SpringConfigurationProcessor.java
@@ -33,6 +33,8 @@ import org.eclipse.jetty.xml.XmlParser;
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.PropertyValues;
import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;
@@ -63,9 +65,10 @@ public class SpringConfigurationProcessor implements ConfigurationProcessor
private static final Logger LOG = Log.getLogger(SpringConfigurationProcessor.class);
private XmlConfiguration _configuration;
- private XmlBeanFactory _beanFactory;
+ private DefaultListableBeanFactory _beanFactory;
private String _main;
+ @Override
public void init(URL url, XmlParser.Node config, XmlConfiguration configuration)
{
try
@@ -79,7 +82,8 @@ public class SpringConfigurationProcessor implements ConfigurationProcessor
"<!DOCTYPE beans PUBLIC \"-//SPRING//DTD BEAN//EN\" \"http://www.springframework.org/dtd/spring-beans.dtd\">" +
config).getBytes("UTF-8"));
- _beanFactory = new XmlBeanFactory(resource){
+ _beanFactory = new DefaultListableBeanFactory()
+ {
@Override
protected void applyPropertyValues(String beanName, BeanDefinition mbd, BeanWrapper bw, PropertyValues pvs)
{
@@ -87,6 +91,8 @@ public class SpringConfigurationProcessor implements ConfigurationProcessor
super.applyPropertyValues(beanName, mbd, bw, pvs);
}
};
+
+ new XmlBeanDefinitionReader(_beanFactory).loadBeanDefinitions(resource);
}
catch (Exception e)
{
@@ -94,6 +100,7 @@ public class SpringConfigurationProcessor implements ConfigurationProcessor
}
}
+ @Override
public Object configure(Object obj) throws Exception
{
doConfigure();
@@ -105,6 +112,7 @@ public class SpringConfigurationProcessor implements ConfigurationProcessor
*
* @see org.eclipse.jetty.xml.ConfigurationProcessor#configure()
*/
+ @Override
public Object configure() throws Exception
{
doConfigure();

Back to the top