---
title: "interceptor获取@PathVariable参数值"
author: "chembo"
date: "2015-08-31T16:50:26Z"
tags: []
categories: ["编程语言"]
slug: "interceptor-pathvariable"
draft: false
lastmod: "2015-08-31T16:50:26Z"
id: 2239730
url: "https://chembo.iteye.com/blog/2239730"
---

```
Map pathVariables = (Map) request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
String appId = (String)pathVariables.get("appId");
```