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

QA improvements #378

Merged
merged 1 commit into from
Nov 27, 2023
Merged
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
1 change: 0 additions & 1 deletion src/apps/geoserver/gwc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class GeoWebCacheApplicationConfiguration extends RestConfiguration {
*/
@Bean
@ConditionalOnMissingBean
public LegendSample legendSample(
LegendSample legendSample(
@Qualifier("rawCatalog") Catalog catalog, GeoServerResourceLoader loader) {
return new LegendSampleImpl(catalog, loader);
}
Expand Down
6 changes: 0 additions & 6 deletions src/apps/geoserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,5 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- trivy: override commons-collections:3.2.1 by 3.2.2 due to CVE-2015-7501 (CRITICAL), and CVE-2015-6420 (HIGH) -->
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
</dependencies>
</project>
1 change: 0 additions & 1 deletion src/apps/geoserver/restconfig/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
1 change: 0 additions & 1 deletion src/apps/geoserver/wcs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.view.RedirectView;

import javax.servlet.http.HttpServletRequest;
Expand All @@ -34,7 +33,7 @@ public RedirectView redirectRootToGetCapabilities() {
}

/** Serve only WCS schemas from classpath (e.g. {@code /schemas/wcs/1.1.1/wcsAll.xsd}) */
@RequestMapping(method = RequestMethod.GET, path = "/schemas/wcs/**")
@GetMapping(path = "/schemas/wcs/**")
public void getSchema(HttpServletRequest request, HttpServletResponse response)
throws Exception {
classPathPublisher.handleRequest(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
})
public class WcsApplicationConfiguration {

public @Bean VirtualServiceVerifier virtualServiceVerifier() {
@Bean
VirtualServiceVerifier virtualServiceVerifier() {
return new VirtualServiceVerifier();
}
}
1 change: 0 additions & 1 deletion src/apps/geoserver/webui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,19 @@ public class WebCoreConfiguration {

static final String EXCLUDED_BEANS_PATTERN = "^(?!logsPage).*$";

public @Bean GeoServerWicketServlet geoServerWicketServlet() {
@Bean
GeoServerWicketServlet geoServerWicketServlet() {
return new GeoServerWicketServlet();
}

public @Bean TestWfsPost testWfsPostServlet() {
@Bean
TestWfsPost testWfsPostServlet() {
return new TestWfsPost();
}

/** Register the {@link WicketServlet} */
public @Bean ServletRegistrationBean<GeoServerWicketServlet>
geoServerWicketServletRegistration() {
@Bean
ServletRegistrationBean<GeoServerWicketServlet> geoServerWicketServletRegistration() {
GeoServerWicketServlet servlet = geoServerWicketServlet();
ServletRegistrationBean<GeoServerWicketServlet> registration;
registration =
Expand All @@ -47,15 +49,17 @@ public class WebCoreConfiguration {
}

/** Register the {@link TestWfsPost servlet} */
public @Bean ServletRegistrationBean<TestWfsPost> wfsTestServletRegistration() {
@Bean
ServletRegistrationBean<TestWfsPost> wfsTestServletRegistration() {
TestWfsPost servlet = testWfsPostServlet();
ServletRegistrationBean<TestWfsPost> registration;
registration = new ServletRegistrationBean<TestWfsPost>(servlet, "/TestWfsPost");

return registration;
}

public @Bean HeaderContribution geoserverCloudCssTheme() {
@Bean
HeaderContribution geoserverCloudCssTheme() {
HeaderContribution contribution = new HeaderContribution();
contribution.setScope(GeoServerBasePage.class);
contribution.setCSSFilename("geoserver-cloud.css");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
@Configuration(proxyBeanMethods = true)
public class WebUiCloudServicesConfiguration {

public @Bean ServiceInstanceRegistry cloudServiceRegistry(DiscoveryClient client) {
@Bean
ServiceInstanceRegistry cloudServiceRegistry(DiscoveryClient client) {
return new ServiceInstanceRegistry(client);
}

public @Bean Category cloudCategory() {
@Bean
Category cloudCategory() {
Category category = new Category();
category.setNameKey("category.cloud");
category.setOrder(150);
Expand All @@ -43,7 +45,8 @@ public class WebUiCloudServicesConfiguration {
// <property name="authorizer" ref="workspaceAdminAuthorizer"/>
// </bean>

public @Bean MenuPageInfo<ServiceRegistryPage> serviceRegistryMenuPage(
@Bean
MenuPageInfo<ServiceRegistryPage> serviceRegistryMenuPage(
@Qualifier("aboutStatusCategory") Category aboutStatusCategory) {
MenuPageInfo<ServiceRegistryPage> menu = new MenuPageInfo<>();
menu.setId("serviceRegistry");
Expand All @@ -57,7 +60,8 @@ public class WebUiCloudServicesConfiguration {
return menu;
}

public @Bean GeoServerCloudHomePageContentProvider geoServerCloudHomePageContentProvider() {
@Bean
GeoServerCloudHomePageContentProvider geoServerCloudHomePageContentProvider() {
return new GeoServerCloudHomePageContentProvider();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ protected void login(String username, String password, String... roles) {
.setAuthentication(new UsernamePasswordAuthenticationToken(username, password, l));
}

@SuppressWarnings("unused")
private void print(Component component) {
boolean dumpClass = true;
boolean dumpValue = false;
Expand Down Expand Up @@ -129,6 +130,7 @@ public void GlobalSettingsPage_smoke_test() {
tester.startPage(GlobalSettingsPage.class);
tester.assertRenderedPage(GlobalSettingsPage.class);
GlobalSettingsPage page = (GlobalSettingsPage) tester.getLastRenderedPage();
assertNotNull(page);
// print(page);
assertHidden("proxyBaseUrlContainer");
assertHidden("useHeadersProxyURL");
Expand Down
1 change: 0 additions & 1 deletion src/apps/geoserver/wfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.view.RedirectView;

import javax.servlet.http.HttpServletRequest;
Expand All @@ -35,7 +34,7 @@ public RedirectView redirectRootToGetCapabilities() {
}

/** Serve only WFS schemas from classpath (e.g. {@code /schemas/wfs/2.0/wfs.xsd}) */
@RequestMapping(method = RequestMethod.GET, path = "/schemas/wfs/**")
@GetMapping(path = "/schemas/wfs/**")
public void getSchema(HttpServletRequest request, HttpServletResponse response)
throws Exception {
classPathPublisher.handleRequest(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
)
public class WfsAutoConfiguration {

public @Bean VirtualServiceVerifier virtualServiceVerifier() {
@Bean
VirtualServiceVerifier virtualServiceVerifier() {
return new VirtualServiceVerifier();
}
}
1 change: 0 additions & 1 deletion src/apps/geoserver/wms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
})
public class KMLAutoConfiguration {

public @Bean KMLIconsController kmlIconsController() {
@Bean
KMLIconsController kmlIconsController() {
return new KMLIconsController();
}

public @Bean KMLReflectorController kmlReflectorController() {
@Bean
KMLReflectorController kmlReflectorController() {
return new KMLReflectorController();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,24 @@ public class WmsApplicationAutoConfiguration {
* workspace and secured catalog decorators
*/
@Bean
public LegendSample legendSample(
LegendSample legendSample(
@Qualifier("rawCatalog") Catalog catalog, GeoServerResourceLoader loader) {
return new LegendSampleImpl(catalog, loader);
}

public @Bean WFSConfiguration wfsConfiguration(GeoServer geoServer) {
@Bean
WFSConfiguration wfsConfiguration(GeoServer geoServer) {
FeatureTypeSchemaBuilder schemaBuilder = new FeatureTypeSchemaBuilder.GML3(geoServer);
return new WFSConfiguration(geoServer, schemaBuilder, new WFS(schemaBuilder));
}

public @Bean WMSController webMapServiceController() {
@Bean
WMSController webMapServiceController() {
return new WMSController();
}

public @Bean VirtualServiceVerifier virtualServiceVerifier() {
@Bean
VirtualServiceVerifier virtualServiceVerifier() {
return new VirtualServiceVerifier();
}

Expand All @@ -92,7 +95,8 @@ public LegendSample legendSample(
name = "reflector.enabled",
havingValue = "true",
matchIfMissing = true)
public @Bean GetMapReflectorController getMapReflectorController() {
@Bean
GetMapReflectorController getMapReflectorController() {
return new GetMapReflectorController();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
*/
package org.geoserver.cloud.wms.controller;

import static org.springframework.web.bind.annotation.RequestMethod.GET;

import org.geoserver.ows.Dispatcher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
Expand All @@ -18,9 +16,7 @@

private @Autowired Dispatcher geoserverDispatcher;

@RequestMapping(
method = {GET},
path = {"/wms/reflect", "/{workspace}/wms/reflect"})
@GetMapping(path = {"/wms/reflect", "/{workspace}/wms/reflect"})
public void getMapReflect(HttpServletRequest request, HttpServletResponse response)
throws Exception {
geoserverDispatcher.handleRequest(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.view.RedirectView;

import javax.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -43,9 +42,7 @@ public RedirectView redirectRootToGetCapabilities() {
* <li>{@code /schemas/wms/1.1.1/WMS_MS_Capabilities.dtd}
* </ul>
*/
@RequestMapping(
method = RequestMethod.GET,
path = {"/schemas/wms/**"})
@GetMapping(path = {"/schemas/wms/**"})
public void getWmsSchema(HttpServletRequest request, HttpServletResponse response)
throws Exception {
classPathPublisher.handleRequest(request, response);
Expand All @@ -61,9 +58,7 @@ public void getWmsSchema(HttpServletRequest request, HttpServletResponse respons
* <li>{@code /openlayers3/**}
* </ul>
*/
@RequestMapping(
method = RequestMethod.GET,
path = {"/openlayers/**", "/openlayers3/**"})
@GetMapping(path = {"/openlayers/**", "/openlayers3/**"})
public void getStaticResource(HttpServletRequest request, HttpServletResponse response)
throws Exception {
classPathPublisher.handleRequest(request, response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
Expand Down Expand Up @@ -42,7 +41,7 @@

private @Autowired @Qualifier("kmlIconService") IconService kmlIconService;

@RequestMapping(method = RequestMethod.GET, path = "/kml/icon/**")
@GetMapping(path = "/kml/icon/**")
public void getKmlIcon(HttpServletRequest request, HttpServletResponse response)
throws Exception {
kmlIconService.handleRequest(adaptRequest(request), response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
*/
package org.geoserver.cloud.wms.controller.kml;

import static org.springframework.web.bind.annotation.RequestMethod.GET;

import org.geoserver.kml.KMLReflector;
import org.geoserver.ows.Dispatcher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
Expand All @@ -28,9 +26,7 @@

private @Autowired Dispatcher geoserverDispatcher;

@RequestMapping(
method = {GET},
path = {"/wms/kml", "/{workspace}/wms/kml"})
@GetMapping(path = {"/wms/kml", "/{workspace}/wms/kml"})
public void kmlReflect(HttpServletRequest request, HttpServletResponse response)
throws Exception {

Expand Down
1 change: 0 additions & 1 deletion src/apps/geoserver/wps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.view.RedirectView;

import javax.servlet.http.HttpServletRequest;
Expand All @@ -30,7 +29,7 @@ public RedirectView redirectRootToGetCapabilities() {
}

/** Serve only WPS schemas from classpath (e.g. {@code /schemas/wps/1.0.0/wpsAll.xsd}) */
@RequestMapping(method = RequestMethod.GET, path = "/schemas/wps/**")
@GetMapping(path = "/schemas/wps/**")
public void getSchema(HttpServletRequest request, HttpServletResponse response)
throws Exception {
classPathPublisher.handleRequest(request, response);
Expand Down
Loading
Loading