caojianbin
8 months ago
9 changed files with 68 additions and 13 deletions
@ -0,0 +1,24 @@ |
|||||||
|
package com.ecell.internationalize.common.security.annotation; |
||||||
|
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients; |
||||||
|
|
||||||
|
import java.lang.annotation.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author borui |
||||||
|
*/ |
||||||
|
@Target(ElementType.TYPE) |
||||||
|
@Retention(RetentionPolicy.RUNTIME) |
||||||
|
@Documented |
||||||
|
@EnableFeignClients |
||||||
|
public @interface EnableRyFeignClients { |
||||||
|
String[] value() default {}; |
||||||
|
|
||||||
|
String[] basePackages() default {"com.ecell.internationalize"}; |
||||||
|
|
||||||
|
Class<?>[] basePackageClasses() default {}; |
||||||
|
|
||||||
|
Class<?>[] defaultConfiguration() default {}; |
||||||
|
|
||||||
|
Class<?>[] clients() default {}; |
||||||
|
} |
@ -0,0 +1,6 @@ |
|||||||
|
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ |
||||||
|
com.ecell.internationalize.common.security.config.WebMvcConfig,\ |
||||||
|
com.ecell.internationalize.common.security.service.TokenService,\ |
||||||
|
com.ecell.internationalize.common.security.aspect.PreAuthorizeAspect,\ |
||||||
|
com.ecell.internationalize.common.security.aspect.InnerAuthAspect,\ |
||||||
|
com.ecell.internationalize.common.security.handler.GlobalExceptionHandler |
@ -0,0 +1,23 @@ |
|||||||
|
package com.ecell.internationalize.system.security; |
||||||
|
|
||||||
|
import com.ecell.internationalize.common.security.annotation.EnableCustomConfig; |
||||||
|
import com.ecell.internationalize.common.security.annotation.EnableRyFeignClients; |
||||||
|
import com.ecell.internationalize.common.swagger.annotation.EnableCustomSwagger2; |
||||||
|
import org.mybatis.spring.annotation.MapperScan; |
||||||
|
import org.springframework.boot.SpringApplication; |
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author borui |
||||||
|
*/ |
||||||
|
@EnableCustomConfig |
||||||
|
@EnableCustomSwagger2 |
||||||
|
@EnableRyFeignClients |
||||||
|
@MapperScan("com.**.mapper") |
||||||
|
@SpringBootApplication(scanBasePackages = {"com.ecell.internationalize"}) |
||||||
|
public class EcellSecurityApplication { |
||||||
|
public static void main(String[] args) { |
||||||
|
SpringApplication.run(EcellSecurityApplication.class, args); |
||||||
|
System.out.println("系统用户服务启动成功"); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue