Is there a more programmatic way, equivalent to the below config:
@ApplicationPath("api")
public class MyResourceConfig extends ResourceConfig {
, of setting the application path for Jersey app? I wanted to make it configurable and maybe make use something like:
property("jersey.config.<application.path>", api);
with addtitinal:
@ConfigurationProperties(prefix = "jersey")
public class MyResourceConfig extends ResourceConfig {
@Setter @Getter protected String api;
The spring-boot-starter-jersey is a starter for building RESTful web applications using JAX-RS and Jersey. It is an alternative to spring-boot-starter-web . The spring-boot-starter-test is a starter for testing Spring Boot applications with libraries including JUnit, Hamcrest and Mockito.
A Jersey Configuration is a class that extends from ResourceConfig from the jersey library. A Jersey Configuration class will typically define an @ApplicationPath annotation specifying path to connect via REST.
You can set spring.jersey.application-path
config in your application.properties
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With