Search code examples
spring-mvcaspectjspring-roo

The Roo shell does not generate ITDs for my @RooConversionService


I have added the following class in my Roo app:

/**
 * A central place to register application converters and formatters.
 */
@RooConversionService
public class ApplicationConversionServiceFactoryBean extends FormattingConversionServiceFactoryBean {

    @Override
    protected void installFormatters(FormatterRegistry registry) {
        super.installFormatters(registry);
    }
}

I have registered the class as follows in webmvc-config.xml:

<mvc:annotation-driven conversion-service="applicationConversionService"/>

and in applicationContext.xml:

<bean class="com.bignibou.converter.ApplicationConversionServiceFactoryBean" id="applicationConversionService"/>

Note that I don't use JSP but Thymeleaf instead so that I have not run the "web mvc all" command at all and therefore I have no web Scaffolds.

Can anyone please tell me why the ITDs for the RooConversionService are not generated??


Solution

  • As you can read the in the Spring Roo Docs:

    "Roo will automatically maintain an ITD with Converter registrations for every associated entity that needs to be displayed somewhere in a view" (Page 97)

    This logically would mean that if you have no scaffolded views then Roo isn't governing the Conversion Service and you need to author and register these manually.