Category "java"

rename maven jar-with-dependencies

My plugin section in the pom file looks like this: <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.

How do you disable the auto generated pages /login and /logout using Spring SAML2?

I am using Spring Boot - 2.6.6 and Spring Security - 5.7.0-M2 with the spring-security-saml2-service-provider library to create a SAML service provider applicat

GetMapping endpoint for a button which takes inputs from 2 text fields

I have a basic html page with 2 textboxes and a button. I need to make the button respond after the entries in the textbox The body of the html looks like this

How to make visible a element when the RecyclerView is loaded?

I'm making an social app and I want to implement a system where when you click on the comment button a Input dropdown... The problem is that it doesn't matter w

Access nested class list from outer class

I have a class that has a static nested class with two lists. And one of the functions within the outer class has the return type of this nested class. And this

How do I share an object between two or more WebSocket controllers in Spring Boot?

I have two controllers, namely ControllerA and ControllerB. In ControllerA I have an object (a HashMap) which maps principal names for connected users to their

How can I bring the PAHO/Eclipse MQTT Android Service into an Android Studio Project

I am simply not able to bring the PAHO / Eclipse MQTT Android Service into an Android Studio project. The PAHO documentation advises you to add this line to app

how to replaceOne document in MongoDb with Mongo database command

We have requirement to execute replaceOne operation with db.runCommand() I checked list of commands from here, but i haven't found any command to replace one do

Understanding Wait in Thread Java

I have the following code:- class ThreadB extends Thread { int total; @Override public void run() { synchronized (this){ for(int i=

Is Record feature in Java 16 an alternative to builder classes?

Records provide immutability to an object, so does builder pattern. what are pros and cons of using record in place of builder?

How to convert circular linked list into singly linked list

First, I make circular linked list that look like 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> (head) Now, I am trying to convert this circular linked list

Multiple issues in Log4J Upgrade for old Java Servlet ( Struts ) based application

Current Situation Java Application development version: a Struts based GUI application developed in Java 1.5 JDK used for Compilation: 1.7 Tomcat Server: Applic

Extract WebClient GET response values within a Spring Cloud Gateway filter

My end goal with this is to implement a way to make composite API calls within the body of a gateway route filter. I have a very basic demo application running

Custom Genotype in Jenetics for nesting

I'm using Jenetics to nest a list of polygons using NoFitPolygon I have a function that gived a list of polygon nests them following the order in the list. I ad

Spring Boot "FirebaseApp with name [DEFAULT] doesn't exist."

Launching Spring Boot's jar file throws me these errors: Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with n

Spring Cloud Gateway - modify response body in global Post filter

I have spent the last 2 days trying every possible way of modifying the response body of a request before it hits the client, and nothing seems to work for me.

Java servlet illegal characters

Original Question I have a Java web application that allows users to create an account and login. For some reason, after someone has sent enough illegal charact

Display only default message of Spring boot validation - MethodArgumentNotValidException

How can i strip down the excessive information from MethodArgumentNotValidException and keep only the required "default message" ?? I am experimenting with Val

MVVM: ViewModel logic needs info from database, but how to wait for the data?

I am new to MVVM and am trying to figure out how to organize my app. I made a simplified login app to help figure things out. I separated the app into layers: A

How to write a test case for the icon which is not displayed on the page due to permissions

I am trying to write test cases with the different Users with their permissions. I have a situation where there are two users Admin- with full permissions Layd