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
31 views

bug in my javascript code

When I send a post request to my url, my controller manages to save the record to the database, but my ajax falls into error. What am I doing wrong? my js code: function salvarValores() { capturarV
0
votes
1answers
16 views

Spring Boot + Atomikos: Exception thrown in a transactional JMS listener inside try-catch immediately causes rollback

I'm using Spring Boot 1.5.3 and Atomikos 4.0.6. I have a DefaultMessageListenerContainer setup to listen a JMS queue and handle incoming messages in a transaction using the Spring JTATransactionManage
0
votes
1answers
14 views

Prevent multiple sort parameters with Pageable in Spring REST Controllers

I'm working an API using Spring Boot and Spring Data repos (although not Spring Data REST). @GetMapping public List<Foo> listFoos( @SortDefault(value = "name", direction = Sort.Direction.AS
0
votes
0answers
5 views

Spring security custom login page infinit get requests of the login page

I have a spring boot application where I have used spring security in order to authenticate the user. I want to use a custom login component developed in reract-js. I was able to render the react comp
0
votes
1answers
19 views

Null pointer while trying to access Bean

I have a configuration class which creates multiple beans: @Configuration public class TopLevelConfig { @Bean public MyMapper myMapper() { MyMapper mapper = new MyMapper(); ma
0
votes
0answers
5 views

Spring boot and hibernate web app - Cannot add foreign key constraint error

I am using spring boot and hibernate for a simple web app. When I am trying to run it I get this error 3 times. org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC
0
votes
0answers
12 views

How can I log requests for unknown URL endpoints in Spring Boot?

I have a Spring Boot application which uses SpringBootServletInitializer. In my Controller I have multiple endpoints that are differentiated based on the param that are included in the URL, like this:
33
votes
8answers
122411 views

Autowiring fails: Not an managed Type

I have a big problem in my diploma project and would be very glad if you guys could help me! I made a Maven Multi Module Project and have 3 "Core-projects" NaviClean: (Parent) NaviCleanDomain: conta
0
votes
0answers
20 views

Springboot @Scheduled Pauses

I've written a springboot application to perform etl from data source to another data lake every 15 mins. I've scheduled the execution using @Scheduled annotation to a function. I had created jar and
0
votes
0answers
15 views

spring hibernate java.sql.SQLException: The result set is closed

I have a problem with Spring application and getting data from datebase with DTO. I got "java.sql.SQLException: The result set is closed". Database is Firebird (Jaybird version 3.0.3). my dto file:
0
votes
0answers
12 views

Spring 5 cache not work for @Cachable (CacheInterceptor is not in call stack)?

I enable caching for a public method by adding @Cachable annotation as follow: @Cacheable(cacheNames = "saas_setting", // key = "#key") public Setting get(String key) { ... } In the other h
0
votes
0answers
16 views

Logical operators not working as expected in SpEL

I have a usecase where I have two boolean properties, based on which I need to derive a value of instance variable. Below is the code snippet: @Value("${propFlag1:false}") private Boolean flag1; @Va
0
votes
1answers
19 views

Spring batch reader complain about resource

I've got the below error when I try to start spring boot application. It gives an error even before I provide my job parameter which is a parameter for my job. Lot of discussion suggest to use reso
0
votes
1answers
13 views

Spring - native queries mixed with hibernate when columns name are not the same as in the model

I'm trying to make some queries that should return a list of users paged, sorted, etc but since the column names are different than the model properties I can't mix the native queries with hibernate g
0
votes
0answers
10 views

Why is the session beans created as Singleton bean at starting and can it not by created by creating session?

I am using for web application with spring 5, JSF 2.3, Primefaces, CDI, Hibernate. Why is the spring-managed session bean created as Singleton bean at starting and why can it not be created by creat
0
votes
3answers
536 views

Parsing Generics with Spring Expression Language(SpEL)

How to parse generics expression using SpEL? StandardEvaluationContext context = new StandardEvaluationContext(); ExpressionParser parser = new SpelExpressionParser(); String queryString = "new List&
-1
votes
0answers
10 views

Login is redirected to /j_spring_security_check which gives 403 Forbidden

I am trying to update a very old project from Spring 3 to Spring 5 and have run into an issue I can't seem to get past. I have a login page like so: <%@page pageEncoding="UTF-8"%> <%@taglib
2
votes
2answers
164 views

Add reason phrase back in spring-boot 1.4.x

As noted here and here, the latest version of Spring Boot (1.4.x) does not return the reason phrase due to the new version of Tomcat. Unfortunately I am constrained by some legacy code that I cannot
0
votes
1answers
1033 views

Spring MVC Error creating bean with name 'dataSource' defined in class

Great God to help request My spring-dao.xml configuration is as follows: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://
0
votes
0answers
9 views

Workaround for @Formular bug

I have a little problem to find an appropiate workaround for this bug. I need both the birthdate of a user and the next birthday as a persisted field in the entity class. The mentioned workaround use
12
votes
6answers
46329 views

Why Spring's jdbcTemplate.batchUpdate() so slow?

I'm trying to find the faster way to do batch insert. I tried to insert several batches with jdbcTemplate.update(String sql), where sql was builded by StringBuilder and looks like: INSERT INTO TABL
4
votes
3answers
7725 views

Custom validation on RequestHeader Spring Boot

I currently have this Request Mapper where I am doing validation on a Request Param using a REGEX. @RequestMapping(value = "/example/{id}", method = GET) public Response getExample( @PathVa
0
votes
0answers
8 views

No exception for queries during Cassandra connection drop

In our SpringData Cassandra application, when connection to data store, connection retires happen as 2018-04-25T10:30:00.677+0000,ERROR,[Control connection] Cannot connect to any host, scheduling re
20
votes
4answers
21659 views

How to prevent spring-boot autoconfiguration for spring-web?

I'm using spring-boot and added spring-web dependency in maven pom, to make use of RestTemplate. Now spring tries to initialize an EmbeddedServletContext. How can I prevent it? Exception in thread "
2
votes
1answers
22 views

Multiple Scheduled in the same method

I'm working with @Scheduled annotations. I need to run the method in different moments, exactly each 2 and 5 seconds. How can I do it? In this moment my code is the next: @Scheduled(cron = "${cron
0
votes
3answers
21 views

JpaRepsitory giving error while using method existsByUserName(String userName);

I have created a JpaRepository interface where i define a method named existsByUserName(String userName). But because of this method, i am getting error.Jparepository interface is package org.avi
-3
votes
0answers
23 views

How to add background video in JSP page?

I am trying to add video in background to my website. But it's showing blank page.
6
votes
2answers
16464 views

2 beans with same name but in different packages; how to autowire them?

I have an application that has 2 beans with the same name, but which are in different packages. My Spring application fails because it cannot decide on which bean to take. Is there any solution for th
0
votes
0answers
13 views

Generic type on jsp

I have some classes hierarhy: public class Animal { private String name; ... } public class Dog extends Animal { ... } public class Cat extends Animal { ... } I also have jsp form to
0
votes
0answers
3 views

Swagger unable to scan the dynamic url building nature of Jersey

I've been working on a project that uses the following tech stack at it's backend: Spring-Core (not MVC) Jax-RS (Jersey 1.19) Inorder to document the APIs we were advised to use Swagger2. Followi