feat: 初始化

This commit is contained in:
2024-04-09 11:34:46 +08:00
commit 39f3acc15f
3209 changed files with 253442 additions and 0 deletions
@@ -0,0 +1,20 @@
package com.yida.data.auth;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(value = FebsServerConstant.EDU_AUTH, contextId = "authServiceClient",
fallbackFactory = RemoteAuthServiceFallback.class)
public interface RemoteAuthService {
/**
* 撤销认证
*
* @param userName
* @param clientId
*/
@GetMapping("/in/security/revokeApproval")
void revokeApproval(@RequestParam("userName") String userName, @RequestParam("clientId") String clientId);
}
@@ -0,0 +1,34 @@
package com.yida.data.auth;
import com.yida.data.common.core.annotation.Fallback;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
/**
* RemoteAuthService fallback处理类
*
* @author ZYJ
* @date 2022/8/26
*/
@Slf4j
@Fallback
public class RemoteAuthServiceFallback implements FallbackFactory<RemoteAuthService> {
@Override
public RemoteAuthService create(Throwable throwable) {
log.error("RemoteAuthService fallback reason:{}", throwable.getMessage());
return new RemoteAuthService() {
/**
* 撤销认证
*
* @param userName
* @param clientId
*/
@Override
public void revokeApproval(String userName, String clientId) {
}
};
}
}
@@ -0,0 +1,3 @@
# Auto Configure
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yida.data.auth.RemoteAuthServiceFallback