Browse Source

UrlTemplateResolver: Add TTL configuration

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.3-alpha
Pekka Helenius 4 years ago
parent
commit
d568620060
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java

+ 5
- 1
bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java View File

@ -59,8 +59,12 @@ public class BookstoreApplication extends SpringBootServletInitializer {
public UrlTemplateResolver urlTemplateResolver() { public UrlTemplateResolver urlTemplateResolver() {
UrlTemplateResolver urlTemplateResolver = new UrlTemplateResolver(); UrlTemplateResolver urlTemplateResolver = new UrlTemplateResolver();
urlTemplateResolver.setCacheable(true); urlTemplateResolver.setCacheable(true);
// TTL value in milliseconds
urlTemplateResolver.setCacheTTLMs(120000L);
urlTemplateResolver.getCharacterEncoding(); urlTemplateResolver.getCharacterEncoding();
return urlTemplateResolver;
return urlTemplateResolver;
} }
@Bean @Bean


Loading…
Cancel
Save