---
title: "自定义spring schema 找不到xsd文件问题"
author: "javis163"
date: "2012-09-15T12:12:03Z"
tags: ["spring-xmlbeans"]
categories: ["互联网"]
slug: "spring-schema-xsd"
draft: false
lastmod: "2015-03-05T18:12:39Z"
id: 1679062
url: "https://javis163.iteye.com/blog/1679062"
---

自定义spring的schema非常不爽，要写namespacehandler、parser，还要定义xsd、配置schemas。

改了xsd定义还要改java代码，用placeholder能稍微灵活点。

 

建议用spring-xmlbeans来做自定义的spring schema配置，基本可以做到，不需要写namespacehandler、parser，

使用比较自然的方式写配置文件，跟实际的类结构一致即可。Schema变化时，最简单。

[http://geronimo.apache.org/xbean/custom-xml.html](http://geronimo.apache.org/xbean/custom-xml.html)