Category "java"

In Spring Boot what is the difference between CrudRepository and JpaRepository in extending a Java repository interface

when building respositories in spring, in my repository interface i extend it using the below extends CrudRepository<EntityName, EntityType> where EntityN

Configure CircleCI for Maven project using Nexus repo

I'm using external Nexus repository for java maven project and I trying to config circleCI config. At first I need to somehow say CircleCI to look into env vari

Is it possible to edit the properties of a single tile in JavaFX tilepane?

Is there a way in JavaFX to get/change the properties of a single tile in the tilePane layout? More specifically, I am looking to change the color of a single t

okhttpClient requset download file fail,Server is built by Netty

Now,i build nettyServer and use okHttp request download, but okhttp response not has dataiostream, could someone help me solve the problem? code Server by Netty

Docker could not find or load main class. Caused by: java.lang.ClassNotFoundException: src.com.company.Main.java

I am new to learning Docker, and followed a tutorial to make a small Hello World application to dockerize. I used Intellij template to generate a main method, w

Java web application when hosted on server, cant find resources under [/] "The requested resource [/] is not available"

I made spring boot web app that works perfectly when I run it in Localhost, but when I exported it from IntelliJ to .war ( via Maven/package ) and upload it to

ListView Item Duplicated when Save or Reload

I am getting listView items duplicated after adding items and also when EDIT or DELETE menu item got selected, but when i re-open the app, items are not duplica

Displaying code inside rectangle in Java GUI

// Eine einfache grafische Benutzeroberfläche mit Swing //von der Zeile 3 bis zur Zeile 5; Impotieren von Bibliothek import java.awt.*; import

Spring boot Circuit breaker - Resilience4 - Fallback method is getting triggered on 1st failure call itself

I have created a simple circuit breaker pattern using resilence4. The problem I am facing is, fallback method is getting called on 1st hit only. I am expecting

Migrate HandlerInterceptor to Spring boot 2.6

I have this old code implemented for Spring 2.4 public class Interceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServlet

Why there is still error after i import the org.apache.commons.io.IOUtils? How to resolve them and how to add the import properly?

After i import it stills remain error? Where should I download the the import? How to import? import java.util.Scanner; import java.util.*; import java.io.*; i

Hibernate parameter binding issue with lists

I have the following method in one of my repositories @Query(value = "select resource_id from tag where resource_type = :resourceType and value in :tags", nativ

unable to write into different logs for different threads using log4j2

I'm trying to write logs into different files for each Thread/ThreadGroup. My code is creating different files for each thread, but it writing all other threads

Automatically register users in resource server

I'm trying to configure spring security with oauth2, however I am new to this topic and ran into a problem. I have a spring backend and an angular frontend. I u

Android Scoped Storage Permission for Download Folder to Download PDF

I have an app that download specific pdf files using streamig Retrofit. I am upgrading my app targeting android 11. I have gone through many online documents an

How to open fragment from the click of the notification?

This is my onMessageReceived method. I am getting data from notification i want to open fragment when i click on this notification and get the data from this.

Calling a servlet programmatically when a specific criteria is met

I am working on a JSP app and I have successfully created an HttpServlet that allows user to download a file on the browser. I have tested it by calling the ser

How to use log4j.xml for spring boot + log4j2 dependency

I have a log4j.xml with a customized appender like: <appender name="console" class="com.example.MyAppender"> <layout class="org.apache.log4

How to call an event handler function written in one JFrame in another jframe?

How to make function selectRecords("select * from Seva_Details"); written in a JFrame accessible in another, separate JFrame? public void selectRecords(String S

Is it possible to run Java16 code on Android

I know Java 16/17/18 is not compatible with java 8 (android), but is-it a way to generate byte-code for android to execute the program on my phone? Or trans-cod