English 中文(简体)
Struts 拼图到 拨牌迁移 - 春季支持班的变化
原标题:Struts tiles to Tiles migration - Changes in Spring support classes

当我试图在我的网络应用程序中将 Spring 由2.1 版本升级为 Spring 3.0.x 时,这种情况就出现了。 Spring 3.0.x 不支持 struts-tiles 1. 3, 它需要 Apache Tiles 2.x。 因此, 我还必须将 Struts-Tiles 1. 3 升级为 Apache Tiles 2.x。 Apache 瓷砖有这个 < a href=> http://tiles.apache.org/2.2/framework/migration/index.html% 5D" rel= “nofollow” > 移民指南 < 帮助我做这个努力。 然而, 我似乎在移民指南中没有提到的这个问题上撞上了一道墙。 以下是细节 :

这是我们用过的瓷砖建筑

<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles.TilesConfigurer">
        <property name="factoryClass">
            <value>org.apache.struts.tiles.xmlDefinition.I18nFactorySet</value>
        </property>
        <property name="definitions">
            <list>
                <value>/WEB-INF/tiles-defs.xml</value>
            </list>
        </property>
</bean>

由于此类 tules.tilesConfifectr 在 Spring 3.0.x 中被折旧, 我更改为使用 org.springframework.web. servlet.view.teles2.TillesConfifectr

tiles2. TilesConfiforpr 没有一种 set FactoryClass (.) 方法, 不同于瓷砖。 TilesConfiforpr, 它现已被折旧。 因此, 我的豆类初始化失败 。

我查了 telesconflictr < a href=> http://static.spring/docs/3.0.x/javadoc-api/org/springframework/web/servlet/view/teles2/TilesConfiforpr.html" rel= "nofolp" > api ,它现在有方法, sse Defriminations FactoryClass (.) se> set PreparerFatoryClass (.) 。 我不仅无法确定其中哪一个相关内容, 我还可以找到一个等效的代码的类。 org.apache. strutts.xmlDefintion.I18n FatoriveSet

任何指示都会感激不尽

最佳回答

Tiles社区的一名绅士给出了解决方案。您可以在2012年5月的 Apache Tiles 用户列表档案中找到线索。

工厂 Class org. apache.struts. files. xmlDefification. I18n FactorySet 是在 2.2. 的框中支持的。 因此,我们不需要给新的瓷砖2. TillesConfigmer 类注入任何特殊的东西。 最后的 XML 元素会是这样的 。

<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
        <property name="definitions">
            <list>
                <value>/WEB-INF/tiles-defs.xml</value>
            </list>
        </property>
</bean>

所以,移走地产就是这个把戏

问题回答

暂无回答




相关问题
array dependency injection in spring?

is there a way to use dependency injection to inject all available implementations of a specific interface in spring? This is kind of the same thing as asked here for .NET. Though my aim is to use @...

Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

How can I determine Objects in application context?

I am trying to write a portlet for Liferay (using Tomcat and Spring) and need to use a database via Persistence API/Hibernate. I am using some configuration XMLs (applicationContext.xml, etc.) and ...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured ...

热门标签