Category "java"

How to copy a file from SFTP to S3bucket

I am new to coding.I wants to copy a file from SFTP server to S3bucket.I don't want to copy it in to my local..I am trying to do this in Java springboot.Is ther

How to improve message processing faster in spring boot and MQ app?

Got a small spring-boot messaging app that receives a message from the queue and inserts/updates a row in DB2 table. Noticed this week it received lot of messag

Is there any way to return the color of a JTextField?

For example if you set the color of a textfield as Color.RED, is there a method to actually return that color? I found a method in the Oracle logs called getCar

Compare HashMap Values structured as List [closed]

I have a HashMap structured like {a=[test], b=[test, test2]} I want to compare entry values (test, test2) with each other and if any entry ha

log4j2 logger config level does not override root logger level

According to log4j documentation, if I define a logger config for package com.a.b.c with level ERROR with root logger level set to DEBUG, only ERROR logs should

Parsing empty json array as null object with GSON

I am working with some not really well designed APIs and when the object is null it returns empty array, like this: No-null response: "SourceType": { "ID": "2

Connection with SQL Server: java.sql.SQLException: No suitable driver found for jdbc:sqlserver

I am trying to connect a little Java App to a SQL Server database using Visual Studio Code. This is my code: import java.sql.*; public class App { public st

Implement autofill service in android app

I'm trying to build a password manager application. During the process I've come across a problem: implementing the autofill functionality that other password m

Which design pattern is useful to evaluate conditions and return Boolean value

I would like to know best coding practice or design pattern which I can follow to achieve following task in Java: I need to enable check box in UI based on cert

Is it possible to replace a value in a json string that occurs multiple times only at the top level of the structure via regex?

Hiho, I have a json string with the following structure: { "version": "1.0.0", "dependencies": { "version": "1.0.0" } } It can also look like th

Weird behavior of object references, "ghost" object

I was messing around with some sample code to check if I understood how objects behave when referring to one another when I stumbled upon this situation: public

Can run in Intellij, but jar file fails

Instead of running Quarkus, I'm running OptaPlanner through a Main class entry point in Kotlin. This works great within Intellij where I have a simple Run Confi

utilize Class<T extends baseClass> in a method parameter

I have a method whose signature is: <T> T fromJson(String json, Class<? extends BaseClass> extendedClass) The goal of the method is to to convert js

Update foreign key in Spring Boot with a POST request

I am trying to make a put request using Postman with Spring Boot. The idea is to give the subscription object a foreign key value with a put request or post. I

DFS in virtual graph with cycles

Using a function that generates a list of "adjacent" values from an input value, i.e. Function<Object, List<?>> adjacent; one can "traverse" any "a

How to create an array of random security codes in Java? [duplicate]

I am trying to write a program that would ask the user how many security codes he wants to generate, then it would output as many codes as he

Tomcat static content path security with Spring

I'm trying to setup static content serving on my Tomcat 9 server So I specified it inside server.xml <Host name="${serverhost}" appBase="webapps" unpackWARs=

Update indexes mongodb using Spring

Does someone know what Spring application properties need to be specified so that the index is overwritten (if already been created) with new parameters. For ex

How to solve thymeleaf template parsing error

I'm trying to present a html to screen but I'm getting template parser error from thymeleaf. Here is my code and error: index.html: <body> <h2>M

How to parameterize the locators?

I am trying store all values required for locators in Property File: This is Property File: url=https://www.google.com value=search This is my object repos