This commit is contained in:
@@ -19,9 +19,11 @@ import org.redkale.util.*;
|
|||||||
* 详情见: http://redkale.org
|
* 详情见: http://redkale.org
|
||||||
*
|
*
|
||||||
* @author zhangjx
|
* @author zhangjx
|
||||||
|
* @param <K> SessionID的类型
|
||||||
* @param <C> Context的子类型
|
* @param <C> Context的子类型
|
||||||
* @param <R> Request的子类型
|
* @param <R> Request的子类型
|
||||||
* @param <P> Response的子类型
|
* @param <P> Response的子类型
|
||||||
|
* @param <S> Servlet的子类型
|
||||||
*/
|
*/
|
||||||
public abstract class PrepareServlet<K extends Serializable, C extends Context, R extends Request<C>, P extends Response<C, R>, S extends Servlet<C, R, P>> extends Servlet<C, R, P> {
|
public abstract class PrepareServlet<K extends Serializable, C extends Context, R extends Request<C>, P extends Response<C, R>, S extends Servlet<C, R, P>> extends Servlet<C, R, P> {
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,10 @@ public final class HttpPrepareServlet extends PrepareServlet<String, HttpContext
|
|||||||
@Override
|
@Override
|
||||||
public void addServlet(HttpServlet servlet, Object prefix, AnyValue conf, String... mappings) {
|
public void addServlet(HttpServlet servlet, Object prefix, AnyValue conf, String... mappings) {
|
||||||
if (prefix == null) prefix = "";
|
if (prefix == null) prefix = "";
|
||||||
|
if (mappings.length < 1) {
|
||||||
|
WebServlet ws = servlet.getClass().getAnnotation(WebServlet.class);
|
||||||
|
if (ws != null) mappings = ws.value();
|
||||||
|
}
|
||||||
for (String mapping : mappings) {
|
for (String mapping : mappings) {
|
||||||
if (!prefix.toString().isEmpty()) mapping = prefix + mapping;
|
if (!prefix.toString().isEmpty()) mapping = prefix + mapping;
|
||||||
if (this.mapStrings.containsKey(mapping)) {
|
if (this.mapStrings.containsKey(mapping)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user