From df103dc28bf3d7c9b319c9e6955cd4f4c3c989be Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 5 May 2011 23:55:04 +0200 Subject: [PATCH] CacheControll-Logik in ein eigenes (separat verwendbares) Modul ausgelagert --- pom.xml | 2 +- {web => utils/cachecontrol}/pom.xml | 14 ++++--------- .../cachecontrol/CacheControlInterceptor.java | 6 +++--- .../utils/cachecontrol}/Cacheable.java | 2 +- utils/pom.xml | 21 +++++++++++++++++++ 5 files changed, 30 insertions(+), 15 deletions(-) rename {web => utils/cachecontrol}/pom.xml (81%) rename web/src/main/java/de/halbekunst/fotos/web/interceptors/CachingInterceptor.java => utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol/CacheControlInterceptor.java (97%) rename {web/src/main/java/de/halbekunst/fotos/web/interceptors => utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol}/Cacheable.java (99%) create mode 100644 utils/pom.xml diff --git a/pom.xml b/pom.xml index b837bd96..7fa47c45 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ - web + utils diff --git a/web/pom.xml b/utils/cachecontrol/pom.xml similarity index 81% rename from web/pom.xml rename to utils/cachecontrol/pom.xml index 85e5bb42..ea6d6da1 100644 --- a/web/pom.xml +++ b/utils/cachecontrol/pom.xml @@ -6,31 +6,25 @@ de.halbekunst - fotos + utils 1.0-SNAPSHOT - - fotos-web - jar - Fotos - Webanwendung - + ${pom.parent.artifactId}-cachecontrol + Utils - CacheControl - + org.springframework spring-webmvc ${springframework.version} - - javax.servlet servlet-api ${servlet-api.version} provided - diff --git a/web/src/main/java/de/halbekunst/fotos/web/interceptors/CachingInterceptor.java b/utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol/CacheControlInterceptor.java similarity index 97% rename from web/src/main/java/de/halbekunst/fotos/web/interceptors/CachingInterceptor.java rename to utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol/CacheControlInterceptor.java index 00b093e3..54a14de0 100644 --- a/web/src/main/java/de/halbekunst/fotos/web/interceptors/CachingInterceptor.java +++ b/utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol/CacheControlInterceptor.java @@ -1,4 +1,4 @@ -package de.halbekunst.fotos.web.interceptors; +package de.halbekunst.utils.cachecontrol; import java.util.Date; import java.util.HashMap; @@ -15,8 +15,8 @@ import org.springframework.web.servlet.ModelAndView; * * @author kai */ -public class CachingInterceptor implements HandlerInterceptor { - private final static Logger log = LoggerFactory.getLogger(CachingInterceptor.class); +public class CacheControlInterceptor implements HandlerInterceptor { + private final static Logger log = LoggerFactory.getLogger(CacheControlInterceptor.class); public static final String HEADER_DATE = "Date"; public static final String HEADER_CACHE_CONTROL = "Cache-Control"; diff --git a/web/src/main/java/de/halbekunst/fotos/web/interceptors/Cacheable.java b/utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol/Cacheable.java similarity index 99% rename from web/src/main/java/de/halbekunst/fotos/web/interceptors/Cacheable.java rename to utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol/Cacheable.java index 7cbb9433..c9f43d85 100644 --- a/web/src/main/java/de/halbekunst/fotos/web/interceptors/Cacheable.java +++ b/utils/cachecontrol/src/main/java/de/halbekunst/utils/cachecontrol/Cacheable.java @@ -1,4 +1,4 @@ -package de.halbekunst.fotos.web.interceptors; +package de.halbekunst.utils.cachecontrol; import java.util.Map; diff --git a/utils/pom.xml b/utils/pom.xml new file mode 100644 index 00000000..1feaad13 --- /dev/null +++ b/utils/pom.xml @@ -0,0 +1,21 @@ + + + + 4.0.0 + + + de.halbekunst + fotos + 1.0-SNAPSHOT + + + utils + Utils + pom + + + cachecontrol + + + -- 2.20.1