Commit 595277ea authored by Matija Obreza's avatar Matija Obreza

Removed syserr printouts, buildNumber is back!

parent 6ceff243
......@@ -514,18 +514,18 @@
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
<detail>true</detail>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.2</version>
<version>1.3</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
<goal>create</goal>
</goals>
</execution>
</executions>
......
......@@ -65,7 +65,6 @@ public class OAuth2AuthorizationCodeServiceImpl implements OAuth2AuthorizationCo
@Override
@Scheduled(fixedDelay = 600000)
public void removeExpired() {
System.err.println("SCHEDULED TASK EXECUTED 2");
final Date olderThan = new Date(new Date().getTime() - 600000);
LOG.debug("Removing OAuth verification codes from before: " + olderThan);
final int count = oauthCodeRepository.deleteOlderThan(olderThan);
......
......@@ -138,7 +138,6 @@ public class OAuth2JPATokenStoreImpl implements JPATokenStoreCleanup, JPATokenSt
@Override
@Scheduled(fixedDelay = 50000)
public void removeExpired() {
System.err.println("SCHEDULED TASK EXECUTED");
final Date olderThan = new Date(new Date().getTime() - 600000);
LOG.debug("Removing OAuth access tokens from before: " + olderThan);
final int countAccessTokens = accessTokenPersistence.deleteOlderThan(olderThan);
......
......@@ -20,9 +20,11 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
@Component
public class AddStuffInterceptor implements HandlerInterceptor {
@Value("${build.name}")
......
......@@ -24,6 +24,7 @@ import java.util.Set;
import org.genesys2.spring.AddStuffInterceptor;
import org.genesys2.spring.BetterSessionLocaleResolver;
import org.genesys2.spring.validation.oval.spring.SpringOvalValidator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
......@@ -53,6 +54,9 @@ public class SpringServletConfig extends WebMvcConfigurerAdapter {
@Value("${theme.defaultThemeName}")
private String defaultThemeName;
@Autowired
private AddStuffInterceptor addStuffInterceptor;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
......@@ -87,7 +91,7 @@ public class SpringServletConfig extends WebMvcConfigurerAdapter {
registry.addInterceptor(localeChangeInterceptor);
registry.addInterceptor(themeChangeInterceptor);
registry.addInterceptor(new AddStuffInterceptor());
registry.addInterceptor(addStuffInterceptor);
}
@Scope("singleton")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment