SpringBoot Maven Plugin 及 @Sprin

2018-01-10  本文已影响60人  当当一丢丢

Spring Boot Maven plugin 提供以下支持

@SpringBootApplication

@SpringBootApplication 也是1个组合体

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(excludeFilters = {
        @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
        @Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })
public @interface SpringBootApplication {
    ......
}
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Configuration  //注意此处
public @interface SpringBootConfiguration {
    ......
}

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component  //注意此处
public @interface Configuration {
    ......
}

SpringBoot结合RESTAPI react 前端框架

案例:ReleaseAPI.jsx 一条 方法
let uri = "/api/packages/hotfix?" + data;
RestAPI.getEx(uri, onsuccess, onerror);

上一篇下一篇

猜你喜欢

热点阅读