---
title: "关于struts2无法加载struts.properties的问题"
author: "plane"
date: "2009-09-25T17:52:09Z"
tags: []
slug: "struts2-struts-properties"
draft: false
lastmod: "2009-09-25T17:52:09Z"
id: 477463
url: "https://plane.iteye.com/blog/477463"
---

<http://blog.chinaunix.net/u/20045/showart_712429.html>

最近整合了struts2和spring的问题，其中看到一个struts2的文档中写得使用struts2的ioc时要在项目下加载struts.properties.它的内容是:

        struts.objectFactory = spring

但是我加入了该文件之后发现了下面得错误


严重: Exception starting filter struts2
Cannot locate the chosen ObjectFactory implementation: spring - 

出现这个错误的原因是项目中少了struts2-spring-plugin-2.0.6.jar包，加上该包就没问题了。