Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gwc - cleaning up late comments on PR529 #539

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.google.gson.JsonParser;

import org.geoserver.catalog.GeoServerCatalogTestData;
import org.geoserver.gwc.controller.GwcUrlHandlerMapping;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -81,16 +80,6 @@ void testRESTPathExtensionContentNegotiation() {
testGetRequestContentType("/gwc/rest/layers.xml", APPLICATION_XML);
}

@Test
void testGwcUrlHandlerMappingArePresentInTheClasspath() {
assertThat(context.isTypeMatch("gwcDemoUrlHandlerMapping", GwcUrlHandlerMapping.class))
.as("expected a bean gwcDemoUrlHandlerMapping of type GwcUrlHandlerMapping")
.isTrue();
assertThat(context.isTypeMatch("gwcRestWebUrlHandlerMapping", GwcUrlHandlerMapping.class))
.as("expected a bean gwcRestWebUrlHandlerMapping of type GwcUrlHandlerMapping")
.isTrue();
}

@Test
void testGeneralGwcHome() {
ResponseEntity<String> response = testGetRequestContentType("/gwc/home", TEXT_HTML);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
import org.geoserver.cloud.autoconfigure.gwc.ConditionalOnWebUIEnabled;
import org.geoserver.cloud.gwc.config.core.GeoWebCacheConfigurationProperties;
import org.geoserver.cloud.virtualservice.VirtualServiceVerifier;
import org.geoserver.gwc.controller.GwcUrlHandlerMapping;
import org.geoserver.ows.Dispatcher;
import org.geowebcache.GeoWebCacheDispatcher;
import org.geowebcache.rest.controller.ByteStreamController;
import org.gwc.web.rest.GeoWebCacheController;
Expand All @@ -33,10 +31,8 @@ public class GeoWebCacheUIAutoConfiguration {

@Bean
GeoWebCacheController gwcController(
Dispatcher geoserverDispatcher,
GeoWebCacheDispatcher geoWebCacheDispatcher,
VirtualServiceVerifier verifier) {
return new GeoWebCacheController(geoserverDispatcher, geoWebCacheDispatcher, verifier);
GeoWebCacheDispatcher geoWebCacheDispatcher, VirtualServiceVerifier verifier) {
return new GeoWebCacheController(geoWebCacheDispatcher, verifier);
}

/** ConditionalOnGeoWebCacheRestConfigEnabled} is disabled */
Expand All @@ -50,61 +46,4 @@ ByteStreamController byteStreamController() {
VirtualServiceVerifier virtualServiceVerifier(@Qualifier("rawCatalog") Catalog catalog) {
return new VirtualServiceVerifier(catalog);
}

/**
* GS's src/web/gwc/src/main/java/applicationContext.xml
* <!-- Used for workspace-based demo requests so the requests to GS stay workspace-based -->
* <bean id="gwcDemoUrlHandlerMapping"
* class="org.geoserver.gwc.controller.GwcUrlHandlerMapping"> <constructor-arg ref="catalog" />
* <constructor-arg value="/gwc/demo"/> <property name="alwaysUseFullPath" value="true" />
* <property name="order" value="10" /> </bean>
* <!-- Used for workspace-based web requests (i.e. for rest/web/openlayer/ol.js) -->
* <bean id="gwcRestWebUrlHandlerMapping"
* class="org.geoserver.gwc.controller.GwcUrlHandlerMapping"> <constructor-arg ref="catalog" />
* <constructor-arg type="java.lang.String" value="/gwc/rest/web"/> <property
* name="alwaysUseFullPath" value="true" /> <property name="order" value="10" /> </bean>
*/
@Bean
@Qualifier("gwcDemoUrlHandlerMapping")
GwcUrlHandlerMapping gwcDemoUrlHandlerMapping(@Qualifier("rawCatalog") Catalog catalog) {
GwcUrlHandlerMapping handler = new GwcUrlHandlerMapping(catalog, "/gwc/demo");
handler.setAlwaysUseFullPath(true);
handler.setOrder(10);

return handler;
}

/*
@Bean
WebMvcRegistrations gwcDemoUrlHandlerMappingRegistrations(
@Qualifier("gwcDemoUrlHandlerMapping") GwcUrlHandlerMapping handler) {
return new WebMvcRegistrations() {
@Override
public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
return handler;
}
};
}*/

@Bean
@Qualifier("gwcRestWebUrlHandlerMapping")
GwcUrlHandlerMapping gwcRestWebUrlHandlerMapping(@Qualifier("rawCatalog") Catalog catalog) {
GwcUrlHandlerMapping handler = new GwcUrlHandlerMapping(catalog, "/gwc/rest/web");
handler.setAlwaysUseFullPath(true);
handler.setOrder(10);

return handler;
}

/*
@Bean
WebMvcRegistrations gwcRestWebUrlHandlerMappingRegistrations(
@Qualifier("gwcRestWebUrlHandlerMapping") GwcUrlHandlerMapping handler) {
return new WebMvcRegistrations() {
@Override
public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
return handler;
}
};
}*/
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import org.geoserver.cloud.virtualservice.VirtualServiceVerifier;
import org.geoserver.gwc.dispatch.GeoServerGWCDispatcherController;
import org.geoserver.ows.Dispatcher;
import org.geowebcache.GeoWebCacheDispatcher;
import org.geowebcache.controller.GeoWebCacheDispatcherController;
import org.springframework.stereotype.Controller;
Expand All @@ -29,9 +28,6 @@
@Controller
@RequiredArgsConstructor
public class GeoWebCacheController {

private final @NonNull Dispatcher geoserverDispatcher;

private final @NonNull GeoWebCacheDispatcher geoWebCacheDispatcher;

private final @NonNull VirtualServiceVerifier virtualServiceVerifier;
Expand Down
Loading