hello guys i hope you’re doing well, I’m catching an exception (DataIntegrityViolationException) where the specified id can’t be deleted because it’s still in the parent entity. I want to know if there is any way to get that specified id from the caught exception. Answer DataIntegrityV…
Tag: spring
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. How can I solved Problem?
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. pom.xml 4.0.0 org.springframework.boot spring-boot-starter-parent 2.6.6 kodlamaio northwind 0.0.1-SNAPSHOT northwind Demo project for Spring Boot <java.version>11</java.versio…
Parametrized query request postgresql
I want to get data from my DB where is LocalDateTime equals to LocalDateTime in get request. Timeslot table code: Controller code: But when I did this request result in console is: org.postgresql.util.PSQLException: ERROR: syntax error at end of input. How do i change sql request code to fix this error? Shoul…
Why do I get a “io.jsonwebtoken.ExpiredJwtException”?
I have a problem with my Spring Security JWT Application. I am getting an error because my JWT is expired, but I can’t find, where it gets the 2022-04-12 as an expiration date. I can’t find a single piece of code, which says that the expiration date is the 2022-04-12. After my understanding, it is…
how to combine two List<Map> [closed]
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 10 months ago. Improve this question There are these two List<Map<String,Object>> in java List<Map<String,Obj…
Spring Security – How to mix xml and Java SecurityFilterChain declaration configurations?
Working on an application that was using XML Schema-based Spring configuration only, I’m slowly introducing Java based configuration. Unfortunately I’m not able to use Spring Security html xml element and Java based SecurityFilterChain configuration at the same time. When I inspect the filterChain…
Java Scheduler to Mail
Given that I have two scheduled component classes uploading files respectively. I created a sending email method for each of them in order to send a reminder email to myself in case any uploading exceptions happened. the flow like this: Scheduler One — if exception during uploading —> sending a…
Spring @Valid annotation not working as validating dto fields?
I have checked many other questions about it but I cannot find the solution, where am I missing ? Here is the controller method: And my dto is: My problem is (maybe @Valid is actually working I am not sure), when I debug it with the postman request: I am expecting some kind of message like “Id cannot be…
management.endpoint.health.group.readiness.include=* bug – Spring Boot Actuator
A bug in Spring Boot Actuator exists whereby if certain properties are used, management.endpoint.health.probes.add-additional-paths=true doesn’t work in exposing the readiness endpoint at /readyz and the liveness endpoint at /livez. You get a whitelabel error page. This application has no explicit mappi…
Hibernate 5 and JPA: select table without his children but maintain persistence on save
I have two models: Ordine and DettaglioOrdine. I would like that, when I save an object of type “Ordine”, hibernate also save his child “DettaglioOrdine” (and this works). But, if I do a select query, the query is very very slow because hibernate retrieve also DettaglioOrdine. So, I wo…