I would like to have jaxrs endpoint in spring boot app. On the same server I would like to have html page that servers RichInternetApplication with single page.
Is such configuration is possible? I am trying, but it seems they work to exclude each other.
My mvn home controller:
@Controller
public class HomeContoller {
@RequestMapping("/")
public String index() {
return "index";
}
}
and jaxrs conf:
@Configuration
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
// scan the resources package for our resources
packages(getClass().getPackage().getName() + ".resources");
}
}
And jaxrs endpoint
@Path("/") public interface Api {
@GET @Path("ping") Response ping();
}
@Component
@Scope("request")
public class ApiController extends Application implements Api {
@Override public Response ping() {
return Response.ok("pong").build();
}
}
If I would go with spring mvc instead of jaxrs it would work?
Please help