Category "spring-boot"

spring boot dynamic scheduling with cron expression defined by the user

I want to send messages on different dates so I'm going to use java scheduler and dynamic cron expression but the problem is that user can send multiple messag

EntityManager closed when executing queries on different threads

I am trying to execute a couple of queries on different threads. There are 2 top level queries each executing on different tables at runtime. For executing the

boot microservice not accessible due to laptop security

I crafted a simple Java8/Eclipse/Maven/spring boot microservice on my own personal laptop ie have admin privileges. I start it with java -jar myService.jar from

Kafka Consumer - Point to specific offset in Spring boot Kafka

I'm trying to seek the offset to some specific offset. It seems I need to use seekToTimestamp and there is no seekToOffset or something. I've research a lot but

Mockito+Kotlin+SpringBoot, `when` section doesn't mock, but invoke method meant to be mocked

I'm trying to modify existing test of kotlin+springboot project. Mockito.`when`(serviceA.getData(anyString())).thenReturn(data)// existing mocking Mockito.`when

How to fetch redis cli set json and fetch from Get Api Spring boot redis?

I want response from redis cli to postman as this http://localhost:8585/api/home/getBestTrainerBasedRating [ { "trainerid": 28, "rating": 5.

Axon Framework: Aggregate Autowired Bean throws NullPointerException in Test

Springboot and Axon: Basically I am unit testing an aggregate that uses three different ObjectMapper instances, each with a different configuration. These are d

JSON array serialization issue after spring-cloud-stream update

I use spring-cloud-stream-binder-kafka to connect to the kafka broker I updated spring-cloud-dependencies version to 2021.0.1 I went from this [INFO] +- org.spr

springSecurityService.encodePassword for Spring Boot only

I have a legacy app made in grails which uses springSecurityService.encodePassword to generate user password. It's stored in database like this: {bcrypt}$2a$04$

To trigger event when column is not updated for certain time

I need to trigger an event when db column is not updated for certain time using spring boot and gcp. Note:- we should use spring boot schedular. Let me know is

Could not convert socket to TLS Spring Mail

I am getting the errors: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not

Logback log to different files from the same package

I want to log into two different files, historic.log and applicative.log, from the same package that is com.authenticationservice.user.UserRequest. In the histo

Spring: @RequestScope - annotated method does not get called

In the application I would like to create a request-scoped bean (annotated with @RequestScope) that would represent a user of the application (for authenticatio

Sending message to a SQS queue fails from local in java

I'm not able to send message to sqs-queue from my java application. I am running roribio16/alpine-sqs docker image for SQS in my local and I've created a standa

403 error on POST from react native to EC2 Spring Boot API

I have this spring boot app running on an AWS EC2 instance and when I make a post request from insomnia in my computer, it works, but, when calling it from my r

How to throw exception when there is extra parameters in request body spring boot

In my last project, there was a requirement for throwing exceptions when the request body contains extra parameters. If the request will be like { "test":"bo

Why error is coming after adding javascript , bootstrap and CSS path in list-todos.jsp in Springboot

I am working on spring-boot project Code is working fine until I add javascript , bootstrap and CSS path in list-todos.jsp but after I add them and hit URL "htt

MongoAutoConfiguration does not create MongoClient bean

I have just read Spring Boot configuration with Morphia? and I am trying to implement it like this. But I always get Field mongoClient in MorphiaAutoConfigurati

MongoAutoConfiguration does not create MongoClient bean

I have just read Spring Boot configuration with Morphia? and I am trying to implement it like this. But I always get Field mongoClient in MorphiaAutoConfigurati

Object Mapper to implement not null

How to implement below :- fail if name/id/sal isnull or missing/or has null value then string->pojo should fail.How can i implement ? Actual json is nested .