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

0
votes
1answers
23 views

Download a file using Angular 6 and Spring Rest API

I have a problem downloading a file from a rest api using angular 6 Back-end method @RequestMapping(value = "/print/{id}") public ResponseEntity<byte[]> generateReport(@PathVariable("id"
0
votes
0answers
3 views

Load properties when MockitoJUnitRunner is used

I'm trying to load a property value from my application-test.properties in my service unit tests(using MockitoJUnitRunner.class) but it gets always a null value using @Value annotation. @RunWith(Mock
0
votes
0answers
4 views

o.s.web.servlet.PageNotFound No mapping for GET

friend, I'm using RestController from spring data to consume data from external API. When I use PostMan to get data, I get this 404 error code. But if I use direct URL with a header on POSTMAN I get
0
votes
1answers
11 views

Secure Rest Service in AppEngine

I am developing a rest service using spring framework. I deployed it to google cloud app-engine and It worked. Now I am trying to make my rest service. What is the best way to secure a restAPI deploye
2
votes
2answers
33 views

Spring data map pojo to varchar

Using Spring Data JDBC I would like for the Inner object to be mapped to a varchar column in the outer table rather than being mapped to its own table. Is this possible? public class Outer { @Id
1
votes
2answers
1992 views

@SQL one time per class

I'm writing some integration test using spring framework. I have different SQL scripts for different integration test classes. Something like this: @ContextConfiguration(classes = ...) @Sql("classpat
0
votes
0answers
32 views

java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V

I am facing the following error while trying to run my service. Can someone please help me out in this ? I am not sure if it is a spring version mismatch issue. I use the same version as defined in my
21
votes
5answers
82250 views

receiving json and deserializing as List of object at spring mvc controller

My code is as below: controller @RequestMapping(value="/setTest", method=RequestMethod.POST, consumes="application/json") public @ResponseBody ModelMap setTest(@RequestBody List<TestS> refunds
0
votes
1answers
11 views

Spring JPA - Dropdown list (Filled with data from another table)

I've a problem to insert data to table from my form. So, I have a two table with relation ManyToOne. TORDER and TSYSTEM. I want to insert data to TORDER table via form in my .jsp page. Data for one
0
votes
0answers
15 views

Spring Boot 2.0 with OAuth 2.0, performance in IDE different with jar

I build an OAuth2 Server,with jwt token. I try to login with password mode,and when I run my code in IDEA, all goes well,but when I package it to jar,I cant login and get Exception. here's my debug l
0
votes
0answers
9 views

Spring aop: Capture method that throws Exception

I need to capture an execution pointcut at this method: package net.space.service; // imports @Service public class RepositoryService { private Reference createDocumentFromBytes( Re
0
votes
0answers
11 views

When I remove spring batch data: Operation not permitted on a closed resultset

My environment is: JPA, Spring-boot, batch I want to remove expired batch data by using batch. I created a tasklet and services. @Override public RepeatStatus execute(StepContribution contribu
0
votes
1answers
3521 views

Bean method 'dataSource' not loaded Spring Data JPA

I am trying to implement the Spring Boot application with Spring Data JPA. I have created everything but while running the application I am getting Bellow Error : *************************** APPLICAT
1
votes
1answers
24 views

Intermittent RestRepositoryController 404 issue with Spring Boot 1.5.10?

I am experiencing a strange issue with Spring boot and one controller. I believe it is due to a conflict with another controller which is similarly named (a newer version) The structure is like so
-1
votes
0answers
26 views

java: how to duplicate value with different parameter type

I have problems with my spring code, and I am trying hard to find a solution. I would like to parse my values from dto to model and vice versa with different parameter types. Here are the SC: UserMo
-1
votes
0answers
21 views

http error 404 resource not found in spring mvc

web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"xsi:schemaLocation="http://java.sun.c
0
votes
0answers
7 views

How to transfer embedded pKey from Grand parent to Grand child spring boot onetoMany mapping using CRUD

I have 3 model classes (namely A, B & C). A is the parent having onetoMany bidirectional relationship with B. B is parent to C and having onetoMany bidirectional. B & C having embedded pKey.
0
votes
1answers
24 views

Spring cache @CacheEvict matches key in a list?

I'm using Spring cache and trying to evict cache by a list of key(id). @CacheEvict(value="cacheName",key=?, condition=? ) public void deleteByIds(List<Integer> ids){...} How can I manage to
16
votes
4answers
10458 views

Spring nested transactions

In my Spring Boot project I have implemented following service method: @Transactional public boolean validateBoard(Board board) { boolean result = false; if (inProgress(board)) { if (
0
votes
0answers
9 views

JMS-131 (Session is closed) with CachingConnectionFactory and Oracle AQ

I'm facing an issue (JMS-131 - Session is closed) regarding the Spring-JMS CachingConnectionFactory in combination with Oracle UCP. Either the CachingConnectionFactory or the JmsTemplate don't seem to
1
votes
0answers
6 views

High latency related to Spring Integration Outbound Gateway connecting to REST service

I am not sure why Spring Integration code will cause a high latency unless the server endpoint is having latency issue. Currently bikesDataOutboundGateway.handler is having intermittent issue with hig
-5
votes
0answers
14 views

How to Convert STL file in PDF Using Jsp and MySql

How to Convert STL file in PDF Using Jsp and MySql? Provide code for this problem
1
votes
1answers
39 views

Spring boot Jsp file not found

Spring boot is not able to find the jsp file in the application. I do not know why it is not able to find the jsp file in the given path. Can you please let me know how to resolve it SpringBootHell
0
votes
0answers
36 views

Spring Boot @SpringBootTest gives NoClassDefFoundError: ...DataAccessException

I'm unable to solve this. I have a spring boot application. Main class annotated with @SpringBootApplication. Test class annotated with: @RunWith(SpringRunner.class) @SpringBootTest Everything
0
votes
1answers
24 views

java.lang.IllegalStateException: Failed to introspect Class

I am trying to add Elasticsearch to my project. I have addded the necessary dependencies to my pom.xml file. When I run the server I am getting this error: java.lang.IllegalStateException: Failed to
0
votes
1answers
29 views

Spring JPA : OneToMany List update results in duplicate entries

I have below JPA Tables. I have used uni-directional OneToMany relationship. @Entity @Table(name = "xxx") public class Parent { @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, orpha
4
votes
2answers
2261 views

Spring Validation vs Hibernate Validation

I am confused between the two now. I know Hibernate Validator 6 is the reference implementation for Bean Validation 2.0 specs. It supports Grouping , Internationalization of error messages, Custom Met
0
votes
1answers
15 views

read files from hdfs location using spring batch 4 java config

I want read all the files from HDFS location and process files sequentially using spring batch.Currently I was using the MultiResourceItemReader to read the files from local file system and processing
0
votes
1answers
9 views

How to create spring security login page in vaadin with Java only?

I'm currently building an web app with spring and vaadin. I searched for days to find a solution to create a custom login page with vaadin for spring security. I've got the layout, but don't know how
0
votes
1answers
20 views

Spring MVC Project(s) setup in Eclipse - separate base packages and web and rest apis

I am working towards building a Spring MVC based Web application project along with rest API for the same to work with mobile Apps. For this i am trying to setup the project structure in Eclipse as t