---
title: "struts2 2.5使用通配符"
author: "daoshud1"
date: "2016-08-29T15:28:37Z"
tags: []
categories: ["企业架构"]
slug: "struts2-2-5"
draft: false
lastmod: "2016-08-29T15:28:37Z"
id: 2321458
url: "https://daoshud1.iteye.com/blog/2321458"
---

在Struts2中，关于Action使用最多的就是通配符，在2.5以前通过配置Struts.xml文件即可正常使用通配符，但是升级到2.5以后，始终报404找不到Action。
通过查询，Struts2 2.5中默认是不开启通配符，需要将strict-method-invocation设置为false

```java

<package name="default" namespace="/" extends="struts-default" strict-method-invocation="false">
</package>

```