Class MockHttpServletMapping

java.lang.Object
org.springframework.mock.web.MockHttpServletMapping
All Implemented Interfaces:
jakarta.servlet.http.HttpServletMapping

public class MockHttpServletMapping extends Object implements jakarta.servlet.http.HttpServletMapping
Mock implementation of HttpServletMapping.

Currently not exposed in MockHttpServletRequest as a setter to avoid issues for Maven builds in applications with a Servlet 3.1 runtime requirement.

Since:
5.3.4
Author:
Rossen Stoyanchev
  • Constructor Details

    • MockHttpServletMapping

      public MockHttpServletMapping(String matchValue, String pattern, String servletName, @Nullable jakarta.servlet.http.MappingMatch match)
  • Method Details

    • getMatchValue

      public String getMatchValue()
      Specified by:
      getMatchValue in interface jakarta.servlet.http.HttpServletMapping
    • getPattern

      public String getPattern()
      Specified by:
      getPattern in interface jakarta.servlet.http.HttpServletMapping
    • getServletName

      public String getServletName()
      Specified by:
      getServletName in interface jakarta.servlet.http.HttpServletMapping
    • getMappingMatch

      public @Nullable jakarta.servlet.http.MappingMatch getMappingMatch()
      Specified by:
      getMappingMatch in interface jakarta.servlet.http.HttpServletMapping
    • toString

      public String toString()
      Overrides:
      toString in class Object