Category "java"

How to achieve flow like this

I'd like to get flow like this one on the picture. Is there any way to intercept all HTTP request within a docker container, modify their headers and then send

Reason: The elements were left unbound

How can I load List of objects from configuration yml file in java springboot application? I already tried several sources: configuration-properties-in-spring

Injection problem in Spring Boot Test: "messageConverters must not be empty"

I have a strange problem with a Spring Boot Test. The test itself is empty, but it does not even manage to start the application. I get an error "Failed to load

I want to enable logging before running

How can I use Spring boot's logging system before running SpringApplication::run? By the way, I'm using logback and lombok. @slf4j @SpringBootApplication public

Exception in thread "main" java.net.SocketTimeoutException: Connect timed out

When I run the script using web API automation rest assured framework, I am not getting the proper api response and below are the error are posted. at java.base

Cannot resolve method 'equals(long)'

I'm working on a spring boot application. However in my service impl class I'm getting a "Cannot resolve method 'equals(long)' when I try to use the equals() me

Does Log4J2 have an equivalent of Log4J's Renderers?

I'm working in a Java solution that is using log4j 2.11 as its logging framework. I'm also using a library that uses a particular POJO extremely frequently. I w

Spring Boot Admin : java.net.UnknownHostException: Failed to resolve 'SAURABH-PC.mshome.net' after 3 queries

I had executed spring boot admin with two micro-service and eureka server last time. that time it executed but this time it is giving this error and showing in

Implementing latest version of JCIFS

Trying to update my app from jcifs-1.3.19 to the latest jcifs-2.1.29 I have changed the appropriate code, adding the "necessary" jars to build.gradle <see a

How to fix SocketException while connecting to Telegram Bot API in Java App

I'm working on my Telegram bot. I know, in my countries Telegram is locked, so I decide to connect to Telegram Bot API through proxy. When I try to run this cod

incompatible types: View cannot be converted to LinearLayout

When I want to make Apk file I get 8 errors, I hope someone helps me to fix it Task :app:compileReleaseJavaWithJavac FAILED C:\Codes\code\app\src\main\ja

How to select date only from database that storing dob as datatype timestamp without timezone in java

I have a table in PostgreSQL that stores dob as datatype timestamp without timezone example value '1997-12-03 07:00:00'. My entity class is as follows @Tab

@RefereshScope in Spring config server

As per the documentation whenever the bean in RefereshScope and the actuator end-point refresh called the bean got refreshed. Questions : Bean refresh means spr

Terms query in java spring boot

I'm trying to add terms in the should clause of ES query in java spring boot. I need it to look like this: "should": [ { "terms": { "segment_s

Accessing Microsoft Graph API in Vaadin 23 + Spring Security + Azure AD

I'm developing an enterprise Vaadin application and I'd like to know if anyone has figured out how I can obtain the JWT token to make (from backend) a request t

How to use Low Level CTRPr & CTPPr Classes of latest Apache POI 5.2.2

I am upgrading to latest POI 5.2.2 from POI 3.14. Currently I am using below mentioned low level classes in Apace POI 3.14 which needs to be updated. i)CTRPr -

How can I build an web client of the default codecs' maxInMemorySize(3GB)?

I saw usually developers used buffer as just a few MB. However, I think I need to use buffer as more than 1 GB or even 3 ~ 4GB So I built a web client in source

Count and print unique list items in one chain using Java Streams

I'm trying to achieve this using only functional programming constructs (Streams, Collectors, lambda expressions). Let's say list is a String[]: {"Apple", "Sa

Trigger Guava cache refresh when a table is updated

Presently am fectching the list of clients from db using ClientDAO.getClients() and caching using guava with 30 minutes refresh period as below private List<

Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found

I'm facing an error in my pom.xml file given below: Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found Below is my pom.xml : <?xml versi