I\'m using Spring boot + Jersey + Spring security, I want to have public and private endpoints, I want an schema as follow:
You won't be allowed to create two beans for your Resource Class. You can achieve what you are trying to achieve using a single Resource Class as well.
Here is an example:
@Path("rest")
public class SampleResourceClass {
@Path("/public/pings")
@GET
public Responce getPings(){
/* Code Here */
}
@Path("/private/accounts")
@GET
public Response getAccounts(){
/* Code Here */
}
}