diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java index 94c6213..e052208 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java @@ -6,6 +6,7 @@ import org.ntlab.acanthus_server.utils.Base64Decode; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; import javax.ws.rs.*; @@ -17,13 +18,14 @@ // @Component @Path("/gallery") -public class StrokesRest { +public class StrokesRest implements ApplicationContextAware { private final Gallery gallery = Gallery.getInstance(); private int srstrokeSize=0; private int srstrokeNo=0; private ApplicationContext applicationContext; + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; }