mason icon indicating copy to clipboard operation
mason copied to clipboard

Added @WebFilter annotation for Router

Open kaisteel opened this issue 6 years ago • 3 comments

Added WebFilter annotation on Router class to avoid so that entry in web.xml (this will work for Servlet API 3.x+) The default URL pattern is set to /rest/* which can be overwritten from web.xml file

<filter>
        <filter-name>Router</filter-name>
        <filter-class>com.metamug.mason.Router</filter-class>
</filter>    
<filter-mapping>
        <filter-name>Router</filter-name>
        <url-pattern>/rest/*</url-pattern>
</filter-mapping>

The filter-name has to be Router for it to be overwritten

kaisteel avatar Dec 14 '19 05:12 kaisteel

This pull request fixes 1 alert when merging d77336e8f502a312271254ef825147b524769ea6 into 0bf850b49e6e746ee167335c9f8193228a09c8e5 - view on LGTM.com

fixed alerts:

  • 1 for Spurious Javadoc @param tags

lgtm-com[bot] avatar Dec 14 '19 12:12 lgtm-com[bot]

This pull request fixes 1 alert when merging efa66408f16843e2a8a8e5cb5231bc30942cce1b into 03f06c1a33812ae8c24cd6c965a645519adedb7b - view on LGTM.com

fixed alerts:

  • 1 for Spurious Javadoc @param tags

lgtm-com[bot] avatar Dec 19 '19 08:12 lgtm-com[bot]

Hope you tested that the config can be overwritten using web.xml since developers may want to keep the rest api elsewhere

On Sat, 14 Dec 2019 at 11:18 AM, Kaustubh Damle [email protected] wrote:

Added WebFilter annotation on Router class to avoid so that entry in web.xml (this will work for Servlet API 3.x+) The default URL pattern is set to /rest/* which can be overwritten from web.xml file

Router com.metamug.mason.Router Router /rest/*

The filter-name has to be Router for it to be overwritten

You can view, comment on, or merge this pull request online at:

https://github.com/metamug/mason/pull/110 Commit Summary

  • Added @WebFilter annotation for Router

File Changes

Patch Links:

  • https://github.com/metamug/mason/pull/110.patch
  • https://github.com/metamug/mason/pull/110.diff

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/metamug/mason/pull/110?email_source=notifications&email_token=AAMA5OBI4W5AXDAQ5NEKSQ3QYRXUJA5CNFSM4J2Y3VSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IAPIVIQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMA5OB6WXWUYOUYA5NB7SDQYRXUJANCNFSM4J2Y3VSA .

d3ep4k avatar Dec 20 '19 07:12 d3ep4k