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
0answers
5 views

Maven plugin to replace script tags

I need a maven plugin to help me replace the script tags in my webapp with the minified version based on the profile that I'm in. Basically I'm looking for the maven equivalent of the grunt-usemin t
1
votes
1answers
13 views

Spring Boot rest API encoding error

I create a small service which take a string from UI textarea, and pass the string to a spring boot rest service, the string include a piece of java code and will be analyzed by spring logic and push
0
votes
0answers
2 views

what is the purpose of installed facet="jst.web" in org.eclipse.wst.common.project.facet.core.xml

Whenever I import a maven project to Eclipse I get version 2.3 for facet jst.web. I have to manually change in this file (changing via right click on project > projects > choose 3.1 for Dynamic Web Mo
-1
votes
0answers
3 views

Spring Boot with HTTP 2 Server Push

I tried the example from https://github.com/bclozel/http2-experiments and I don't really understand how HTTP/2 is working in this case. There is a Http2Controller, which has an annotated method with
0
votes
0answers
12 views

How do I execute asynchronous queries on Sprint data + JPA custom repository impl?

I have this custom query (just a simple example): public List<ProdutoEntity> findByDescricaoStartsWithCustom(String desc) { String query = "SELECT p FROM ProdutoEntity p WHERE p.descric
0
votes
1answers
14 views

Java: Use an Spring Autowired library with Guice program

I have a server that I've been developing. It uses Guice for it DI. There is a team library that I need to use. It uses @Autowired for its DI. My code import team.requiredlibrary.NeededClass public
3
votes
1answers
13 views

Spring RestController POST 400 Bad Request

I have a Spring RestController that any attempt to post to it returns 400 Bad Request despite seeing the correct data being sent in Chrome Developer Tools. The @Valid annotation is kicking it out beca
-4
votes
0answers
10 views

Maven clean install stops when I try to build a Spring Boot Application

Maven clean install stop at this point "o.hibernate.annotations.common.Version ". /\ / ' __ _ ()_ __ __ _ \ \ \ \ ( ( )_ | '_ | '| | ' / ` | \ \ \ \ \/ )| |)| | | | | || (| | ) ) ) ) ' |____|
0
votes
0answers
7 views

Can't merge a non object mapping [suggest] with an object mapping [suggest]

I'm using Spring with Elastic Search. I have entity with Completion field, which is being used for suggest: @Document(indexName = "entity_index", type = "entity") public class Entity { @Id private Lo
1
votes
1answers
960 views

How to filter postgres array column with the JPA criteria API?

I am using: Hibernate 4.3.5 Spring JPA 1.6.0 Javax Persistence API 2.1 The "refcodemailing" column is defined as an array of int: int[] My entity object: @Entity @Table public class CalendarEven
0
votes
0answers
14 views

Spring data mongodb group aggregation object

I'm trying to group a object based on a query with spring data and mongodb, that's what i do till now: Mongodb data: { "_id" : ObjectId("58af31feef34aa45476d2be9"), "_class" : "my.model.Image", "
0
votes
0answers
22 views

JPA, Hibernate query language translate from mySQL

I'm preparing Spring web app (JPA/Hibernate + mySQL + Thymeleaf) for generating report from three tables (see below). My target is: i have website with input form where when I'm writing a couple of fi
2
votes
1answers
57 views

Using monads in Springboot application to catch exceptions

So our project back-end is a Java 8 Springboot application, springboot allows you to do some stuff really easily. ex, request validation: class ProjectRequestDto { @NotNull(message = "{NotNull.Do
1
votes
1answers
30 views

Spring Security Java config does not intercept request accessing JSP available only for authenticated sources

I am making a Spring MVC web application. I have a login page and a dashboard page. Anyone attempting to access the dashboard JSP must be logged in: Here's my Spring Security config: @Configuration
0
votes
0answers
8 views

system_auth replication in Cassandra

I'm trying to configure authentication on Cassandra. It seems like because of replication strategy that is used for system_auth, it can't replicate user credentials to all the nodes in cluster, so I e
15
votes
3answers
18297 views

"Could not find acceptable representation" using spring-boot-starter-web

I am trying to use spring-boot-starter-web to create a rest service serving up JSON representations of Java objects. From what I understand this boot-starter-web jar is supposed to handle the conversi
1
votes
1answers
8 views

@mock annotation with custom Answer class in Mockito

I'm using Mockito with Spring framework in my project. I have a test case like this Class someTest(){ @mock SomeDao dao; @injectMoke TestTarget target; class myAnswer implemen
0
votes
0answers
11 views

spring boot Angularjs upload image

i have a controller to upload files and this is the code @RequestMapping( value = "/upload/{id}", method = RequestMethod.POST ) public ResponseEntity uploadFil
0
votes
0answers
8 views

Spring Boot + Thymeleaf - form validation

i have problem with Thymeleaf when validating form. I'm trying to create simple user register form to learn Spring and i'm unfortunately stuck. Here is my UserForm class public class UserForm {
1
votes
1answers
12 views

Reuse Spring Mockmvc in unit tests

Can Mockmvc be reused within a test suite? I have several test suites so having to initialize the mockmvc between every test and then running all tests is really slow! I've tried putting mockMvc into
0
votes
0answers
7 views

Is it possible to create WebSocket application along with Spring MVC

I don't have much idea about Spring framework so I am asking here. Is it possible/OK to create an Spring based WebSocket application inside a larger Spring MVC app? All examples that I have seen cre
0
votes
1answers
13 views

Common spring jpa repository with multiple entity finders

My application has over 250 tables with each having ID and name columns. I am trying to migrate our application from hibernate 3 to Spring-JPA 4.3 with hibernate 5+. In my current hibernate layer I
49
votes
15answers
55977 views

JUnit tests pass in Eclipse but fail in Maven Surefire

I have written some JUnit tests using JUnit 4 and spring-test libraries. When I run the tests inside Eclipse then run fine and pass. But when I run them using Maven (during the build process), they fa
0
votes
1answers
11 views

InterceptingAsyncClientHttpRequestFactory Use

I was trying to understand the use of InterceptingAsyncClientHttpRequestFactory. When run test with MockRestServiceServer I saw requestFactory is decorated with this ResquestFactory. Is there any othe
0
votes
1answers
32 views

How to call HTTPS restful web services using Spring RestTemplate

I am using Tomcat7, Spring framework for ReST web services. I am trying to call an https web service using Spring RestTemplate. I am getting the following error: unable to find valid certification
0
votes
0answers
11 views

Why Spring boot app is not wokring via JarLauncher ,but works fine with java -jar xyz.jar command

TRACE [main] [org.springframework.core.io.support.SpringFactoriesLoader] Loaded [org.springframework.boot.diagnostics.FailureAnalysisReporter] names: [org.springframework.boot.diagnostics.LoggingFailu
0
votes
1answers
15 views

Error on configuration of JNDI lookup for WebLogic + Spring

I'm migrating an application from OC4J to WebLogic 12c and the Spring beans are giving an error I can't figure out how to solve. My question is what can be the cause of this error. I have the followin
0
votes
0answers
4 views

spring.data.neo4j @Autowired Repository is null

I have a problem and I can not find anything that could help me. I wanted to try Spring Data Neo4j in a Maven Project. I can run my application, I get no error. My application is running, but my repo
0
votes
1answers
8 views

Liferay 7 (DXP) Spring MVC portlet, issue accessing service builder generated services

I am facing issue while accessing services (generated through service builder module project) from Spring MVC portlet, I read through forums link https://dev.liferay.com/develop/tutorials/-/knowledge
0
votes
0answers
13 views

Spring Boot returning blank PDF/malformed files

I need to stream a file from another server and serve it as a response. The following controller which is returning a blank PDF but with the correct number of pages. Some pages are being returned wit