This is an automated email from the ASF dual-hosted git repository.

buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit fa49de63402275f87d22bd0251c46f4a299d0b4f
Author: Alexey Markevich <[email protected]>
AuthorDate: Wed Feb 5 12:09:47 2020 +0300

    cxf-systests-transports: remove deprecated PropertyPlaceholderConfigurer
---
 .../apache/cxf/systest/http_jetty/EngineLifecycleTest.java    | 11 ++---------
 .../org/apache/cxf/systest/http_jetty/jetty-engine.xml        | 10 ++++++----
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git 
a/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
 
b/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
index d311498..4c83555 100644
--- 
a/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
+++ 
b/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
@@ -25,7 +25,6 @@ import java.net.InetAddress;
 import java.net.Socket;
 import java.net.URL;
 import java.net.UnknownHostException;
-import java.util.Properties;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.ServerImpl;
@@ -36,7 +35,6 @@ import 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination;
 import org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine;
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.webapp.WebAppContext;
-import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
 import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.support.GenericApplicationContext;
 import org.springframework.core.io.ClassPathResource;
@@ -104,6 +102,8 @@ public class EngineLifecycleTest {
 
         applicationContext = new GenericApplicationContext();
 
+        System.setProperty("jetty.staticResourceURL", 
getClass().getPackage().getName().replace('.', '/'));
+
         XmlBeanDefinitionReader reader = new 
XmlBeanDefinitionReader(applicationContext);
         reader.loadBeanDefinitions(
                 new ClassPathResource("META-INF/cxf/cxf.xml"),
@@ -111,13 +111,6 @@ public class EngineLifecycleTest {
                 new ClassPathResource("jetty-engine.xml", getClass()),
                 new ClassPathResource("server-lifecycle-beans.xml", 
getClass()));
 
-        // bring in some property values from a Properties file
-        PropertyPlaceholderConfigurer cfg = new 
PropertyPlaceholderConfigurer();
-        Properties properties = new Properties();
-        properties.setProperty("staticResourceURL", 
getClass().getPackage().getName().replace('.', '/'));
-        cfg.setProperties(properties);
-        // now actually do the replacement
-        cfg.postProcessBeanFactory(applicationContext.getBeanFactory());
         applicationContext.refresh();
     }
 
diff --git 
a/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml
 
b/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml
index cc14f71..aba913f 100644
--- 
a/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml
+++ 
b/systests/transports/src/test/resources/org/apache/cxf/systest/http_jetty/jetty-engine.xml
@@ -19,11 +19,13 @@
 -->
 <beans xmlns="http://www.springframework.org/schema/beans";
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-    xmlns:sec="http://cxf.apache.org/configuration/security";
     xmlns:http="http://cxf.apache.org/transports/http/configuration";
     xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration";
-    xsi:schemaLocation="http://cxf.apache.org/configuration/security 
http://cxf.apache.org/schemas/configuration/security.xsd 
http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd 
http://cxf.apache.org/transports/http-jetty/configuration 
http://cxf.apache.org/schemas/configuration/http-jetty.xsd 
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd";>
-    <bean 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    xsi:schemaLocation="
+        http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd
+        http://cxf.apache.org/transports/http-jetty/configuration 
http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+    ">
     <httpj:engine-factory bus="cxf">
         <httpj:engine port="${testutil.ports.EngineLifecycleTest.2}">
             <httpj:handlers>
@@ -37,7 +39,7 @@
                         <bean 
class="org.eclipse.jetty.server.handler.ResourceHandler">
                             <property name="baseResource">
                                 <bean 
class="org.eclipse.jetty.util.resource.Resource" 
factory-method="newClassPathResource">
-                                    <constructor-arg 
value="${staticResourceURL}"/>
+                                    <constructor-arg 
value="${jetty.staticResourceURL}"/>
                                 </bean>
                             </property>
                         </bean>

Reply via email to