mirror of https://github.com/longtai-cn/hippo4j
解决动态线程池配置为关闭时项目启动报错的问题 (#633)
* Register company information (#621) * 登记公司 * Register company information * Update official documentation * Update powered-by.md (#623) * hippo4j-config rename core to config (#627) * feat: hippo4j-config rename core to config * feat: hippo4j-config-example rename core to config * feat: hippo4j-config-example rename core to config * Code formatting * Delete useless blank lines * Add JSONUtilTest * Update hippo4j-adapter.md (#629) * Complete JSONUtilTest test cases (#628) (#630) * load the web adapter project when the dynamic thread pool configuration enable is true Co-authored-by: Lijx <lijinxingerm@gmail.com> Co-authored-by: chen.ma <machencoding@163.com> Co-authored-by: maxisvest <1447829379@qq.com> Co-authored-by: BigXin0109 <1064730540@qq.com> Co-authored-by: hbw1994 <transformme@126.com> Co-authored-by: 黄成兴 <49221670+Createsequence@users.noreply.github.com> Co-authored-by: shupeng.dou <shupeng.dou@ikang.com>pull/639/head
parent
2a88d910ab
commit
6c4ffa172d
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.hippo4j.springboot.starter.adapter.web;
|
||||
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Import(WebAdapterConfigurationSelector.class)
|
||||
public @interface EnableWebAdapter {
|
||||
}
|
8
hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterAutoConfiguration.java → hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterConfiguration.java
8
hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterAutoConfiguration.java → hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterConfiguration.java
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package cn.hippo4j.springboot.starter.adapter.web;
|
||||
|
||||
import org.springframework.context.annotation.DeferredImportSelector;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
|
||||
@Order
|
||||
public class WebAdapterConfigurationSelector implements DeferredImportSelector {
|
||||
|
||||
@Override
|
||||
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
|
||||
return new String[]{WebAdapterConfiguration.class.getName()};
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.hippo4j.springboot.starter.adapter.web.WebAdapterAutoConfiguration
|
Loading…
Reference in new issue