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
2answers
44 views

How to use insert asynchronously into Cassandra with Spring Data?

In the older version of Spring Data Cassandra, batching was achieved as below: String cqlIngest = "insert into person (id, name, age) values (?, ?, ?)"; List<Object> person1 = new ArrayList&lt
0
votes
0answers
8 views

Spring profiles 1.5.12

In the legacy app I am handling, I have three yaml files for profiles. application.yaml, application_dev.yaml and application_qa.yaml. In application.yaml, default profile is declared. For Spring 1.
0
votes
0answers
4 views

Changing language mid-file in JSP

I have a requirement where i am supposed to change the language in a JSP while iterating over an array of languages. More specifically i have the same code from a properties file, but i need to change
31
votes
11answers
25788 views

Hot swapping in Spring Boot

I've been doing a P.O.C with Spring Boot. So far it's been going really good and promising, but there's one major drawback: I'm using an embedded server (i.e., packaging the web app in a .jar), so w
0
votes
0answers
34 views

Spring Boot Maven Project : Could not transfer Artifact, Failed to authenticate with proxy

Created a sample spring boot project with Eclipse Oxygen. Getting this error when Spring Boot dependency is added. Failed to execute goal on sample-service-1: could not resolve dependencies for the
0
votes
1answers
10 views

http authentication dialog not popping up

Im trying to call(spring ) rest api which is protected using digest authentication using spring security , and trying to access it from redux front end . Im getting a 401 response back to the front
88
votes
3answers
31550 views

What is the difference between putting a property on application.yml or bootstrap.yml in spring boot?

What is the difference between putting a property on application.yml or bootstrap.yml in spring boot? In logging.config case, the application works different.
0
votes
0answers
10 views

Spring Required False Throws MissingServletRequestParameterException

I have a file upload controller which takes an optional parameter. However, it throws MissingServletRequestParameterException. Can someone please help explain why it says on the exception that the Str
0
votes
1answers
24 views

How to map a Spring Data JPA repository entity into a view model?

Here is the situation, I want to fetch an entity from database and map it to a new view domain model which has more or less properties, if this view model has more properties, signs the extra properti
0
votes
0answers
11 views

Hibernate Pagination leaves some records when using transactions

I have developed a simple hibernate pagination using .setFirstResult(int) and .setMaxResults(int) and i have ordered my select query and everything is as expected but when transactions are used some i
1
votes
1answers
27 views

How to close CallableStatement when using CallableStatementCreator and CallableStatementCallback

How to close CallableStatement in the following code snippet. Sonarcube is complaining me to close the CallableStatement I added finally block and closed callableStatement in doInCallableStatement m
0
votes
1answers
734 views

SessionFactory.getCurrentSession() vs EntityManager.createEntityManager()

So I had been working with Hibernate SessionFactory and its getCurrentSession method for inside a transaction for a while now. Session session = sessionFactory.getCurrentSession(); and having it i
0
votes
0answers
276 views

JPA multitenancy implementation

I'm faced with a new challenge of supporting multi-tenancy with JPA. I've searched around and it looks like JPA doesn't really offer anything that is usable in the long run. I see a lot of people talk
1
votes
1answers
1201 views

how can i parameterize datasource properties on Spring 4?

I am using Spring 4.16. I want to parameterize my persistence data. This is my config right now: @Configuration @EnableTransactionManagement public class PersistenceConfiguration { @Bean pub
1
votes
0answers
20 views

create custom query in Redis with spring

I'm beginner in Redis and I want to use Redis as my secondary Db (It's my cache server but i want add some capability to it(as Paging,dynamic filter content ,... )) and i think it should use some comm
0
votes
1answers
27 views

pointcut for method in parent abstract class

I have a scenario where my method to be intercepted is in the parent class and is not overridden in the pointcut class. Here is the sample classes: public abstract class A{ @RequestMapping(value = "/
0
votes
1answers
22 views

Elasticsearch and jhipster

I am using jhipster generated application with MySQL database. My application is deployed on tomcat with nginx on Ubuntu 18.04 (.war file generated with mvnw package -Pprod). To deploy I used the .war
0
votes
1answers
11 views

How can I reload specific application context bean dynamically?

I'm currently working on a groovy based application on the top of JDK8 and spring-beans:4.3.1.RELEASE. I need to introduce a method by which I can recreate a targeted bean by its name at runtime. I di
1
votes
1answers
19 views

Incompatibility between server and localhost charset

I'm currently developing a Spring Boot App with MariaDB as a Database. My localhost is a Windows 10 installation and the production server is a AWS Linux (first gen) image. On localhost I have a loca
1
votes
1answers
22 views

Required request part is not present - Spring

I am trying to pass the attached file information to the spring controller from agularjs controller. I am facing issues while passing the information from angularjs to spring controller, it is throwin
1
votes
1answers
23 views

Not able to invoke REST service in spring RestController

I have implemented REST webservice using Spring 5 @RestController. pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sch
1
votes
1answers
157 views

Com Smoketurner dropwizard-swagger with dropwizard 1.1.4 throws Null Pointer Exception at specFilter class

I am trying to upgrade DropWizard version from 0.9.2 to 1.1.4, and in turn change the com.smoketurner dropwizard-swagger 1.1.1-1 which downloads dependencies io\swagger\swagger-jersey2-jaxrs\1.5.15
0
votes
0answers
14 views

Export and Import File: Back-end or Front-end?

I'm confused about doing exporting in the back-end or front-end. For example in export: Using Spring and JPA Get data (repository) return ModelAndView (controller) in csv format using super-csv B
0
votes
2answers
54 views

How to save an image from HTML to a DATABASE using JAVA

<form:form id="companyForm" enctype="multipart/form-data" method="POST" action="/DTR/secured/admin/company/save" commandName = "command"> So, I was asked to save an image file to a
0
votes
0answers
11 views

Spring : How to show image in thymeleaf from database

I'm doing project with Spring Boot+Spring Data+Spring MVC.I want to show image from database to thymeleaf but image not displayed. This is my code <span th:each="room,iterStat : ${room}">
0
votes
2answers
29 views

In SpringMVC I want create Hello World with Http Session

First of all, my English is not good, so I will use the image, hope everyone sympathize I follow step by step in the tutorial video, but when running it does not work, I do not understand why, expect
0
votes
1answers
29 views

How Can i do a simple login with spring boot + JPA without spring security

I'm looking for a way for send the object user to a indexController for do a Query on Usuarios table if match a user in the table the object user won't be null and the controller redirect to another
0
votes
1answers
15 views

Trying to import static javascript to thymeleaf

I am working on a java spring project and would like to add a static javascript file to an HTML page. here is what I currently have it seems to work for the css but not the js. the basic file structur
4
votes
3answers
1329 views

WebExceptionHandler : How to write a body with Spring Webflux

I want to handle the Exception of my api by adding a WebExceptionHandler. I can change the status code, but I am stuck when i want to change the body of the response : ex adding the exception message
50
votes
9answers
65844 views

How to set base url for rest in spring boot?

I'm trying to to mix mvc and rest in a single spring boot project. I want to set base path for all rest controllers (eg. example.com/api) in a single place (I don't want annotate each controller with