Category "spring"

Spring QuerydslPredicate - exception handling for bad types

I didn't find any proper solution for this so maybe you can assist. Basically issue is ultra simple I want to do some kind of "better looking" error handling wh

Log4j2 vulnerability and Lombok annotation @log4j2

We are using spring boot 2.1.5 and starter parent as pom dependency. Spring boot is using default logback for logging and we haven't explicitly switched to Log4

Compare two Lists and get the difference [duplicate]

I have two Lists which I get - one from xlsx file, the second one - by select from database @Component public class ReadExcelDemo implements C

How to find which method is called when going to route?

I am getting too many redirects error I and want to find in which method this happens. The url I am going is https://localhost:8443/OpenELIS-Global/ I tried sea

Can Spring Boot detect when the Google PubSub connection is down?

I've been googling and can't seem to find an answer to this question: Can a Spring Boot app get a lifecycle notification if its underlying broker connection (ei

Can you listen for SpringCamelContext status?

Using EventNotifierSupport, I can listen for CamelContextStartedEvent. However, I need to add one more root to the context, after all the other routes have alre

Moving to the Spring Boot. Migration of logic from the old main class

I am very new to Spring Boot and development, so, I am stuck with a problem. I have an old project that needs to be migrated to Spring Boot. The original main m

IllegalAccessError: ClassA and class B are in unnamed module of loader 'app'

I have a spring @Configuration bean which initializes a class A. This class A, in its constructor, calls another static method in class B. When spring initializ

Correct way to use substatemachine in spring-statemachine

I'm not sure I clearly understand how to use substates. I didn't find any good explained example of correct spring state machine configuration, so I would be gl

How to replace an user's authentication 'http.formLogin()' with a form that is on another frontend server?

Inside a class that extends WebSecurityConfigurerAdapter, I have this authencitation method. I store my users inside an Active Directory. @Override publ

Annotation @Profile() doesn't work in Spring (not Boot) project

Annotation @Profile doesn't work or works wrongly. I want to get 7 beans: first-sixth and firstConfig. In package app.a I created three classes. package app.a;

How to solve java error on Geoserver GSR extension

I have set up a Geoserver instance. Now I need the GSR extension to have an ArcGIS compatible REST API. I installed the extension as described but on Geoserver

How to return all types except a certain type in MongoDB?

Let's say that there is a column called colours and it can have values red, blue, and green. I want to retrieve all rows except the ones where the colour is gre

How to import a bean which comes from a configuration bean conditional on another class?

I'm using a 3rd party dependency in my Spring Boot project (version 2.6.3) which has the following classes: @ConditionalOnProperty(prefix = "spring.cloud.vault"

Inconsistency between postgres and hibernate

Inconsistency between hibernate and postres. Consider we have table student having 2 columns id(Primary Key) and name. Perform the following concurrent query on

How to solve this leetcode problem of phone number pattern

package Code; import java.util.*; public class PhoneNumber { public static void main(String[] args) { int[] digits = { 2, 3 }; // int n = n

How can send custom error message after git push from local git server by using jgit api

I have been making a local git server by using jgit . Following is my code repository for local git server. https://github.com/masumcse1/mygitserver https://git

MappingSqlQuery pass parameter

String sql = select * from APPLICATION_LABELS where DATE_MODIFIED > '"+ new SimpleDateFormat("dd-MMM-yy").format(lastUpdate) +"'"); MappingSqlQuery&

Springboot 2.6.7 mongodb dependency not working on @SpringBootTest

I've recently upgraded my springboot dependencies from version 2.5.4 to 2.6.7 here my gradle file v2.5.4 plugins { id 'org.springframework.boot' version '2.5.4

How to get Grails Gorm autocomplete in regular Spring Data JPA

Grails GORM is able to autogenerate ORM findBy[fieldName] and related methods for each of the fields in the entity, I'm not sure what magic it uses to do this I