Created
May 30, 2020 18:11
-
-
Save prashant4224/f53698c49efe7dfcdf6abd30f2cd6c7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class RequestManager{ | |
@Autowired | |
private RequestHandler requestHandler; | |
public void handleRequest(){ | |
requestHandler.handleRequest(); | |
} | |
} | |
import org.springframework.context.annotation.Scope; | |
import org.springframework.context.annotation.ScopedProxyMode; | |
import org.springframework.stereotype.Component; | |
@Component | |
@Scope(value = "prototype", proxyMode = ScopedProxyMode.TARGET_CLASS) | |
public class RequestHandler { | |
RequestHandler(){ | |
System.out.println("In Request Handler Constructor"); | |
} | |
public void handleRequest(){ | |
System.out.println("Handling request"); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment