Category "java"

Spring boot WebSecurityConfigurerAdapter basic authentication user password validation issue

I'm writing a simple REST API using Spring Boot and I want to enable basic authentication. Therefore I have used the WebSecurityConfigurerAdapter as shown below

Hibernate GROUP BY results in syntax error

My Hibernate query is: SELECT M.uid, P.userUid, COUNT(*) FROM PostXMentionsEntity M JOIN PostsEntity P GROUP BY M.uid, P.userUid ORDER BY COUNT(*) DESC where P

How to get Swagger UI in SpringBoot (404 error)

I'm trying to add Swagger UI to my REST Api but I can't find swagger ui path or there is a problem with it. Because when I check the paths where swagger ui must

bean creation error when starting spring boot application

When i try to run my spring boot application i get this Exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'conf

"Unable to find method ''void org.apache.commons.compress.archivers.zip.ZipFile.<init>(java.nio.channels.SeekableByteChannel)''"

The problem: I'm currently using Android Studio and Gradle to compile code from a github repository (00-Evan/shattered-pixel-dungeon) and while I can run some t

how to convert nested for loop in stream API for the program [closed]

List<Emp> list = Arrays.asList( new Emp(123, "ABC"), new Emp(123, "BCD"), new Emp(1243, "AUBC"),

Under which condition should I choose the JDK provider and its pros and cons? [closed]

May I know what are the JDK provider choices for Spring Boot if I am using Kotlin with Java 8 along with AWS EC2? I saw many providers out the

JFrame Isn't Closable Despite frame.setDefaultCloseOperation()

I am having a problem where the panel doesn't load in the JFrame and the JFrame itself doesn't set the default close operation, but performs setSize() and setVi

Could not resolve com.google.android.gms:play-services-location:16.+

guys, when I tried to run my application on real device but I found that error after upgrading to 1.22.2: Required by: project :app > project :locatio

2D Graphics and image won't show correctly

First of all, I have two class' GameGUI and paintCircle In paintCircle I'm drawing my circle on top of my JPanel image from GameGUI, but with the standard grey-

Subtracting two arrays (variables with decimals) [closed]

How to subtract the below two arrays in java? (09.34, 09.56, 09.00, 08.55 ) (17.25, 18.06, 17.55, 16.00)

SWRL Rules in Protege 5.5.0

I have 2 Classes(Agent and Penalty). Also, I have hasPoint(Penalty) and hasWeight(Agent) data properties. When I write this SWRL Rule, I got an error: Agent(?a)

Why can I not access class variables from onComplete in Flow API Subscriber

Using the Java Flow API. I have a chain of Processors and a terminal Subscriber. I have coded up Subscribers that have kept a count of items received that work

Inside spring-boot--application.yml- what can be the replacement for colon?

application.yml Pensions : Workplace-DPO: [email protected] I want Pensions : Workplace-DPO to be as key , but its treating DC Pensions to be as key . Quot

Grouping duplicates in CSV file and ranking data based on certain values

I have a CSV file like so - "user_id","age","liked_ad","location" 2145,34,true,USA 6786,25,true,UK 9025,21,false,USA 1145,40,false,UK The csv file goes on. I

Shutdown IdleConnectionReaper in AWS Java SDK v2

I'm using S3Client from Java SDK v2. to upload/download files from AWS S3 in a distributed web application. I had a problem with idle-connection-reaper daemon t

Spring cloud config server ssh to bitbucket problem

I'm trying to get the spring cloud config server connected to a bitbucket repo using ssh. I've found lots of posts about the key needing to be rsa format. I'v

Java: style compability tradeoff [closed]

I was wondering the other day about the compatibility and style of my Java code. As of Java 14, the enhanced switch has really become availabl

How to generate Random Number-String(Alpha-Numeric) from String with given Key

So far i need to generate 6 length random key from given string I assume given string is always unique. With that i cant to plain so i need to encrypt into some

How to capture the field values in the csv file using bufferedreader

The csv file looks like this I'm trying to get the field values like name, it is the value after $$NAME$$ (there is a space after the identifier). How do I st