feat: 替换spring.factories
This commit is contained in:
-2
@@ -6,7 +6,6 @@ import com.central.common.model.SysRole;
|
||||
import com.central.common.model.SysUser;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -18,7 +17,6 @@ import java.util.List;
|
||||
* @date 2019/1/18
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class UserServiceFallbackFactory implements FallbackFactory<UserService> {
|
||||
@Override
|
||||
public UserService create(Throwable throwable) {
|
||||
|
||||
@@ -4,14 +4,12 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* spring获取bean工具类
|
||||
*
|
||||
* @author 作者 owen E-mail: 624191343@qq.com
|
||||
*/
|
||||
@Component
|
||||
@Order(0)
|
||||
public class SpringUtil implements ApplicationContextAware {
|
||||
|
||||
|
||||
@@ -1,7 +1,2 @@
|
||||
org.springframework.context.ApplicationContextInitializer=\
|
||||
com.central.common.config.BannerInitializer
|
||||
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.central.common.feign.fallback.UserServiceFallbackFactory,\
|
||||
com.central.common.lock.LockAspect,\
|
||||
com.central.common.utils.SpringUtil
|
||||
com.central.common.config.BannerInitializer
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
com.central.common.feign.fallback.UserServiceFallbackFactory
|
||||
com.central.common.lock.LockAspect
|
||||
com.central.common.utils.SpringUtil
|
||||
Reference in New Issue
Block a user