* Fix a division method mistake

* Maven integration testing

* Move Maven integration tests to the maven module

* Remove Maven integration tests in the old module
This commit is contained in:
nguyennamthai
2018-08-18 21:56:15 +07:00
committed by Predrag Maric
parent 955e78a306
commit c467a4e7d6
9 changed files with 437 additions and 145 deletions
@@ -0,0 +1,9 @@
package com.baeldung.maven.it;
import org.glassfish.jersey.server.ResourceConfig;
public class EndpointConfig extends ResourceConfig {
public EndpointConfig() {
register(RestEndpoint.class);
}
}
@@ -0,0 +1,12 @@
package com.baeldung.maven.it;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@Path("/")
public class RestEndpoint {
@GET
public String hello() {
return "Welcome to Baeldung!";
}
}
+17
View File
@@ -0,0 +1,17 @@
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<servlet>
<servlet-name>rest-servlet</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.baeldung.maven.it.EndpointConfig</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>rest-servlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>