Spring at StackOverflow

Welcome to our StackOverflow page, where we maintain a list of StackOverflow tags that our engineering team monitors and participates in. If you are a previous forum.spring.io user, please read the blog post about the change or visit the read-only archive.

Active questions on StackOverflow

1
votes
2answers
192 views

What is the purpose of @InitBinder's value element?

I would like to understand the @InitBinder. I tried to use multiple InitBinder for more than one Validator @InitBinder("Validator1") protected void initBinder1(WebDataBinder binder) { binder.setV
0
votes
1answers
21 views

Static Factory Method in JPQL query instead of constructor

Currently I use a lot of queries which use constructors for building value objects in JPQL as below @Query("SELECT new com.DocDTO(d.documentId, d.docType) FROM Document d where d.parentId=:parentId")
0
votes
1answers
8328 views

Spring Boot Thread management

I am barely new with Spring framework and i would like to ask opinion of the experts. It is a spring boot application with a rest end point, which everytime is called it will put an action on a queue
0
votes
1answers
24 views

Spring autowire fail in get Method of controller

Spring autowired fail in getMethod of controller @Controller public class SetupController{ @Autowired private ISetupBLOService iSetupBLOService; @ResponseBody @RequestMapping(value="produc
2
votes
2answers
3850 views

Spring Boot : Handler dispatch failed; nested exception is java.lang.NoSuchMethodError

I encountered this exception when I try to do a rest call to a spring boot services. what causes this exception? Message Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: or
1
votes
1answers
26 views

No mapping found for HTTP request with URI + Spring MVC

I am learning Spring MVC but got an issue on my first application and I am not able to resolve it. I checked all articles available but still, I guess somewhere I am making some mistake. Will you ple
1
votes
1answers
36 views

Spring cloud zuul /refresh throwing 500 error

When I hit the /refresh endpoint of Zuul application, I get the following error and the routes added are not getting refreshed. "exception": "java.util.concurrent.RejectedExecutionException", "messa
3
votes
3answers
10893 views

@Autowired in ServletContextListener

i hava aclass InitApp @Component public class InitApp implements ServletContextListener { @Autowired ConfigrationService weatherConfService; /** Creates a new instance of InitApp */ public InitApp(
1
votes
0answers
31 views

Avoid reporting Broken Pipe errors to Sentry in a Spring Boot application

I have a Spring Boot application that uses Sentry for exception tracking and I'm getting some errors that look like this: ClientAbortExceptionorg.apache.catalina.connector.OutputBuffer in realWriteBy
0
votes
0answers
10 views

Error While Connecting to Happy Fox API to extract customer data using Anypoint Studio?

I am trying to connect to a custom API for extracting customer data from chat API, I won't be able to connect to the API getting the below errors. + Initializing domain 'default'
0
votes
1answers
18 views

How to make externalized properties file available to spring boot integration tests?

I am developing an application using Spring Boot. I have an externalized properties file on file system. Its location is stored in an environment variable as below-- export props=file://Path-to-fi
-1
votes
0answers
24 views

what is .yml represents in spring boot and how it works with spring and which code can contains in this file

File name: docker.yml version: "3" services: db: image: mysql:5.6 volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpre
1
votes
1answers
25 views

SpringBatch ItemWriter java

I am trying to write a spring batch using SpringBoot. At first, the program will read data from database, then write it to .csvformat file. This is the code I have tried Reader @Bean publi
10
votes
4answers
62725 views

IOException parsing XML document from class path resource

Ok I'm currently trying mavenise a project. However my project fails to find the xml file containing the some beans. combined2.xml I have it defined as: public RepeatingGrpPoC() { appContext
0
votes
2answers
18 views

Exception Received When Not Using Embedded Tomcat Servlet Container in spring boot

I am using Spring Boot for the first time and I've noticed something odd. The starter web dependency has the starter Tomcat in it, but I am just making a normal WAR. I excluded Tomcat and then began r
0
votes
1answers
26 views

Trying to send Email from spring server.Error is creating bean with name 'hourlyJob': Injection of autowired dependencies failed; nested exception

Error creating bean with name 'hourlyJob': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private
0
votes
3answers
22 views

Spring @Transactional with a transaction across multiple data sources

I have to update two data sources as part of one transaction. That is - I do an update in DB1. Then, I do another update in DB2. If update in DB2 fails, I want to roll back both DB1 and DB2 to rol
0
votes
0answers
30 views

Specify spring config file from default config file

I'm building a war package which will be deployed into a web container using spring boot. And I want to put the spring boot config file outside the war file. My idea is to put the file location in Sys
0
votes
0answers
17 views

Re-Design my Spring application to work both online and offline

I am building a billing application, it is a work in progress. Off late I was asked to build it so that it works both online and offline. The following are the technologies I am using HTML-5, CSS an
9
votes
2answers
5877 views

Testing Form posts through MockMVC

I'm writing tests to verify that I can do a generic form post to our API. I've also added quite some debugging, but I noticed that the data posted by an actual form; (Postman / AngularJS or w/e) Diff
0
votes
0answers
9 views

How to config Zuul, Eureka and OAuth?

I try to understand how to work with spring cloud, now I try to create small application. You can find this project here. But I faced problem my Zuul and OAuth server, don't understand each one. I sha
0
votes
2answers
12506 views

Error creating bean with name 'requestMappingHandlerAdapter'

Am creating a simple REST service using Springframework with Tomcat. The response should have to be in json like {"id":"101","name":"Ram"} .When ever I run, am getting the following error org.springf
0
votes
0answers
13 views

Bean configuration in Spring combined with Singleton, Prototype and dynamic parameters

I have a base class called Worker that have many subclasses. Each subclass has its own Downloader and Parser implementation. Each Worker requires an instance of Info whose content is provided when an
34
votes
7answers
47790 views

Get method arguments using Spring AOP?

I am using Spring AOP and have below aspect: @Aspect public class LoggingAspect { @Before("execution(* com.mkyong.customer.bo.CustomerBo.addCustomer(..))") public void logBefore(JoinPoint jo
-1
votes
1answers
9 views

Is there a code sample for multiple producers in spring kafka?

I have an application that may need multiple producers. All code samples I see seem to support a single producer, reading config from app during app startup. If there are multiple producers and we wan
0
votes
1answers
7 views

Spring Integration File Polling complex structure - subdirectories

I am currently using this project as an attempt to listen and poll files from a FS structure, start Spring Batch jobs from them and write'em back to a different folder. Unfortunately, as I can guess
1
votes
1answers
102 views

How to get micrometer prometheus metrics working for Flux?

For Spring Framework 5.0.1.RELEASE and Spring Boot 2.0.0.M6 We want to use the micrometer application monitoring, so wie included: compile('org.springframework.boot:spring-boot-starter-actuator') com
0
votes
0answers
12 views

how to make spring-boot-starter-data-redis delete return result

Hi everyone, I use spring-boot-starter-data-redis library . And I am using the RedisTemplate to operate redis.I want to get the result of deleting the key.But I found that the funcation return void
0
votes
1answers
19 views

Saving Enum with description and key - MySQL and Java

I have an enum as follows public enum OrderStatusEnum { ACTIVE("A","Active Order"), AWAITING("I","Awaiting Order") I want to save ACTIVE, AWAITING in the database. Also retrieve the same on
0
votes
1answers
23 views

@AfterReturning(pointcut) vs @AfterReturning(value)

What is the difference between @AfterReturning(pointcut) and @AfterReturning(value) @AfterReturning(pointcut = "execution(* my.java.model.Triangle.myTest*(param))", returning = "returnedString", argN