Skip to content

Commit

Permalink
[bug] change the order of MdcFilter to the highest precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirhosseinZDev authored Apr 8, 2024
1 parent b9daab2 commit 3b0e861
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import jakarta.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.web.util.ContentCachingResponseWrapper;

Expand All @@ -22,7 +23,7 @@
* @author M.khoshnevisan
* @since 4/21/2021
*/
@Order(30)
@Order(Ordered.HIGHEST_PRECEDENCE + 1)
public class HttpLoggingFilter extends OncePerRequestFilterBase {

private static final Logger LOGGER = LoggerFactory.getLogger(HttpLoggingFilter.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

import java.io.IOException;
Expand All @@ -17,7 +18,7 @@
* @author mina khoshnevisan
* @since 7/16/2022
*/
@Order(10)
@Order(Ordered.HIGHEST_PRECEDENCE)
public class HttpMdcFilter extends OncePerRequestFilterBase {

private final MdcUtil mdcLogUtil;
Expand Down

0 comments on commit 3b0e861

Please sign in to comment.