@Order(value=500000)
public class EntityManagerFindValidationFilter
extends org.springframework.web.filter.OncePerRequestFilter
Used to validate usages of em.find() when querying for a primary key specifically across sibling Multi-Tenant sites. This Servlet filter should only turned on if you often query an entity by ID. Generally this only happens in API-based use cases since most other use cases rely on querying by name, url, etc and not directly on a primary key.
This is intentionally not activated by default but is included here for convenience within other projects. If you are
in Spring Boot, this filter can be activated simply in an @Bean method. If you are not using Spring Boot, this
filter must come after the BroadleafRequestFilter and is generally initialized in applicationContext-filter.xml.
BroadleafRequestContext.setInternalIgnoreFilters(Boolean)| Constructor and Description |
|---|
EntityManagerFindValidationFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain) |
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchprotected void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws javax.servlet.ServletException,
IOException
doFilterInternal in class org.springframework.web.filter.OncePerRequestFilterjavax.servlet.ServletExceptionIOExceptionCopyright © 2022. All rights reserved.