Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 8ef402dc authored by Pawel GUTOWSKI's avatar Pawel GUTOWSKI
Browse files

EDELIVERY-2258 Made home page version backward compatible for easier migration

parent 5de37b3a
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@
<relativePath>../smp-parent-pom/pom.xml</relativePath>
</parent>
<artifactId>smp-server-library</artifactId>
<packaging>bundle</packaging>
<name>smp-server-library</name>
<!-- Default values for local compilation. The properties can be overriden for continuous integration servers -->
......@@ -196,19 +195,5 @@
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
eu.europa.ec.cipa.smp.server.*
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -117,8 +117,8 @@
<warName>${project.artifactId}</warName>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp/web</directory>
<targetPath>web</targetPath>
<directory>${basedir}/src/main/webapp/static_resources</directory>
<targetPath>static_resources</targetPath>
<filtering>true</filtering>
</resource>
</webResources>
......
......@@ -30,18 +30,20 @@ import static org.springframework.core.Ordered.HIGHEST_PRECEDENCE;
"eu.europa.ec.edelivery.smp.controllers",
"eu.europa.ec.edelivery.smp.validation"})
@Import({GlobalMethodSecurityConfig.class, ErrorMappingControllerAdvice.class})
public class SmpWebAppConfig extends WebMvcConfigurerAdapter {
public class SmpWebAppConfig implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("index.html");
registry.addViewController("/").setViewName("/index.html");
//Home page used by SMP 2.x and 3.x - needed for backward compatibility in some EC's environments
registry.addViewController("/web/index.html").setViewName("/index.html");
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.setOrder(HIGHEST_PRECEDENCE)
.addResourceHandler("/index.html", "/favicon-16x16.png")
.addResourceLocations("/web/");
.addResourceLocations("/static_resources/");
}
@Override
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment