问题描述
比如以下为有效链接,除此以为均为无效链接。应该使用正则过滤还是有更好的方案?/project/navi/project/navi/default_3B.htm/project/navi/library_not_exist.jsp/project/navi/navi.jsp/project/navi/navi_temp.jsp/project/navi/others.jsp/project/admin/project/admin/blank.html/project/admin/admin.jsp/project/admin/details.jsp/project/admin/userList.jsp/project/bookmark/project/bookmark/add_bookmark.jsp/project/bookmark/add_success.jsp/project/bookmark/bookmark.jsp/project/bookmark/mark_edit.jsp/project/note/project/note/add_note.jsp/project/note/add_success.jsp/project/note/details.jsp/project/note/feedback.jsp/project/note/notes.jsp/project/note/notesfile_error.jsp/project/note/notes_edit.jsp/project/note/notes_upload.jsp/project/note/topicNoteDetail.jsp/project/note/topicNoteEdit.jsp/project/note/topic_note.jsp/project/search/project/search/advance_search_result.jsp/project/search/adv_search_home.jsp/project/search/adv_search_lib.jsp/project/search/home_search_result.jsp/project/search/index_not_exist.jsp/project/search/keyword.jsp/project/search/lib_search_result.jsp/project/home/project/home/details.jsp/project/home/FFInvalid.jsp/project/home/index.jsp/project/home/lib_not_exist.jsp/project/home/login.jsp/project/common/project/common/error.jsp/project/common/header.jsp/project/common/i18nLib.jsp/project/ua/project/ua/moreResults.jsp/project/ua/navi.jsp/project/ua/related.jsp/project/ua/search.jsp/project/ua/toc.jsp/project/ua/tocContent.jsp/project/ua/tocTop.jsp/project/ua/top.jsp/project/ua/ua.jsp/project/ua/ua_navi.jsp/project/upgrade/project/upgrade/dbUpgradeWelcome.jsp
解决方案
AntPathMatcher即可,适合做路径映射一般可以把这些配置在properties文件中,然后读取判断