首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏代码男人

    Jetpack Compose之 在Compose中使用Navigation导航

    配置文件,代码如下所示: object RouteConfig {     /**      * 页面1路由      */     const val ROUTE_PAGEONE = "pageOne (RouteConfig.ROUTE_PAGETWO) {             PageTwo()         }     } } 如此一来,我们就建立了导航对应关系,RouteConfig.ROUTE_PAGEONE (RouteConfig.ROUTE_PAGEONE) {     PageOne(navController) } composable(RouteConfig.ROUTE_PAGETWO) {      ) {     composable(RouteConfig.ROUTE_PAGEONE) {         PageOne(navController)     }     composable navController.navigate("${RouteConfig.ROUTE_PAGETWO}/黄林晴") 不用想了,会崩溃!!

    2.6K20编辑于 2022-05-10
  • 来自专栏猿天地

    Spring Cloud Gateway 限流操作

    IllegalStateException("RedisRateLimiter is not initialized"); } // 获取routeId对应的限流配置 Config routeConfig = getConfig().getOrDefault(routeId, defaultConfig); if (routeConfig == null) { throw new (); // 令牌桶的容量,允许在一秒钟内完成的最大请求数 int burstCapacity = routeConfig.getBurstCapacity(); try { tokensLeft = results.get(1); Response response = new Response(allowed, getHeaders(routeConfig determining if user allowed from redis", e); } return Mono.just(new Response(true, getHeaders(routeConfig

    2.4K41发布于 2018-08-06
  • 来自专栏冷冷

    Spring Cloud Gateway 原生支持接口限流该怎么玩

    public Mono<Response> isAllowed(String routeId, String id) { Config routeConfig = getConfig().getOrDefault (routeId, defaultConfig); int replenishRate = routeConfig.getReplenishRate(); int burstCapacity = routeConfig.getBurstCapacity ; Long tokensLeft = results.get(1); Response response = new Response(allowed, getHeaders(routeConfig Error determining if user allowed from redis", e); } return Mono.just(new Response(true, getHeaders(routeConfig

    1.5K20发布于 2018-07-01
  • 来自专栏冷冷

    Spring Cloud Gateway 原生的接口限流该怎么玩

    public Mono<Response> isAllowed(String routeId, String id) { Config routeConfig = getConfig().getOrDefault (routeId, defaultConfig); int replenishRate = routeConfig.getReplenishRate(); int burstCapacity = routeConfig.getBurstCapacity ; Long tokensLeft = results.get(1); Response response = new Response(allowed, getHeaders(routeConfig Error determining if user allowed from redis", e); } return Mono.just(new Response(true, getHeaders(routeConfig

    1.1K20发布于 2019-05-26
  • 来自专栏web技术开发分享

    React路由学习

    render最外层标签中写入 <Redirect to="/home/" />  路由的嵌套 1.在子路由中建立孙路由直接引入即可 2.根据后台返回的数组来动态渲染路由 模拟一组数据     let routeConfig                     

    一级导航

                        
                              {                             routeConfig.map >             
                
                    {                     routeConfig.map

    1.1K10编辑于 2022-08-11
  • 来自专栏猿天地

    Spring Cloud Gateway 结合配置中心限流

    throw new IllegalStateException("RedisRateLimiter is not initialized"); } //Config routeConfig String replenishRateKey = routeId + "." + id + ".replenishRate"; int replenishRate = routeConfig.get routeConfig.get("default.replenishRate") : routeConfig.get(replenishRateKey); String burstCapacityKey = routeId + "." + id + ".burstCapacity"; int burstCapacity = routeConfig.get(burstCapacityKey routeConfig.get("default.burstCapacity") : routeConfig.get(burstCapacityKey); try {

    1.3K30发布于 2018-09-30
  • 来自专栏码匠的流水账

    聊聊spring cloud gateway的RedisRateLimiter

    throw new IllegalStateException("RedisRateLimiter is not initialized"); } Config routeConfig = getConfig().getOrDefault(routeId, defaultConfig); if (routeConfig == null) { int replenishRate = routeConfig.getReplenishRate(); // How much bursting do you want to allow int burstCapacity = routeConfig.getBurstCapacity(); try { List<String> keys = getKeys tokensLeft = results.get(1); Response response = new Response(allowed, getHeaders(routeConfig

    4.4K30发布于 2018-09-17
  • 来自专栏鸿蒙开发实践

    鸿蒙OS模块化开发实战:独立路由与解耦策略

    = 'MainPage', OtherLogin = 'OtherLogin', OtherTest = 'OtherTest'}// 路由配置函数@Builderexport function routeConfig pageInfos = new NavPathStack(); aboutToAppear() { // 初始化路由 LibNavigator.init(this.pageInfos, routeConfig ); } build() { Navigation(this.pageInfos) { MainPage(); } .navDestination(routeConfig

    25710编辑于 2025-06-29
  • 来自专栏wfaceboss

    MVC框架介绍

    (App_Start):包含mvc系统启动的相关类, RouteConfig:路由配置, FilterConfig:过滤器配置   (1)RouteConfig:路由配置 public static "Index", id = UrlParameter.Optional } ); } 3.Global.asax项目启动时自动调用的方法与App_Start中的RouteConfig Application_Start()//调用路由注册方法 { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes

    1.2K10发布于 2019-04-08
  • 来自专栏kwcode

    MVC自定义视图引擎地址

    先看结构 1、RouteConfig 文件(注意顺序) public static void RegisterRoutes(RouteCollection routes) { ); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes

    1.1K60发布于 2018-03-14
  • 来自专栏博客园

    Asp.Net Web API中使用Session,Cache和Application的几个方法

    SessionableControllerHandler(RouteData routeData) :base(routeData) { } }    创建RouteConfig 类型并配置路由 public class RouteConfig { public static void RegisterRoutes(RouteCollection route Application_Start() { // GlobalConfiguration.Configure(WebApiConfig.Register); RouteConfig.RegisterRoutes

    1.8K10发布于 2018-08-31
  • 来自专栏码匠的流水账

    聊聊spring cloud的RequestRateLimiterGatewayFilter

    public Mono<Response> isAllowed(String routeId, String id) { InMemoryRateLimiter.Config routeConfig = getConfig().get(routeId); if (routeConfig == null) { if (defaultConfig == null IllegalArgumentException("No Configuration found for route " + routeId); } routeConfig int replenishRate = routeConfig.getReplenishRate(); // How much bursting do you want to allow int burstCapacity = routeConfig.getBurstCapacity(); Bucket bucket = ipBucketMap.computeIfAbsent

    2.5K10发布于 2018-09-17
  • 来自专栏贺贺的前端工程师之路

    Angualr2 之 angular模块Angular 模块化提供服务特性模块 - 业务上的最佳实践(n)共享模块XxxModule.forRoot配置核心服务知识点

    SinoListComponent, SinoItemDetailComponent], }) export class CrudModule { static forRoot(config: any, routeConfig { provide: ModuleConfig, useValue: config, }, { provide: RouteConfig , useValue: routeConfig ? routeConfig : DEFAULT_ROUTE_CONFIG, }, ], }; } } 提供服务 有很多组件,是需要依靠外部的服务才能完成其功能的。

    3K30发布于 2018-08-21
  • 来自专栏半月无霜

    Gateway如何使用Nacos动态配置路由

    @Override public Flux<RouteDefinition> getRouteDefinitions() { try { String routeConfig List<RouteDefinition> routeDefinitionList = new ArrayList<>(); if (StrUtil.isNotBlank(routeConfig DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); routeDefinitionList = objectMapper.readValue(routeConfig

    1.1K10编辑于 2024-08-03
  • 来自专栏张志敏的技术专栏

    按需加载 AngularJS 的 Controller

    components/help/helpController'] } } }; }); $routeProvider 根据上面的定义进行初始化: if (routeConfig.routes = undefined) { angular.forEach(routeConfig.routes, function(route, path) { $routeProvider.when requirejs 加载 controller 脚本 resolve: loader(route.dependencies) }); }); } if (routeConfig.defaultRoute = undefined) { $routeProvider.otherwise({ redirectTo: routeConfig.defaultRoute }); } 手工注册 Controller

    1.8K10发布于 2020-08-10
  • 来自专栏张志敏的技术专栏

    Attribute Routing With ASP.net MVC 5

    要启用 Attribute Routing, 选中并打开 App_Start 目录中的 RouteConfig.cs ; 如下所示, 调用 MapMvcAttributeRoutes 方法。 RouteConfig.cs public class RouteConfig { public static void RegisterRoutes(RouteCollection routes id = UrlParameter.Optional } ); } } 代码要点 要启用 Attribute Routing ,必须在 RouteConfig.cs

    83610发布于 2020-08-10
  • 来自专栏漫漫全栈路

    ASP.NET MVC 路由详解

    这是项目中App_Star/RouteConfig.cs 中的默认路由信息,上面有几个关键词: 路由规则Route:需指定路由的格式,默认值,处理器 路由数据RouteData:当前请求上下文匹配路由规则而到的对象 可以看到,在Global中使用RouteConfig.RegisterRoutes(RouteTable.Routes);来注册路由。

    2.1K20发布于 2019-12-04
  • 来自专栏漫漫全栈路

    ASP.NET MVC学习笔记02控制器和路由

    默认路由表 默认路由表存放在App_Start/RouteConfig.cs 中。 ? 在RouteConfig.cs中,定义路由规则的格式如下: /[Controller]/[ActionName]/[Parameters] 路由的组成 如果应用程序并没有提供任何URL段的,默认为“Home 您还可以在RouteConfig.cs文件中,添加“Hello”的的路由,增加一条路由来传递name 和numtimes`。

    2.1K40发布于 2018-02-28
  • 来自专栏全栈程序员必看

    net mvc 设置启动页面「建议收藏」

    在项目的App_Start文件夹下的RouteConfig页面设置 public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute

    65220编辑于 2022-09-18
  • 2025年ASP.NET MVC应用场景面试题

    public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { 答案:在RouteConfig中定义自定义路由。 如何在ASP.NET MVC中使用过滤器(Filters)?

    21910编辑于 2025-11-14
领券