Category "java"

How to access cross-field values in QueryDSL QuerydslBinderCustomizer?

How can I access other query parameter values inside QuerydslBinderCustomizer? My goal is to create a departure.between(min, max) binding, that I want to derive

Unknown column sql error while using jooq

Query: this.dslContext.select( ROLE.asterisk(), multiset( select(PERMISSION.asterisk()) .from(ROLE_P

How to make GSON fail on unknown properties

I need GSON mapper to throw an exception if json contains unknown fields. For example if we have POJO like public class MyClass { String name; } and json l

Hibernate PessimisticLockingFailureException Occurring at a particular time everyday

I have a Spring Boot application and hibernate exception comes every day at a particular time at night. The exception is : could not execute statement; SQL [n/a

Common request/response objects between 2 SOAP webservices in Java

In my project we must call 2 contract first SOAP Web Services with identical Request/Response objects. As the web services were contract first, I created classe

How to combine rectangles?

I am working with the Java Swing library. I have two rectangles of the same width and height and the same coordinates. I want to combine them into one so I can

How to replace text for some properties using jolt

I'm using jolt in order to do some transformations, I've been able to do that but I'm having some issues trying to replace some text in some properties of my JS

Could not resolve all files for configuration ':app:androidJdkImage

I am trying to build flutter apk on debug mode from android studio. Flutter run I get this error: Launching lib/main.dart on sdk gphone x86 arm in debug mode...

Download pdf from restful web services

I am writing a rest service which will download the pdf when user access this service on users machine. below is the code of my controller class. When I tried

Java Heap Space error while writing a program for Square root of an Integer

I am trying to find out the square root of an integer, but in case the integer value is too large for instance - 2147395599. Then the following program gives th

Dynamically change data source connection at runtime in Spring Boot

I have a spring-boot application with one database. Now I would like to integrate the possibility to copy some data from this database to another database. The

Create multiple threads by extending Thread class that share same object in Java

I was going through basics of multithreading and was writing a program to understand the difference between using the 2 approaches of creating threads. I have r

How to add the username and passwords to a request in java spring

I'm currently trying to add security to my spring application and just want to know how can i add the credentials to the request so that it has the security acc

Is it possible to get the return value and method arguments from the same advice in Spring AOP?

Is it possible to get the return value and method arguments from the same advice in Spring AOP? I am trying to implement some login based on return value and th

Check user role in Thymeleaf using Webflux security

I have a Spring Security 5 Reactive Applications using the "@EnableWebFluxSecurity" annotation.For my frontend I am using Thymeleaf.Now I have the problem that

Hide system navigation bar when show DialogFragment

My app is in sticky immersive mode that the system navigation bar (I call it SNB) is hidden in running time of my app. It works well but exists one problem, it

eclipse is not using application.yml

application.yml server: port: 9001 application.properties server.port= 9001 code works when I use .properties file but when I am using .yml file no propert

How to separate files, number wise using regular expressions in java/shell?

I want to separate below numbers like as(00 to 04, 10 to 14, 20 to 24) 00000000000 00000000001 00000000002 00000000003 00000000010 00000000011 00000000012 00000

MS Graph SDK for Java failed to upload large Word files

We are having problem uploading large Office files (Word, Excel) to Teams using MS Graph SDK for Java. Just wondering if anyone experienced the similar issue. H

My HMACSHA256 signature validation almost works but not quite

I wrote a method that takes a JWT as a request and checks if the signature is valid. This is the unit test: @Test public void isValid() { final JwtValidator