com.mitchellbosecke.pebble.spring4.util.ViewUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pebble-spring4 Show documentation
Show all versions of pebble-spring4 Show documentation
Pebble Integration with Spring 4.x
/**
*
*/
package com.mitchellbosecke.pebble.spring4.util;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
public class ViewUtils {
private ViewUtils() {
}
public static HttpServletRequest getRequest() {
ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder
.currentRequestAttributes();
return attr.getRequest();
}
}