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

24
votes
5answers
29990 views

Spring MVC Rest Service Controller with Error Handling done right?

I was wondering how to correctly implement a Spring Controller which is supposed to serve as a REST Service. Especially I want to try and make the interface as RESTful as possible. Also i'd like to ma
0
votes
0answers
9 views

spring boot - spring data jpa error

main class annotations - @SpringBootApplication @ComponentScan( basePackages = "com.webstar" ) @EntityScan(basePackages = "com.webstar.models" ) @EnableJpaRepositories(basePackages = "com.webstar.rep
0
votes
1answers
13 views

Spring boot- serving angular views

I found many solutions for serving static resources with Spinrg Boot bu t i probably missed someting. I have two modules in my project- one is spring boot backend and the second is angular 4 project.
0
votes
1answers
23 views

Range within range of certain size?

Say I have a range of 1 to 1000. How would I get a random sub-range within that range that does not exceed a size of x? I have tried the following: int newMin = getRandomInt(1,1000); newMax = newMin
0
votes
0answers
3 views

Kafka ItemWriter for Spring Batch for Spring Cloud Data Flow

I've created a Spring Batch application which reads data from file and write to database. I want to write output data into Kafka. I've tried to use Spring Cloud Data Flow but could not even run it. I
1
votes
1answers
17 views

How to use multiple threadPoolExecutor for Async Spring

I am using Spring @Async on two classes. Both are ultimately implementing an interface. I am creating two separate ThreadPoolTaskExecutor so each class has its own ThreadPool to work off of. However d
0
votes
1answers
20 views

Persist radio checked value in Thymeleaf Spring

When searching, if we select a given field to search within and submit, our choice is forgotten. How could someone modify the view template to keep the previous search field selected when displaying r
2
votes
1answers
26 views

Why the concept of starting and stopping context and beans in spring

There are different ways in which a bean initializaiton/cleanup can be done. Also there are other event mechanisms. Along with all this why does spring have the concept of starting the context which I
0
votes
0answers
8 views

Upgrading from Elasticseatch 2.x to 5.x

Having upgrade Elasticsearch 2.x to 5.x , I got the following message in eclipse: The type org.elasticsearch.search.suggest.SuggestBuilder$SuggestionBuilder cannot be resolved. It is indirectly refer
-1
votes
0answers
18 views

java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.clearCache()V

Technologies:Hibernate,Spring mvc,Spring security, Postgresql, Jsp, Maven, HTML/CSS. Link on project - https://github.com/Dimassss/SpringSite/tree/my_site Problem: My project throw exception but I can
-1
votes
2answers
31 views

what is the use of CrudRepository in springboot

@RepositoryRestResource public interface StudentRepository extends CrudRepository<Student, Long> { public List<Student> findById(long id); [email protected]("select s from Student s where s.age
0
votes
2answers
32 views

Relative path to image folder java spring

I have a problem with a relative path to an image folder. I want to list the images into a folder to add their urls to a list and show them in a jsp. The code is this: File carpetaImagenes = new File
0
votes
2answers
30 views

@Autowired dependency injection in @Aspect is null for LoggerContext

My simple application working fine before adding LoggingAspectConfiguration class. Source code is as follows: (removed import statements) This is the top class package com.rsa.tools.springmvc.config
0
votes
2answers
19 views

Developing a spring boot application with docker on windows but run the docker container on a Ubuntu VM (as Docker Host)

I want to develope a sample spring boot application with Spring Boot, Docker and my IntelliJ IDE. My operating system is Windows 10 but I do not want to use docker on windows. Can anybody describe me
-2
votes
1answers
26 views

Large Data Transfer between enterprise applications

What is the best way to post large data for processing within enterprise applications? Data will be of size upto 1 GB Data when consumed, can be removed (if processed); need not be persisted. C
-1
votes
0answers
51 views

Spring Data JPA/Hibernate

I am creating a user access based on role. Now the roles in user_roles table is fixed and a user can have OneToMany roles but only out of roles available in user_roles table. So the design is like whe
0
votes
1answers
15 views

FlatFileParseException at Spring Batch for Date and Double Fields

I'm trying to figure out Spring Batch. I try to read data from file but got exception. This is my POJO: public class VehicleData { private Long vehicleId; private Date timestamp; private
-2
votes
0answers
20 views

Spring Autowired "Not a managed type"

I have this problem with Spring. I cannot understand what does not go. Should be a problem with the autowired attribute, I have also consulted other guides on the site but have not been successful. C
-1
votes
2answers
20 views

Spring request response send null value

Hi i built a backend with Spring and was thinking about whats the best solution in this case: I normally respond a request with a pojo with some data. But when the requesting user is not authorized i
-1
votes
1answers
17 views

intercept-url spring security cant get it right with custom login

im trying to authenticate a user defined in the code from a html login page this is my configuration. <security:http auto-config="true"> <security:intercept-url pattern="/**" access="ha
0
votes
1answers
15 views

Error occured processing XML 'org/springframework/web/servlet/resource/ResourceHttpRequestHandler'

I'm completely new to Spring, I just created a Spring Legacy Project with Spring Tool Suite 3.9.0 and Spring framework 4.3.10, and I don't find the solution anywhere to this error "Error occured proce
1
votes
3answers
3120 views

HTTP Status 500 - Error instantiating servlet class org.springframework.web.servlet.DispatcherServlet

Please don't flag this post as a duplicate one because I didn't find any good resource in the relevant question. Technologies used :- Spring MVC 4.3.3.RELEASE Gradle 3.1 Tomcat 9.0 I cr
0
votes
1answers
19 views

RxJava 2 in Spring boot 1.5.6

I have restController which return for example Single object @ApiOperation(value="Create new user") public Single<CreatedUserResponse> saveNewUser(@RequestBody UserRequest userRequest) { r
0
votes
1answers
16 views

How to use AuthorizationServerSecurityConfigurer?

I am looking at a Spring boot project which has this code: public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { oauthServer .tokenKeyAccess("permitA
0
votes
0answers
12 views

JasperException when using f: in jsp page

I'm trying t learn Spring MVC and my project is buid a jsp form input a product I added all jar jstl lib, and here is my taglib <[email protected] uri="http://www.springframework.org/tags/form" prefix="f
1
votes
2answers
34 views

404 Request Resource not found

I am using Spring Framework with restful web services, and I am trying to create an API with restful service and use a get method. I have created a method and I'm trying to have it return a string, bu
1
votes
2answers
1095 views

java.lang.unsupportedoperationexception The application must supply JDBC connections

I'm new to hibernate and I'm trying to write a simple program I faced with error for this line in java code: session.beginTransaction(); this is my hibernate.cfg.xml code: <session-factory&gt
0
votes
1answers
320 views

What application layer is responsible for providing external service integration capabilities?

I have a Spring Boot web application with presentation, business logic, data access logical tiers. Is it conceptually correct to describe external interface calls (REST, WS) to be in the Data Access L
4
votes
5answers
5498 views

java.lang.NullPointerException while creating DiskFileItem

I am trying to write a unit test for handling a file upload controller using Spring 3. Now if I send the image over to my service method through the controller everything works fine. But when doing a
0
votes
0answers
31 views

spring data mongo find method has no return

I use spring scheduler+spring data mongo. Now I meet a problem.The find() method on MongoTemple will block. The java code is: Query symbolQuery = new Query(); symbolQuery.addCriteria(Criteria.where