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

Removed syserr printouts, buildNumber is back!

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