From c6972c05dcee19afb5725767f755a56f5162aee2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Oct 2021 22:52:14 +0300 Subject: Make popular feed equal to service user recommendations feed to have correct RSS feeds --- src/main/java/com/juick/config/WebConfig.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main/java/com/juick/config') diff --git a/src/main/java/com/juick/config/WebConfig.java b/src/main/java/com/juick/config/WebConfig.java index ccfa5f1e..fcc61b72 100644 --- a/src/main/java/com/juick/config/WebConfig.java +++ b/src/main/java/com/juick/config/WebConfig.java @@ -18,7 +18,9 @@ package com.juick.config; import com.juick.*; +import com.juick.model.User; import com.juick.service.HelpService; +import com.juick.service.UserService; import com.mitchellbosecke.pebble.PebbleEngine; import com.mitchellbosecke.pebble.extension.FormatterExtension; import com.mitchellbosecke.pebble.loader.ClasspathLoader; @@ -52,6 +54,8 @@ import java.nio.file.Paths; import java.util.Collections; import java.util.concurrent.TimeUnit; +import javax.inject.Inject; + /** * Created by aalexeev on 11/22/16. */ @@ -176,5 +180,14 @@ public class WebConfig implements WebMvcConfigurer { e.printStackTrace(); } } + + @Inject + private UserService userService; + @Value("${service_user:juick}") + private String serviceUsername; + @Bean + public User serviceUser() { + return userService.getUserByName(serviceUsername); + } } -- cgit v1.2.3