Disable Velocity view resolver in Spring Boot -


we use spring boot in our application along angularjs , html. use velocity email templates not view resolver.

@bean(name = "velocityengine") public velocityenginefactorybean velocityenginefactorybean() {     velocityenginefactorybean vefb = new velocityenginefactorybean();     properties p = new properties();     p.put("resource.loader", "class");     p.put("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.classpathresourceloader");     vefb.setvelocityproperties(p);     return vefb; } 

even though don't use velocity view resolver, following error due auto configuration:

error org.apache.velocity - resourcemanager : unable find resource 'loadlist' in resource loader. error org.apache.velocity - resourcemanager : unable find resource 'index' in resource loader.

i tried disable velocity auto configuration:

@configuration @componentscan @enableautoconfiguration(exclude = { datasourceautoconfiguration.class,velocityautoconfiguration.class }) @suppresswarnings("pmd") @enableasync public class application { 

also added following in application.properties file:

spring.velocity.check-template-location=false 

but i'm still getting above error. there anyway disable velocity view resolver alone?

i know question quite old, quite easy disable:

just add

spring.velocity.enabled = false 

to application.properties

source: http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -