Category "spring"

Spring Email with Greenmail: Authentication Credentials Invalid

I am trying to write test code for Spring Email using Greenmail. This works perfectly with 1.5.5 version of Greenmail, however when I try to update the version

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener Error

I am trying to implement Spring Security within my REST API. My project was working perfectly until I started to implement Spring. I believe the issue has somet

Spring Batch job with FlowBuilder fails even though steps complete

I've got a spring batch job that completes the steps successfully but marks the overall batch job status as Failed. The job has two steps. The first step vali

Spring boot, JSP file as view not loading when run in IntelliJ

I've created a simple Spring Boot Web Application in intelliJ. I've placed a simple .jsp file in the /src/main/resources/templates/ folder which contains some b

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