Category "spring"

I'm trying to add a jsp page in my Spring Boot Aplication. My problem is that every time I try to go to that page I have this:

Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Apr 26 16:10:15 IRDT 2022 There was an unex

Spire Doc Free 3.9.0 not running in headless server

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.spire.doc.packages.sprDGC at com.spire.doc.formatting.CharacterFormat.spr (Un

postman returning "status": 404, "error": "Not Found", for the spring boot

Thank you in advance, Hello I am new to spring boot. I am facing a problem with spring boot. When I run my URL in postman it shows an error below. I have also u

ERROR 18080 --- [main] o.s.boot.SpringApplication : Application startup failed Spring boot

I know question like this have been already asked but I am new to spring boot and trying to run this program as java but getting error. I tried to search this e

How to set the user object to Sentry in Spring Boot?

In a Spring Boot project I have a SentryConfig.java file package example.services.bo.config; import org.springframework.context.annotation.Bean; i

Spring - is it possible to give same url (path) in request mapping for two different post methods?

Is it possible to map same path (uri) in request mapping for two different post methods, only difference is request body. Example @RequestMapping(value = "/he

validate input in Thymeleaf

I have this input: Masa: <input type="number" class="form-control form-text" name="masa"/> <div class="text col-sm-12 error" th:if="${wzrost}"

java.lang.NoSuchMethodException error in Spring-boot web-application when deploying on tomcat

I am deploying a Spring-boot web-application on 'tomcat 9' and I faced a NoSuchMethodException. I compile and run this code in localhost, successfully; but when

No qualifying bean of type 'org.springframework.batch.core.Job' available: expected single matching bean but found 2:

I have 2 jobs running in single spring batch application based on input parameters and it is working successfully. But when i run my test case, i'm getting the

Set of String is not acting normal in Spring JPA Projection Interface

I am using Projection Interface to return a partial view of an Entity, and the partial view contains a Set of String. I expect the Set works as normal but its n

Feign client : Load balancer does not have available server for client

I'm working on a microservice architecture, I'm using Feign client to make a rest call to another microservice. I using spring boot version 2.1.3.RELEASE and sp

Given ClassA and SubclassA, if I use Google Guice to bind ClassA to SubclassA then will SubclassA be injected as an instance where ClassA gets called?

Say I am given a scenario like this: @Data public class ClassA { private final String name = "ClassA"; public ClassA(){ //This constructor gets

@Transactional spring JPA .save() not necessary?

I understand that if we use annotation @Transactional. "save()" method is not necessary. Is it exact? And for my example: @Transactional void methodA() { .

multiple Spring integration task executors picking up same message from JMS queue

I am using spring integration to process multiple files from a queue. Following is my configuration: <si-jms:message-driven-channel-adapter id="someReg

TestEngine with ID 'junit-vintage' failed to discover tests - JUnitException: Failed to parse version of junit:junit: 4.13.2

I'm having a very weird issue with my Gradle config and JUnit, I have tried updating to 5.7+ but I'm getting the following exceptions: org/junit/jupiter/api/ex

TestEngine with ID 'junit-vintage' failed to discover tests - JUnitException: Failed to parse version of junit:junit: 4.13.2

I'm having a very weird issue with my Gradle config and JUnit, I have tried updating to 5.7+ but I'm getting the following exceptions: org/junit/jupiter/api/ex

spring boot not getting connected to RabbitMQ in AWS

I am trying to connect my Spring-Boot application to RabbitMQ which is hosted as a AWS service.I am getting the following exception when starting the applicatio

org.springframework.web.client.ResourceAccessException: I/O error on GET request for in Microservices

I am developing microservices code from the link : https://github.com/sivaprasadreddy/spring-boot-microservices-series. In this code base, I was successfully ab

Spring Boot Multiple Ports?

How can I have a spring boot web application running on multiple ports? for example 8080 and 80 how can I achive this?application.properties server.port=8080,

Spring RequestBody with either List<Object> or Object. Name for both are same "data"

I want to handle json request for List of Object and Object it self in the same Spring controller. Below is the exact example. Json Request for Single Object: