优化公共starter的bean加载方式,避免依赖的工程因包路径不一致而导致加载不了的情况

This commit is contained in:
zlt
2020-03-24 11:08:56 +08:00
parent 5ab0d63c2d
commit cf63212f94
15 changed files with 24 additions and 65 deletions
@@ -5,7 +5,6 @@ import com.central.common.model.LoginAppUser;
import com.central.common.model.SysUser;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* userService降级工场
@@ -14,7 +13,6 @@ import org.springframework.stereotype.Component;
* @date 2019/1/18
*/
@Slf4j
@Component
public class UserServiceFallbackFactory implements FallbackFactory<UserService> {
@Override
public UserService create(Throwable throwable) {
@@ -1,2 +1,5 @@
org.springframework.context.ApplicationContextInitializer=\
com.central.common.config.BannerInitializer
com.central.common.config.BannerInitializer
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.central.common.feign.fallback.UserServiceFallbackFactory