Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 12 months ago. Improve this question Currently I am using Postman with POST and GRAPHQL type queries. I wish I could query the …
Tag: spring-boot
RedisTemplate mock is only working in the test class
Class B Now when I am writing the test for method in class B i.e. someMethod(). I have observed that the redis template mock is generating in test class but not in Class A and class B Inside ClassBTest Inside class B Why is the mock not working in class B and A ? Answer My issue is resolved now.
Unable to Parse header from github CSV URL using Apache Commons
I’m trying to access the header values for each record which is present in CSV file url from github using Apache commons csv library. This is my code: When i run the application i’m getting this error: Answer You should not read line by line if you want to read first line as header because the Apa…
400 Bad Request when using Spring Boot
I am sending a Http POST request to my RESTful API build with Spring Boot and get the “400 Bad Request” response. My POST request is made with Postman, send to with the body I want to pass the filename variable to my Java Method. My RESTful api is build in Java with Spring Boot I tried with and wi…
Fetching to substring before operator from a dynamic string
I have a string like “name = mita and salary> 10000” . Out of which I need to get only name and salary attribute.I am going to have dynamic string on which i need the attribute before operator only. Like here I need to fetch name and salary attribute which r before = and > operator. I can ha…
How right to send Flux or Mono to template (Freemaker)
I got from my repository Flux and in my controller I want to send it to my template. my controller: I getting error in my Freemarker’s template : reemarker.core.InvalidReferenceException: The following has evaluated to null or missing: ==> user Answer Question is, what do you need to call in Java to …
Spring:- What is the difference between ref attribute and ref tag?
I am pretty new to spring and have been learning from the official docs. I found that to inject a dependency using XML configuration, there are two ways to declare refs:- Or, I can use the ref tag, like:- Is there any difference between the two ref declarations? If not, why does spring allow two different met…
Multiple RestTemplate calls for each Id in a List
I need to make multiple RestTemplate calls for each of the Id in a List<Ids>. What is the best way to perform this? I have used parallelStream(). Below code snippet is a similar scenario. employeeService.fetchEmployeedetails is a kind of restCall which will fetch all the employeeDetails. Is there any ot…
Why spring-boot-starter-data-jpa 2.5.0 can not init data by the cause “table not found”?
I have 2 projects using the same H2 configurations: The first project used spring-boot-starter-data-jpa 1.5.8.RELEASE which can init data successfully. But the second one used spring-boot-starter-data-jpa 2.5.0 CAN NOT init data: Trace the log I have seen that the init data sql is run before the db structure …
logback don’t log exception into file which throwed from an ThreadPoolTaskExecutor pool thread
I’ve got an wired problem, that seems like the logback only print my Exception stack trace on the console,rather than log it into an log file. The following is my experiment codes, I used an spring boot test with two thread pool,which simulating my production codes.Both thread print a log and throws an …