aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/main/java')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java
index d42549ef..7410648a 100644
--- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java
+++ b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java
@@ -8,10 +8,12 @@ import com.mitchellbosecke.pebble.loader.Loader;
import com.mitchellbosecke.pebble.loader.ServletLoader;
import com.mitchellbosecke.pebble.spring4.PebbleViewResolver;
import com.mitchellbosecke.pebble.spring4.extension.SpringExtension;
+import org.springframework.beans.factory.config.PlaceholderConfigurerSupport;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.env.Environment;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
@@ -41,6 +43,15 @@ public class NotificationsConfiguration extends WebMvcConfigurationSupport {
private ServletContext servletContext;
@Bean
+ public static PlaceholderConfigurerSupport propertySourcesPlaceholderConfigurer() {
+ PlaceholderConfigurerSupport configurer = new PropertySourcesPlaceholderConfigurer();
+
+ configurer.setFileEncoding("utf-8");
+ configurer.setOrder(1);
+ return configurer;
+ }
+
+ @Bean
RestTemplate rest() {
return new RestTemplate();
}