国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

java自定義注解
淡淡煙草味
淡淡煙草味 2017-06-14 10:52:01
0
2
1021

比如springmvc的requestmapping

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package org.springframework.web.bind.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;

@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Mapping
public @interface RequestMapping {

String name() default "";

@AliasFor("path")
String[] value() default {};

@AliasFor("value")
String[] path() default {};

RequestMethod[] method() default {};

String[] params() default {};

String[] headers() default {};

String[] consumes() default {};

String[] produces() default {};

}

為什么就可以將請求 路由進來啊 實現(xiàn)代碼在哪兒呢 什么原理?????

淡淡煙草味
淡淡煙草味

全部回復(2)
巴扎黑

如果不了解注解相關的知識,可以了解一下注解知識 1、文章1,2、文章2,這兩篇講解的還不錯。之后可以百度一下spring mvc requestmapping 源碼解讀,網(wǎng)上的文章還是蠻多的。源碼目前還沒有讀過,不過基本的原理應該也是通過反射獲取到相應的配置,再根據(jù)配置進行請求路由。具體的是怎么根據(jù)反射獲取相應配置的還是要去讀一下源碼。

習慣沉默

/a/11...

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板