I trying to use Freemarker Templating Engine to send html formatted emails.
I had to do this in several services.
In one service, freemarker is working fine, but not in another one.
But the code, relevant for freemarker, is actually the same.
The autowiring of 

```
@Autowired
private Configuration freeMarkerConfig;

```

is not working in one service, but in another.
The autowiring appears in an hierachy (e.g. controller autowires service, service autowires a mailservice, mailservice autowires another component, which autowires freemarker...
I cant figure out how to solve this.
The error stacktrace: 

```
Exception encountered during context initialization - cancelling refresh attempt: 
  org.springframework.beans.factory.UnsatisfiedDependencyException: 
  Error creating bean with name 'userController': 
    Unsatisfied dependency expressed through field 'userService':
  Error creating bean with name 'userService':
    Unsatisfied dependency expressed through field 'mailService':
  Error creating bean with name 'mailServiceImpl': 
    Unsatisfied dependency expressed through field 'mailMessages': 
  Error creating bean with name 'mailMessages': 
    Unsatisfied dependency expressed through field 'freeMarkerConfig': 
    No qualifying bean of type [freemarker.template.Configuration] found for dependency [freemarker.template.Configuration]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [freemarker.template.Configuration] found for dependency [freemarker.template.Configuration]: expected at least 1 bean which qualifies as autowire candidate for this dependency. 

```

As I am using spring-boot 1.4.0, there's no need to provide more configuration, or am I wrong ? So i dont have any further xml nor java configuration for freemarker.. I didnt configured it, as there was no need to configure anything in other services, where I use freemarker.