Category "spring"

Spring cache and Spring data redis

Spring cache + Spring redis: Spring provides a caching abstraction package spring-boot-starter-cache which basically provides method level annotations to cache

@DataMongoTest is creating a null MongoTemplate

I have been trying to follow the instructions in the link below to try to add an automatically configured Embedded MongoDB Instance for Cucumber Integration tes

Caused by: com.jcraft.jsch.JSchException: connection is closed by foreign host while using DefaultSftpSessionFactory and SftpInboundFileSynchronizer

I am using spring batch remote partitioning to read input files and process them. To make input files available on all servers, I have added step listener which

How to generate form and crud using Spring and React

I want to dynamically generate crud form based on my API. I am using spring, spring-data-rest and spring-hateoas. I don't wan't to render react from java. I

SpringBoot Web MVC Application cannot resolve JSP views

I am trying to implement a web application using Springboot. but when I request methods I get 404 Error. Springboot cannot find Jsp files. this is my Controller

How to convert a multipart file to File?

Can any one tell me what is a the best way to convert a multipart file (org.springframework.web.multipart.MultipartFile) to File (java.io.File) ? In my spring

Junit (4.12) is not executing after spring-boot 2.6.2 migration

I have migrated from Spring to Spring-boot version 2.6.2. mvn clean install is successful but none of the junit(version 4.12) is executing. After few research I

Creating JPA session for background threads

We use Hibernate through JPA and Spring to manage object persistence in our web application. We use open-session-in-view pattern to create sessions for threads

Spring PreparedStatementCallback; uncategorized SQLException for SQL Invalid Column Type Oracle

I have migrated mysql database to oracle. When I used sql query with modification as with rownum as following, SELECT id, frameTypeId, ownerId, locationId FROM

Authorisation in microservices - how to approach domain object or entity level access control using ACL?

I am currently building microservices based system on java Spring Cloud. Some microservices use PostgreSQL and some of them MongoDB. REST and JMS is used for co

@EventListener for AuthenticationSuccessEvent or InteractiveAuthenticationSuccessEvent not fired

I have this listener in the context of Spring: package listeners; import java.util.Date; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.s

IllegalArgumentException: At least one JPA metamodel must be present

while starting with spring rest I got following error as > org.springframework.beans.factory.BeanCreationException: Error > creating bean with name 'jpaM

Hibernate : Why is it trying to drop/create database on startup?

I'm new with Spring. I finally succeeded to build my application with no error but when i'm looking to the output i have a lot of information that i don't under

How can I write to stdout using FlatFileItemWriter in spring batch?

I have the following writer configured in my beans definition file of a spring batch project : <bean id="writer" class="org.springframework.batch.item.file.

How can I make Spring WebServices log all SOAP requests?

I need all SOAP requests logged in the CommonLogFormat (see http://en.wikipedia.org/wiki/Common_Log_Format), plus the duration (the amount of time it takes to p

Does spring @Scheduled annotated methods runs on different threads?

I have several methods annotated with @Scheduled(fixedDelay=10000). In the application context, I have this annotation-driven setup: <task:annotation-drive

no String-argument constructor/factory method to deserialize from String value

I am trying to make use of an external NYtimes API. Here is an sample example data output : { "status": "OK", "copyright": "Copyright (c) 2016 The New

How to consume protobuf parameters using Spring REST?

I'm trying to pass a protobuf parameter to a REST endpoint but I get org.springframework.web.client.HttpServerErrorException: 500 null each time I try. W

How to consume protobuf parameters using Spring REST?

I'm trying to pass a protobuf parameter to a REST endpoint but I get org.springframework.web.client.HttpServerErrorException: 500 null each time I try. W

Spring Security: How to use a UserDetailsService with JwtAuthenticationProvider?

I have a REST service, written using Spring MVC. The server is an OAuth2 resource server and I am using the JwtAuthenticationProvider to have the JWT parsed and