Skip to content

Add mvc:annotation-driven Tiles Configuration [SPR-6556] #11222

@spring-projects-issues

Description

@spring-projects-issues

David Winterfeldt opened SPR-6556 and commented

Have mvc:annotation-driven setup the Tiles with some basic defaults. This can setup TilesConfigurer and the Tiles view resolvers.

<mvc:annotation-driven tiles="true" />

OR

<mvc:annotation-driven>
    <mvc:tiles definitions="/WEB-INF/tiles-defs/templates.xml" />
</mvc:annotation-driven>

<mvc:annotation-driven>
    <mvc:tiles definitions="/WEB-INF/tiles-defs/templates.xml" viewClass="org.springbyexample.web.servlet.view.tiles2.DynamicTilesView" />
</mvc:annotation-driven>

Standard Config


<bean id="tilesConfigurer"
      class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
      p:definitions="/WEB-INF/tiles-defs/templates.xml" />
 
<bean id="tilesViewResolver"
      class="org.springframework.web.servlet.view.UrlBasedViewResolver"
      p:viewClass="org.springbyexample.web.servlet.view.tiles2.DynamicTilesView"
      p:prefix="/WEB-INF/jsp/"
      p:suffix=".jsp" />

Affects: 3.0 RC3

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions