E
E
Egor Petrov2018-06-06 09:26:40
Java
Egor Petrov, 2018-06-06 09:26:40

How to change bean configuration options when @EnableAutoConfiguration?

I'm trying to get the de.chandre.velocity2.spring component to work on spring-boot 2.0.2. Can't see my views.
You need to somehow change the resource.loader = class parameter.
My application:

package com.test.my.web;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableAutoConfiguration
@ComponentScan({
    "com.test.my.web",
    "de.chandre.velocity2.spring",
})
public class App {
  public static void main(String[] args) throws Exception {
        SpringApplication.run(App.class, args);
    }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2018-06-06
@zolt85

Read the doc

E
Egor Petrov, 2018-06-06
@chel1

It turns out that in application.properties you need to specify velocity.properties.resource.loader = class

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question