What Spring Rest Annotation handles a page load event? -


i'm looking @ of spring rest annotations, want triggered when page loaded? of these, or else entirely. using rest model view whatever approach.

org.springframework.data.rest.repository.annotation.handlebeforesave (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.repositoryeventhandler (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handleafterdelete (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handlebeforerenderresources (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handleafterlinksave (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handlebeforelinksave (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handleaftersave (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handlebeforelinkdelete (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.restresource (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handlebeforedelete (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.convertwith (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handleafterlinkdelete (implements java.lang.annotation.annotation)     org.springframework.data.rest.repository.annotation.handlebeforerenderresource (implements java.lang.annotation.annotation) 

i need happen in java when page loads.

@repositoryeventhandler(myobject.class) public class myintuitobjecteventhandler {  com.intuit.ipp.data.myintuitobject[] mio;      @autowired     private myobjectrepository myobjectrepository;        @handleaftercreate     public void handlebeforecreate() {          logger.out("handle before create!");      }  } 

option #1: use request mapping when page. way called each time user makes request controller. example, each time user hit localhost:8080/yourapp/yourservice below method called.

@requestmapping(value="/yourservice", method=requestmethod.get) public string somemethod() { . . . }; 

option #2: make service call via client side ajax call on either of below events depending on need.

$(window).load(function() { . . .}); $(document).ready(function(){ . . . }); 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -