BAEL-5157 - Exception Handling with Jersey (#12090)

* BAEL-5157 - Exception Handling with Jersey

First draft:
https://drafts.baeldung.com/wp-admin/post.php?post=131880&action=edit

* BAEL-5157

* more meaningful exception messages

* BAEL-5157

* midified integration test to use the first available port
This commit is contained in:
Ulisses Lima 2022-04-19 15:02:25 -03:00 committed by GitHub
parent 66f829cd8d
commit 5888cf423b
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.glassfish.jersey.test.JerseyTest;
import org.glassfish.jersey.test.TestProperties;
import org.junit.Test;
import com.baeldung.jersey.exceptionhandling.ExceptionHandlingConfig;
@ -35,6 +36,7 @@ public class StocksResourceIntegrationTest extends JerseyTest {
@Override
protected Application configure() {
forceSet(TestProperties.CONTAINER_PORT, "0");
return new ExceptionHandlingConfig();
}