Category "java"

Hibernate Jpa: update on @Embeddable table generates a query using the wrong table which @Embedded

I have the database tables Person and Details. Details are intended to carry the miscellaneous fields for the Person using the foreign key PERSON_ID. JPA code h

Swagger - How to hide request fiends on API wise, for same input model?

Using Swagger with SpringBoot implementation "org.springframework.boot:spring-boot-starter-web:2.6.7" implementation "org.springdoc:springdoc-openapi-ui:1.6.8"

Serializing multiline string from JsonNode to YAML string adds double quotes and "\n"

I have a YAML string where one of the attributes looks like this: description: | this is my description //imagine there's a space after description th

How to cache token with Microsoft Graph for Java

I am using Microsoft Graph SDK for some requests however everytime I perform a GET request it does another request to get a token. I've tried reading documentat

Chromedriver Selenium getting 'Connection Reset' when versions match

I am using chromedriver but am sometimes getting the following errors: 03:34:09.188 [AsyncHttpClient-1-2] WARN org.openqa.selenium.remote.http.WebSocket - Conne

In Java, how do you deal with double quote inside of a CSV that you need to parse

here is what I want to do, This my spend.csv file : "Date","Description","Detail","Amount" "5/03/21","Cinema","Batman","7.90" "15/02/20","Groceries","Potatoes",

Issue while getting custom message from @email annotation Spring Boot

I'm trying to get the message from my @Email annotation for my front-end . The issue is that it doesn't actually pass and I get an empty response. Nothing gets

How to put class field into method argument to avoid code repeat

I am currently solving this issue. For example. I have two classes. One for item and second for some kind of records of these items. What I need to do, if I wan

Boolean Supplier Java wait until condition is true

I am trying to get to wait until there exists the condition (theOne, that I am waiting for) in the list of areHere. I am trying to work with BooleanSupplier but

Error creating bean with name 'securityConfig': Requested bean is currently in creation:

package ro.contabilitateexpert.AccountExpert.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotati

Print to a specific point in the terminal

I have a method that prints an upload progress like this: 36% [=================> ] 210,81 KB/s To rewrite the line,

The intellij idea takes up a lot of Ram [closed]

The intellij idea takes up a lot of RAM, is there a way we can reduce the program size?

Do I have to use @Payload spring annotation to read Kafka message

Spring for Apache Kafka 2.8.4 under https://docs.spring.io/spring-kafka/reference/html shows some of the listener methods with @Payload annotation next to the m

SpringBoot: Enabling WRAP_ROOT_VALUE feature using custom Jackson2ObjectMapperBuilder shuts off Swagger3

I've read many articles/threads and what not about how to enable Jackson's WRAP_ROOT_VALUE feature in SpringBoot (v2.2.2RELEASE) and none of them really work, u

In a Java interface, is there a way to return an enum nested in a generic type?

I'm looking for a way to return an Enum type nested in a Generic class. Here's what I mean: public interface MapperClass<E, D> { D entityToDto(E enti

How to run a Java download command using shell in ansible

I want to download and install Java in one our VMs using Ansible. I tried with yum and that was successful but, as part of requirement I was asked to do it anot

Why the data resets after save in database?

I'm trying to save new phone number in database First by another method get phone number and temporary save it and send a code to user then by following methods

Execution failed for task ':app:checkDebugDuplicateClasses '

Task failed with an exception. What went wrong: Execution failed for task ':app:mergeDebugNativeLibs'. Could not resolve all files for configuration ':app:debu

Fixing of Java.lang.IllegalStateException: No active conversation found. at com.rapidclipse.framework.server.jpa.Jpa.getEntityManager(Jpa.java:200)

I have a running RapidClipse X Project, in which I work with a MySQL Database. I created a class to copy data from one table into a second table. For this I use

How do you check if the Second Dimension of a 2D array is null?

Lets say for example you have a 2D Array field[60][]. How exactly can you check if the second part of the Array is null? Is there any way to do something simili