How to authorize specific resources based on users who created those in REST, using annotations
问题 I do not understand Java annotations with retention policy as RUNTIME that well. What I'm trying to do is create an annotation named @Authorize and use it on methods which needs user authorization in order to perform some action( the user is already authenticated at this point). eg. I have an order service with a getOrder() method. I want only the user who created this order to access it. ` public void getOrder(User user) { //current code does something like this if(order.getCreatedBy()