Skip to content

Tag: spring-boot

Spring Boot session scoped bean

I am trying to understand how the Session scoped bean work and have tried the example from here. HelloMessageGenerator.java HelloMessageBean.java HelloMessageController.java When I go to http://localhost:8080/scopes/session I get an error. scopesExample.html The error I am getting is as if the mapping would n…

Spring AOP and AspectJ on same method

I have a question about using aspectJ and spring aop method intercepting. I created 2 annotations: @AJTest and @SAOPTest. registered it and other and register it and added it to my method in controller Application class but when i call it by http://localhost:8080/test?firstParam=test&secondParam=2 i can&#…

Spring boot how to use @PostConstruct correctly

Spring boot 2.5.4 I used @PostConstruct for the very first time in my service class. As following:- This method is called as soon as app launched. That is my requirements to process all file as soon as the app starts. I have controller as following:- My app starts on port 8080 and no exception at all. But whe…

Uploading files to S3 in Multithreading

I’m uploading files to s3 using the s3 AWS client in my spring application, but sometimes I’m getting the error, So as a solution to this I used the following approach and it worked for now. I have created this as a Spring Bean. But I am using this in a multithreading environment. So there will ma…