Category "java"

How to resolve XSRF Cross-Site Request Forgery (CSRF) in API controller after SAST Checkmarx

I have done the scan my project java spring boot with Checkmarx tool. The tool found about 23 XSRF occurrences with Medium severity. The issue found is marked o

Spring Cloud Gateway - custom 404 error message when route is not found

I have a basic Spring Cloud Gateway app that is configured with YAML: server: port: 8080 logging: level: reactor: netty: INFO org: spri

How reverse data in model class

I use firebase ui realtime database to fetch data in RecyclerView and i use model class and i need to show the latest item firest i try to use Collections.rever

How to write this piece of code more briefly

I am trying to implement a graph using HashMap where I store the nodes (vertices) on the key column and the adjacent nodes ( adjacent list ) as a HashSet on the

Apache Ignite Cache Store + HikariCP DataSource

I am trying to set up Apache Ignite cache store using PostgreSQL as an external storage. public class MyCacheStore extends CacheStoreAdapter<String, MyCache&

how do I use BouncyCastle libraries in my AEM maven project?

problem: My Java code cannot see BouncyCastle libraries. situation: I have a component that needs to use BouncyCastle libraries. The other vendor has provided s

YAML Environment Variable Interpolation in SnakeYAML scala

Leveraging the best from SnakeYAML & Jackson in scala, I am using the following method to parse YAML files. This method supports the usage of anchors in YAM

Database user shared across microservices [closed]

In my project there are 10 microservices. 3-4 APIs are required to pull data from same database but different table. Is it fine to use the sam

Recycler View life cycle methods

The flow of recycler view function call is: getItemCount() -> getItemViewType() -> onCreateViewHolder() -> onBindViewHolder() The size of array list i

Create Function class in My Routine in Talend

Anyone Can help me to fix my Java Function to use it in my Routine. The Function will remove exponent and put it in a Float format. This is the function : float

Android: SpannableString with correctly formated numbers

I would like to have a list of instructions that are correctly numbered in an enumeration. For that I use the SpannableString and I have the following code: //G

How to convert a JSON request into a list of specific format n spring?

I have a request JSON list like this: [ { Id: 0, values: [a, b, c, d] }, { Id: 1, values: [1, 2, 3, 4] }, . . . ] How do I convert this to a lis

How do I align a JPanel centered underneath another JPanel?

I have the following GUI that I'm working on. import javax.swing.*; import java.awt.*; public class gui{ public static void main(String[] args) { /

java.lang.ClassNotFoundException: javax.sql.rowset.RowSetProvider

I'm running a Gradle project in Docker and when I try to hit an endpoint through Postman I receive the following error. When I run it locally through Gradle it

how to make grpc proto "timestamp" change to Date input format?

I want to make timestamp to convert to Date but I was expecting to input Date format ,"NOT" seconds and nano. How do change it to date format input? @GrpcSer

Sending InputStreamSource as attachment with mailGun API in java

I am trying to send an email with attachments, My attachments are stored in the AWS, I download them and store them in HashMap<String,InputStreamSource>:

remove and update items in listview at firebase database

May you help us with our school project. We are trying to delete and update items in listview and firebase database. The delete works but only delete the values

Share file .txt Android

I'm trying to share a .txt file to another app (gmail for example) but I have some problems. I decided to use the file provider. When I select gmail among the a

Could not find or load main class net.fabricmc.devlaunchinjector.Main fabricmc

I was programming a fabric minecraft mod in intellij and when I ran the code it said : Could not find or load main class net.fabricmc.devlaunchinjector.Main Wh

How to modify an existing PDF file contents in Java

I am using a Spring Boot application and I need to dynamically populate the blanks in an existing PDF using the values from the database. I have attached the im