add root path

This commit is contained in:
Valentin CZERYBA 2022-05-11 22:40:24 +02:00
parent 34f38a81ae
commit dabcd87485
3 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,9 @@
package com.covas.ApplicationScoped;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("/api")
public class ApplicationRoot extends Application {
}

View File

@ -13,7 +13,7 @@ import org.jboss.logging.Logger;
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Path("/api/users") @Path("users")
public class UsersRessources { public class UsersRessources {
private static final Logger LOGGER = Logger.getLogger(UsersRessources.class); private static final Logger LOGGER = Logger.getLogger(UsersRessources.class);
@GET @GET

View File

@ -12,7 +12,7 @@ public class GreetingResourceTest {
@Test @Test
public void testHelloEndpoint() { public void testHelloEndpoint() {
given() given()
.when().get("/hello") .when().get("/api/hello")
.then() .then()
.statusCode(200) .statusCode(200)
.body(is("Hello RESTEasy")); .body(is("Hello RESTEasy"));