Created
June 30, 2020 07:35
-
-
Save circlee/695514f0c30cbeb5dc4c5693be5b7bae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Factory that exposes the current request object on demand. | |
*/ | |
@SuppressWarnings("serial") | |
private static class RequestObjectFactory implements ObjectFactory<ServletRequest>, Serializable { | |
@Override | |
public ServletRequest getObject() { | |
return currentRequestAttributes().getRequest(); | |
} | |
@Override | |
public String toString() { | |
return "Current HttpServletRequest"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment