Spring Jersey Download - ApplicationPath

Is there a more programmatic way equivalent to the config below:

@ApplicationPath("api")
public class MyResourceConfig extends ResourceConfig {

set application path for jersey application? I wanted to configure it and maybe use something like:

property("jersey.config.<application.path>", api);

with addtitinal:

@ConfigurationProperties(prefix = "jersey")
public class MyResourceConfig extends ResourceConfig {

@Setter @Getter protected String api;
+4
source share
2 answers

You can install spring.jersey.application-pathconfig in yours application.properties.

+4
source

spring.jersey.application-path = api or whatever your main API path is. This will force the knitwear along the way to accept everything only from / **

0
source

Source: https://habr.com/ru/post/1626258/


All Articles