• 大小: 170KB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2023-12-30
  • 语言: 其他
  • 标签: SpringCloud  Gateway  

资源简介

1.本项目为SpringCloud Gateway的微服务框架,整合了SpringSecurity,微服务间使用Redis来获取登陆的用户信息。 2.由于Gateway采用的是纯Webflux方式,所以原有的Spring基于传统拦截器、过滤器的方式无法正常使用SpringSecurity。 3.因此,本项目根据WebFlux的方式,进行了整合,实现了登录和权限验证。

资源截图

代码片段和文件信息

package com.daybreak.xian.basecore;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.client.RestTemplate;


@SpringBootApplication
@EnableEurekaClient
@ComponentScan(“com.daybreak.xian“)
@MapperScan(“com.daybreak.xian.basecore.dao“)
public class baseCoreApplication {

public static void main(String[] args) {
SpringApplication.run(baseCoreApplication.class args);
}
@Bean
@LoadBalanced
public RestTemplate restTemplate(){
return new RestTemplate();
}

/* @Bean
public static ConfigureRedisAction configureRedisAction() {
return ConfigureRedisAction.NO_OP;
}*/
}



 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        341  2020-07-24 18:41  spring_gateway_security_webflux\.gitignore

     文件       1308  2020-07-24 18:43  spring_gateway_security_webflux\.idea\compiler.xml

     文件        475  2020-07-24 18:43  spring_gateway_security_webflux\.idea\encodings.xml

     文件       1444  2020-07-24 18:43  spring_gateway_security_webflux\.idea\inspectionProfiles\Project_Default.xml

     文件        465  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__antlr_antlr_2_7_7.xml

     文件        517  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml

     文件        571  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__ch_qos_logback_logback_classic_1_2_3.xml

     文件        550  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__ch_qos_logback_logback_core_1_2_3.xml

     文件        597  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_beanutils_commons_beanutils_1_9_3.xml

     文件        546  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_codec_commons_codec_1_11.xml

     文件        619  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_collections_commons_collections_3_2_2.xml

     文件        627  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_configuration_commons_configuration_1_8.xml

     文件        594  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_fileupload_commons_fileupload_1_4.xml

     文件        506  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_io_commons_io_1_4.xml

     文件        550  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_jxpath_commons_jxpath_1_3.xml

     文件        528  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_lang_commons_lang_2_6.xml

     文件        561  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__commons_logging_commons_logging_1_2.xml

     文件        517  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__com_alibaba_fastjson_1_2_47.xml

     文件        502  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__com_auth0_java_jwt_3_2_0.xml

     文件        525  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_classmate_1_3_4.xml

     文件        647  2020-07-24 18:43  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml

     文件        598  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_core_jackson_core_2_9_6.xml

     文件        626  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_core_jackson_databind_2_9_6.xml

     文件        692  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_dataformat_jackson_dataformat_xml_2_9_6.xml

     文件        677  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_6.xml

     文件        691  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_6.xml

     文件        704  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_module_jackson_module_afterburner_2_9_6.xml

     文件        739  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_9_6.xml

     文件        732  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_6.xml

     文件        589  2020-07-24 18:44  spring_gateway_security_webflux\.idea\libraries\Maven__com_fasterxml_woodstox_woodstox_core_5_0_3.xml

............此处省略333个文件信息

评论

共有 条评论