The code I have is this: It just requests HEAD, until first 6 requests are successful. Parallelization works here, but the problem is that after 1 of the requests is complete, it immediatley triggers next request (to maintain parallelization level of 6). What I need here is to have parallelization level of 6,…
Tag: spring
Does an unhandled runtime exception crash the whole server?
Will an unhandled runtime exception stop the whole server (i.e. Spring Boot application) or just the specific HTTP request ? It is true that an unhandled runtime exception will instantly shut down normal Java application, right ? Answer Will an unhandled runtime exception stop the whole server (i.e. Spring Bo…
The dependencies of some of the beans in the application context form a cycle in Spring Batch
I’m working on a simple Spring Batch application, and when I finished configuring it, I found that problem: The dependencies of some of the beans in the application context form a cycle: jobRestController defined in file [/home/yassine/Downloads/demo/target/classes/com/example/demo/JobRestController.cla…
Spring Data cosmos @Transactions support
With Azure Cosmos DB transactional batch support available for Cosmos Java SDK 4.7.0, Does Spring Data Cosmos allows transactional operations? I went through Spring Data Cosmos Github Documentation, but didn’t find a reference. Need help if there is a way to implement transaction batch operations via sp…
Executing Spring AOP aspects for annotations aliased with @AliasFor
The idea is to create annotations hierarchy (similar to @Service, @Component etc) using @AliasFor annotation. This should give me the possibility to define aspect, that would execute on parent annotation, and every alias of it. But somehow it doesn’t work for me. @ComponentScan is fine, @EnableAspectJAu…
Spring Boot Hibernate Many To One not saving joinColumn result
I’m trying to store images in MySQL using Spring boot, I have a user entity and I want to create a Many To One relationship between my FileUpload entity. I’m using react on the front end and the purpose of this upload service is to have profile pictures that a user can set themselves but I’d…
Redirect to another page with @RequestBody
I’m struggling with something. i pass JSON data to my controller In my RestController, i handle this information like this saving the JSON elements into the object myRequest. The thing is, having @RequestBody forces me to stay in that JSP, but i want to after processing this information, redirects to an…
Can’t use any kind of SessionListener when using Spring Security in Spring Boot
I have a very basic Spring Security setup using Session. My problem is that I can’t find a way to use any kind of Session Listener (both Spring and Servlet API versions) to listen to SessionCreated event. Login is working and session is being created properly. The reason I need a listener is because I w…
How to design two seperate authorization/authentication configurations in spring boot?
I want to implement authentication and authorization for spring boot application with this design: First group of endpoints (“/api/**) will have authorization by passing the api-secret-key through requests headers. Authentication should be permitted for all. Second group (/admin/**) will have authentica…
Having problems trying to test functionality that contains autowired SprngBoot with junit 5
I want to test some functinality, a service with a repo that is autowired in. I dont want to mock the autowired, this is more a integration test for debugging. My test is as follow The code is very simple The problem is that throttleRateRepository is always null. I have managed to test this sort of code befor…