Skip to content

Tag: spring

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&#…

auto changing data with Hibernate

I have problem with Hibernate. I have next method: This method should assign user on task and send message to kafka consumer with TaskBeforeUpdate and TaskAfterUpdate. But I have problem when I try to assign user, my BeforeUpdateTask change all his fields to TaskAfterUpdate. And this dont work, but i dont kno…

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…