mvc work
This commit is contained in:
parent
3ac30cd89f
commit
45c0260fc5
|
@ -4,27 +4,6 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="launchpad-common-0.19.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/launchpad-common/launchpad-common">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="launchpad-common-client-0.19.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/launchpad-common-client/launchpad-common-client">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="launchpad-security-api-0.19.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/launchpad-security-api/launchpad-security-api">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="launchpad-shared-0.19.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/launchpad-shared/launchpad-shared">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="launchpad-provisioning-api-0.19.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/launchpad-provisioning-api/launchpad-provisioning-api">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="launchpad-touchdata-api-0.19.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/launchpad-touchdata-api/launchpad-touchdata-api">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="launchpad-cloud-0.19.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/launchpad-cloud/launchpad-cloud">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="context-root" value="launchpad-web"/>
|
||||
<property name="java-output-path" value="/launchpad-web/target/classes"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.baeldung</groupId>
|
||||
<artifactId>spring-mvc</artifactId>
|
||||
|
@ -7,6 +8,19 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<!-- Spring -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${org.springframework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${org.springframework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- web -->
|
||||
|
||||
<dependency>
|
||||
|
@ -102,4 +116,26 @@
|
|||
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<!-- Spring -->
|
||||
<org.springframework.version>3.2.2.RELEASE</org.springframework.version>
|
||||
|
||||
<!-- logging -->
|
||||
<org.slf4j.version>1.7.5</org.slf4j.version>
|
||||
<logback.version>1.0.11</logback.version>
|
||||
|
||||
<!-- testing -->
|
||||
<org.hamcrest.version>1.3</org.hamcrest.version>
|
||||
<junit.version>4.11</junit.version>
|
||||
<mockito.version>1.9.5</mockito.version>
|
||||
|
||||
<httpcore.version>4.2.4</httpcore.version>
|
||||
<httpclient.version>4.2.4</httpclient.version>
|
||||
|
||||
<rest-assured.version>1.8.0</rest-assured.version>
|
||||
<groovy.version>1.8.9</groovy.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<version>0.1-SNAPSHOT</version>
|
||||
</project>
|
|
@ -0,0 +1,34 @@
|
|||
package org.baeldung.spring.web.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.ViewResolver;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||
import org.springframework.web.servlet.view.JstlView;
|
||||
|
||||
@EnableWebMvc
|
||||
@Configuration
|
||||
// @ComponentScan("org.package1.to.scan.web")
|
||||
public class ClientWebConfig extends WebMvcConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(final ViewControllerRegistry registry) {
|
||||
super.addViewControllers(registry);
|
||||
|
||||
registry.addViewController("/sample.html");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver viewResolver() {
|
||||
final InternalResourceViewResolver bean = new InternalResourceViewResolver();
|
||||
|
||||
bean.setViewClass(JstlView.class);
|
||||
bean.setPrefix("/WEB-INF/view/");
|
||||
bean.setSuffix(".jsp");
|
||||
|
||||
return bean;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue