public class RewriteRule extends Object implements org.springframework.beans.factory.InitializingBean
每个rewrite规则被匹配后,就会再试着匹配所有的conditions(如果有的话)。假如conditions也被满足, 那么substitution就会被执行。
Constructor and Description |
---|
RewriteRule() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
String |
getPattern() |
RewriteSubstitution |
getSubstitution() |
Object[] |
handlers() |
MatchResult |
match(String path)
试图匹配rule。
|
MatchResult |
matchConditions(MatchResult ruleMatchResult,
javax.servlet.http.HttpServletRequest request) |
void |
setConditions(RewriteCondition[] conditions) |
void |
setHandlers(Object[] handlers) |
void |
setPattern(String patternString) |
void |
setSubstitution(RewriteSubstitution substitution) |
String |
toString() |
public String getPattern()
public void setPattern(String patternString) throws PatternSyntaxException
PatternSyntaxException
public void setConditions(RewriteCondition[] conditions)
public void setHandlers(Object[] handlers)
public Object[] handlers()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public MatchResult match(String path)
如果匹配,则返回匹配结果。否则返回null
表示不匹配。
public MatchResult matchConditions(MatchResult ruleMatchResult, javax.servlet.http.HttpServletRequest request)
public RewriteSubstitution getSubstitution()
public void setSubstitution(RewriteSubstitution substitution)
Copyright © 2006–2018 TinyGroup. All rights reserved.