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

Mongo Repository find by condition is not working

I have a MongoRepository query method which needs to fetch data based on conditions. I have the following record in database. { 'name' : 'test', 'show' : false, 'free' : true } And the following q
1
votes
1answers
14 views

javax.validation.constraints.Pattern negate word

I would like to use javax.validation.constraints.Pattern for validation. The text should not be none or others. Allowed Examples: something word NOT allowed: none others I am trying around b
0
votes
2answers
691 views

1 constructor arguments specified but no matching constructor found in bean, Why auto-wire byname doesn't work with constructor-arg

How can I set emp Id as well as its address, And I also want to keep autowire = "byName" for address. Please avoid answering by <constructor-arg ref="address"> Below is my scenario sprin
0
votes
0answers
6 views

MYSql calculate total amount from sub query using HQL

@Query(value = "SELECT SUM(amount) FROM (SELECT t1.amount FROM Table1 t1 " + "INNER JOIN t1.table2 t2 " + "GROUP BY t1.txnId) a ") public double getAmount(); Above HQL i
0
votes
0answers
10 views

Hibernate connecting table unique on columns problem

I have problem with hibernate because he creates connecting table (I don't know why will be nice if can tell me where and why), and what is worst he using unique on columns and i cant add more then on
0
votes
1answers
51 views

Prevent hibernate entity changes from being persisted

I am updating my application from Spring Boot 1.4.5 / Hibernate 4.3.5 to Spring Boot 2.0.9 / Hibernate 5.2.18 and code that used to work in the previous configuration is no longer working. The scen
3
votes
3answers
1674 views

Spring Batch - how to execute a specific step

I've developed a Spring Batch with 10 Step. How can i execute a specific Step ? My wish is to passed in JobParameter the Step to execute. Only the Step specified in JobParameter must be executed. I
0
votes
0answers
8 views

What precisely means setSessionTransacted in JMSTemplate?

Please explain me if I understood correctly Spring documentation. Spring docs states: https://docs.spring.io/spring/docs/current/spring-framework-reference/integration.html#jms-tx (...)When you u
0
votes
2answers
40 views

Ajax javascript Map to Spring controller

I am trying ajax Javascript Map, to spring controller. but it's getting null in backend. Please excuse if i am repeating question. I can't change Map type, as my whole front end logic on it. Because
0
votes
2answers
14 views

Spring Boot 2 Actuator Micrometer setup

I have a Spring Boot Application and I have this dependency: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifact
0
votes
0answers
6 views

Thingsboard performance tests

I try to execute the thingsboard performance test Thingsboard performance tests $ sudo docker run -it --env-file .env --name tb-perf-test thingsboard/tb-performance-test but I get this result, any
0
votes
0answers
9 views

Spring boot, how to insert a new record with in a table with an EmbeddedId

I am new to Spring-boot but kind of familiar with JPA. I have a project I am working on, I already have my database set up and generated my models from my database. I have worked on at least 4 JPA pro
0
votes
0answers
12 views

How to create relation between new entity and existing entity without updating existing entity?

I have a Phone entity and a PhoneType entity. Each Phone has 1 PhoneType, and each PhoneType can have many phones. I want to add a new Phone while using an existing PhoneType, but when I create the n
1
votes
3answers
197 views

Spring MVC - content-type aware response from filter

when you're writing Spring REST endpoint, Spring offers quite convenient way how to handle multiple response formats based on the content-type. You just need to register MessageConverters and basicall
1
votes
0answers
14 views

security for web applications session vs token

Background: I am developing a web application, planned to use spring-mvc and spring security. My plan is to use form based authentication where spring security authenticates credentials and sets a ses
1
votes
0answers
51 views

SpringBoot overriding AnnotationConfigApplicationContext throws no such bean defined

I have got the problem. I want to override AnnotationConfigApplicationContext. But I got NoSuchBeanDefinition. I have got some class, which has constructor and any methods import com.package.pack1;
0
votes
1answers
11 views

On large JSON strings only in Ajax request, getting MissingServletRequestParameterException: Required String parameter '..' is not present

The following code works 90% of the time on normal-length JSON strings. I receive an incoming JSON String in my SpringMVC Controller, formed from a DataTable .data(). Ajax: function exportParticipan
11
votes
3answers
9081 views

No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor

When i try to navigat to an endpoint i get tho following error Type definition error: [simple type, class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor]; nested exception is com.fasterxm
0
votes
0answers
10 views

Always call UPDATE in Spring Data JPA save() without any additional SELECTs

Using Spring Data JPA and its CrudRepository, I am saving the data using save() method (docs: https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/repository/CrudReposi
0
votes
1answers
24 views

How to UPDATE multiple rows, based on multiple conditions?

I'm trying to update a single column in a table for many rows, but each row will have a different updated date value based on a unique where condition of two other columns. I'm reading the data from a
0
votes
0answers
6 views

How to configure Model Mapper with Google Cloud Endpoints only once?

So far, I've only worked with Spring boot and model mapper. In Spring boot, I just had to create a Bean once where I'd configure model mapper (stuff like custom converters) and then just return an ins
0
votes
0answers
11 views

How to make a rest endpoint in Camel Using Spring DSL (XML)

What I have right now is this <camel:camelContext id="camelContext" trace="true"> <camel:restConfiguration bindingMode="auto" component="servlet" port="8090"/> <camel
0
votes
1answers
16 views

How to check Database health and connection pool health

@Component public class CustomHealthIndicator extends AbstractHealthIndicator { @Override protected void doHealthCheck(Health.Builder builder) throws Exception { // Use the builder to build the h
0
votes
0answers
8 views

How to create jaxb java class from xsd

I was writing rest application. I was wondering where and how I'm getting the following errors after request from rest application. @RequestMapping(value = "/{phone}",method = RequestMethod.GET)
0
votes
1answers
19 views

How to run my Spring tests before every commit/push?

Surprisingly, I was not able to find a this question on this website, so here it comes : How can I run my Spring tests before every git commit/push (CLI, GUI and IDE integration) and have this comma
2
votes
1answers
32 views

Spring mongo ignore field from being read

I have an abstract class describing a mongo document. There could be different implementations of this class that need to override an abstract method. Here is a simplified example: @Document @JsonTyp
9
votes
8answers
4530 views

Java enums mutability usecases and possibilities?

I don't know if I'm the only one to know that, but the values of an enum are not implicitly final and can be modified. enum EnumTest { TOTO("TOTO 1"), TATA("TATA 2"), ; private Str
0
votes
0answers
30 views

Convert byteArray from fileInputStream

I wanna read huge file(more then GB) and convert that as byte array in order to store the file dB. The problem i am facing is when i convert file to byte array or reading the file i am getting Java h
0
votes
0answers
8 views

How to filter a read-only Hateoas resource in Spring?

I have a moderately complex group of services that adhere to the HATEOAS part of a REST application. The whole fronted is strictly written in Angular so it seems to work for what it was designed. Wh
0
votes
3answers
16 views

How to get id current-logged in Spring

I have User class with id, username, and password. And now I want to create a page where I can post some introductions about the user like birthday, about, full name, etc. But I need to associate th