Skip to content

Commit

Permalink
Fix spring4 porting for geofence community modules
Browse files Browse the repository at this point in the history
  • Loading branch information
etj committed Mar 30, 2016
1 parent 55c819c commit 9473b58
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2015 - Open Source Geospatial Foundation. All rights reserved.
Copyright (C) 2015 - 2016 Open Source Geospatial Foundation. All rights reserved.
This code is licensed under the GPL 2.0 license, available at the root
application directory.
-->
Expand Down Expand Up @@ -149,14 +149,8 @@
<bean class="org.geoserver.geofence.rest.GeofenceSecurityInterceptor"/>
</mvc:interceptors>

<bean id="geofenceViewResolver" class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="order" value="1" />
<property name="mediaTypes">
<map>
<entry key="xml" value="application/xml" />
<entry key="json" value="application/json" />
</map>
</property>
<bean id="geofenceViewResolver" class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="order" value="1" />
<property name="defaultViews">
<list>
<!-- XML view using a JAXB marshaller -->
Expand Down Expand Up @@ -185,4 +179,4 @@

<mvc:annotation-driven />

</beans>
</beans>
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/* (c) 2015 Open Source Geospatial Foundation - all rights reserved
/* (c) 2015 - 2016 Open Source Geospatial Foundation - all rights reserved
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.geofence.rest;

import org.geoserver.geofence.GeofenceBaseTest;
import org.geoserver.geofence.core.dao.DuplicateKeyException;
import org.geoserver.geofence.core.model.Rule;
import org.geoserver.geofence.rest.xml.JaxbRule;
import org.geoserver.geofence.services.RuleAdminService;
import org.geoserver.geofence.services.exception.NotFoundServiceEx;
import org.junit.Test;
import org.springframework.dao.DuplicateKeyException;

public class RulesRestControllerTest extends GeofenceBaseTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
/*
* Copyright (C) 2007 - 2012 GeoSolutions S.A.S.
* http://www.geo-solutions.it
*
* GPLv3 + Classpath exception
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
/* (C) 2015 - 2016 Open Source Geospatial Foundation. All rights reserved.
* (C) 2007 - 2014 GeoSolutions S.A.S.
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.geofence;

Expand Down Expand Up @@ -50,6 +36,8 @@ protected void setUpInternal() throws Exception {

configurer = (GeoFencePropertyPlaceholderConfigurer) applicationContext.getBean("geofence-configurer");
configurer.setLocation(new UrlResource(this.getClass().getResource("/test-cache-config.properties")));

realReader = applicationContext.getBean("remoteReaderService", RuleReaderService.class);
}

static class CustomTicker extends Ticker {
Expand Down Expand Up @@ -265,4 +253,4 @@ public void testExpire() throws InterruptedException {
// assertEquals("cacheSize=100cacheRefresh=500cacheExpire=1000", content);
// }

}
}

0 comments on commit 9473b58

Please sign in to comment.