When I run “gradle build”, it generates a build/libs/project-version.war file which is able to run by itself with “java -jar” command. But when I run “gradle artifactoryPublish”, it saves on the artifactory repository a “project-version-plain-war” file which doe…
Tag: java
Spring jpa repository returns the entity class instead of the dto interface
I am using Spring data jpa in the backend codes. I have included entities, dto interfaces, service and jpa repository codes. Now the issue is that when I call getAllTopics() in the TopicService. It returns a list of Topic object instead of TopicDto. Topic object includes a list of examples which I do not incl…
Getting a key/keys from ReactiveRedisOperations always return empty result
I am migrating my traditional Redis cache to the Spring Data Reactive Redis. After migration I would like to test if my new integration works as expected but I faced a problem with getting key/keys from particular Redis Db, namely: My redisConfiguration class looks like this: My “test” class looks…
change offset without changing local time
I have a date that is in IST format. Which is something like the I have the following code for the above output startOfDay is just and extenstion function which is something like this But, what the backend really wants is in the below format with -8:00. Is there any way I can format it to have -08:00 in the
Set Xmx and Xms for java application running on k8s
I’ve an application running on k8s and would like to updated the java heapsize . I’ve updated the JAVA_OPTS environnement variable and set it in the deployment file as below but when i run the below command it looks like my changes does not takes effect I’m i wrong can someone help me and ex…
How to edit configmap configuration in spring boot kubernetes application during runtime
We have application with huge configuration (this is just a part): I follow this example to bind configmap with spring boot configuration but there is still some problem for example how to solve null in yaml which spring yaml postprocessor resolve as empty string: issue second problem is how to handle this co…
Optaplanner – spring BeanCreationException
I’m migrating Optaplanner from v7.x to v8.14 on a project that uses spring-boot (as a web api). I’ve added the optaplanner-spring-boot-starter dependency to the project, however when starting the application, I got the following error : The project is in two separated modules, one with everything …
Lines on printout of iText7 PDF have different length on paper
Only some of our testers report a strange look of all lines on the printout of an iText7 generated PDF (see image). The generated PDF looks perfect and the flaw only appears on paper. Most users have no issue, whatsoever. Any suggestions regarding known issues of printers, drivers or hints on how to reproduce…
Does JPQL support the use of a boolean result in another expression?
I am trying to write a query to back a search API. Specifically for a flag searchDrafts – if the flag is true I have to get rows with status DRAFT and else I have to get all rows that have any status other than DRAFT. In regular SQL, the below query works fine: However, a similar thing in JPQL
flatMap reuse response from reactive call
Currently, I have a question, something like this: User X Y The question is how do I reuse correctly the “user” and the “x” response from the previous call? Here are my solutions for marked(*) place: nested flatMap(), then can thenReturn(user) for next map(). Any issue with the scope o…