今天在配置Spring的时候出现了Element tx:attributesis not allowed here 只需要把该xml文章顶部的xmlns:tx="http://www.springframework.org/schema/cache"改为 xmlns:tx="http://www.springframework.org/schema/tx"即可解决问题