Hallo
Ich möchte gerne in meiner Rest-Schnittstelle (Basic Auth) die zwei Annotationen @Stateless und @RolesAllowed gleichzeitig verwenden. Mein Code sieht wie folgt aus:
Code (Java):
@Stateless
@ManagedBean
@Path
("/hello")
publicclassHelloWorldResource
{
@EJB
HelloBean hellobean
;
@RolesAllowed
("Admin")
@GET
@Path
("/{param}")
publicResponse getMsg
(@PathParam
("param")String msg,@QueryParam
(value
="test")String test,@ContextSecurityContext sc
)throwsIOException
{...
RollesAllowed und Stateless kombinieren
RollesAllowed und Stateless kombinieren
0 commentaires:
Enregistrer un commentaire