Skip to content
Snippets Groups Projects
Commit 0542cce9 authored by OZGCloud's avatar OZGCloud
Browse files

remove tomcat from pluto

parent 0a8251a5
No related branches found
No related tags found
No related merge requests found
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
......@@ -32,15 +30,18 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
......
......@@ -71,9 +71,14 @@
<groupId>net.devh</groupId>
<artifactId>grpc-client-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
......
package de.itvsh.ozg.pluto;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
@Configuration
public class BeansConfig {
@Bean
FreeMarkerConfigurer freeMarkerConfigurer() {
FreeMarkerConfigurer freeMarkerConfigurer = new FreeMarkerConfigurer();
freeMarkerConfigurer.setTemplateLoaderPath("classpath:/templates");
freeMarkerConfigurer.setDefaultEncoding("UTF-8");
return freeMarkerConfigurer;
}
}
......@@ -19,7 +19,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Service;
import org.springframework.util.MimeTypeUtils;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
import de.itvsh.kop.common.errorhandling.TechnicalException;
import de.itvsh.ozg.mail.email.MailSendRequest;
......@@ -30,6 +29,7 @@ import de.itvsh.ozg.pluto.command.PersistedCommand;
import de.itvsh.ozg.pluto.vorgang.Vorgang;
import de.itvsh.ozg.pluto.vorgang.VorgangService;
import de.itvsh.ozg.pluto.vorgang.redirect.Forwarding.Status;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
......@@ -65,7 +65,7 @@ public class ForwardingService {
private ForwardingRepository repository;
@Autowired
private FreeMarkerConfigurer freemarkerCfg;
private Configuration freemarkerCfg;
@Autowired
private ZipBuilderService zipService;
......@@ -258,7 +258,7 @@ public class ForwardingService {
Template getTemplate(String templateName) {
try {
return freemarkerCfg.getConfiguration().getTemplate(templateName);
return freemarkerCfg.getTemplate(templateName);
} catch (IOException e) {
throw new TechnicalException("Error loading mail template", e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment