In my project I use pre-defined annotation @With:
@With(Secure.class)
public class Test { //....
The source code of @Wit
So the provided answer from Eric Jiang is 100% working in my situation and she is: I need JMSListener ,but i want to hide the destination name:
@GetPlayerDataByUUIDListener
public void getPlayerDataByUUID(Object message) {
System.out.println("Im Here");
}
`
@JmsListener(destination = PlayerStatisticsJMSConstants.GET_PLAYER_DATA_BY_UUID)
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface GetPlayerDataByUUIDListener {
}
So this is working perfectly ,and it is the same as:
@JmsListener(destination = "example")
@GetPlayerDataByUUIDListener
public void getPlayerDataByUUID(Object message) {
System.out.println("Im Here");
}