Category "spring"

spring boot ssl client cert fails with PKIX path building failed error

I am writing a rest client in spring boot that call secure server API over ssl. Here is my code: @Value("${secret: not configured}") private String secret

Adding @SpringBootTest to test class hang unit tests

I want to test my Spring application. When I add the @SpringBootTest to my test class, tests hang and not starting even if I wait for more than an hour! Removin

Is it problematic that Spring Data REST exposes entities via REST resources without using DTOs?

In my limited experience, I've been told repeatedly that you should not pass around entities to the front end or via rest, but instead to use a DTO. Doesn't Sp

Spring Boot multiple log4j appenders in application.yml file

I need 2 different logging patterns in my SpringBoot application. let's say: first_pattern -- for root logger (INFO level) second_pattern -- for packages com.s

How to pass a javascript (js) Map to spring boot Controller?

I've a Java Script map having key value pairs which i Need to send to spring boot contoller :-- Example :-- var myMap = new Map(); myMap.set('1',

export file to xlsx format in java

I am getting 500k records per request from the Database then mapping the data to a list of POJO classes then writing the records to an excel sheet (I have the r

A character string to numeric conversion failed while using syntax like 'OPE' =?

I try to run this query using Spring JDBC Template public static String FIND_CNC_OPE_GRAPPE_BY_FCT_ID = "SELECT " +"EXPO.COD_NA

Cannot access org.springframework.data from my Java Classes

I'm working on an online tutorial, and in the step where I need to work with databases and add jpa, I cannot access it in my project. I have successfully put t

How to pass environment variables to the gradle wrapper build using only command line?

I am trying to pass env variables locally with strictly a command line command. At deploy, these variables get passed into the docker container, but when runnin

How to configure jackson with spring globally?

To serialize deserialize object I am useing Jackson as flow @JsonSerialize(using = LocalDateSerializer.class) @JsonDeserialize(using = LocalDateDeserializer.cl

Failed to execute CommandLineRunner - Spring Batch

Hi I am very new to Spring batch and I am getting the following exception which I am not able to resolve: java.lang.IllegalStateException: Failed to execute Co

Getting java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass while inserting data in mongo using Spring MongoTemplate

I am trying to insert some data (List of Objects) into mongoDB using Spring MongoTemplate and I am getting an exception: 14:08:04.430 [main] DEBUG org.springfr

Spring Boot + Hibernate - Insert query getting slow down

I am working on one spring boot application. Here I have 100,000 records that are inserted into db by different process. and its inserting one by one. I can't d

Spring Boot Custom Authentication Provider with Java Configuration not working

I am trying to setup a REST based web application, where the frontend is using Reactjs and the backend is using Spring Boot. I am also trying to setup a custom

NoSuchMethodError java.lang.reflect.Method org.springframework.util.ClassUtils.getInterfaceMethodIfPossible(java.lang.reflect.Method, java.lang.Class)

I have a project that JSF works for which I wanted to integrate spring security through the following modifications: Add dependencies in pom.xml: (Updated) <

The import org.mockito.Mock cannot be found

I am experiencing a problem I hope you can help with. I want to use Mockito in my Spring Boot w/Gradle project, but STS cannot resolve the dependancy. I have

Spring Kafka : Record listener vs Batch listener

With spring-kafka, there is two types of Kafka listeners. Record Listeners : @KafkaListener(groupId = "group1", topics = {"my.topic"}) public void listenSingl

Spring MVC 5 ResultMatcher jsonPath null value

After upgrading my rest service from Spring Boot 1.5.10 to 2.0.0 I encountered my tests failing which passed before. Following Scenario: import org.mockito.in

Need to process multiple files in parallel in Spring Integration

I have a SFTP directory and reading files and sending the files for further processing to a ServiceActivator.At any point I need to process them parallely using

Spring Boot Upgrade from 2.3.x -> 2.6.x Breaks mvc forward:

After upgrading From Spring Boot 2.3.x to 2.6.x Forwarding MVC REST Calls doesn't work. We have a controller for /health that returns forward:/actuator/health/.