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

Problems with the relationship of one to many

I have problems with the relationship of one to many, to relate I just want to use the user ID I do not want to create a new one, I put my code @PostMapping("/createFavorite") public ResponseEnti
1
votes
1answers
38 views

How create relation a user with many favorite things?

I need create favorite things of users, a user have many favorite things, my question is, which is the better way this relation? my first idea is: @Column(name = "favorite") Set<Favorite&gt
0
votes
0answers
9 views

Failed to set an indexed property on 'CSSStyleDeclaration'

I have a project with Gatsby where I use React Spring. I am getting the following error: TypeError: Failed to set an indexed property on 'CSSStyleDeclaration': Index property setter is not supported
2
votes
4answers
2467 views

¿How i can disable CSRF only for my api with spring security?

Im creating a project with spring using spring security but i am having problem only with my api(all controllers are working correctly with csrf). But seems like the csrf is causing problem to my api,
1
votes
0answers
16 views

Spring SAML with reverse proxy - inresponsetofield of the response doesn't correspond to sent message

We have our spring boot app which is integrated with Spring SAML. And we are also using Spring SAML DSL in WebSecurityConfigurerAdapter to initiate the SAML context. Here is how we have configured t
1
votes
0answers
25 views

How to set property sort ,When i use Jpa Example.of

How to assign property sort to generated sql? thanks table has index , i want set index property is first in where Message condition = new Message(); condition.setReceiver(account); condition.setCha
0
votes
0answers
19 views

How to Configure AWS RDS for a Spring Boot Project Running on an EC2 Instance?

I have an AWS EC2 Linux instance running a jar from my Spring Boot Project. I created a an AWS RDS Postgres instance, and I am trying to call it from within my service that's running in my EC2 instanc
0
votes
2answers
30 views

JdbcTemplate. IncorrectResultSetColumnCountException: Incorrect column count

I use Spring JdbcTemplate to query list of several values: List<String[]> tankNames = jdbcTemplate.queryForList( "select name, country, level from tanklist", String[].class);
8
votes
2answers
466 views

typeMismatch.java.util.List when trying to set a list

I am trying to set a List<Long> to an Java object. The set function is: ResponseEntity<String> response = bcInsertService.addNewClip(new PrmBcClipInsert() .setTags(Arrays.asList(new
0
votes
0answers
25 views

Error handling - Consumer - apache kafka and spring

I am learning to use kafka, I have two services a producer and a consumer. The producer produces messages that require processing (queries to services and database). These messages are received by th
1
votes
1answers
65 views

How to create grouped Swagger Annotations - Annotation disallowed for this location

I want to group this annotation: @ApiResponses(value= { @ApiResponse( code = 200, message = "Successful status response"), @ApiResponse( code = 400,
0
votes
0answers
31 views

Hibernate Generating Extra Queries for Optional Composite Key Join

I am using Spring Boot 2.1.4 w/Hibernate Core 5.3.9.Final (and Lombok as you'll probably be able to tell). I have an entity that contains two different joins on it: one on a single field, and another
0
votes
1answers
28 views

Spring / Reactor : Retrieve and modify a Mono

I have the following model : class Person { List<Address> addresses; } I used the ReactiveMongoRepository to retrieve a Mono. public interface PersonRepository extends ReactiveMongoRepos
1
votes
1answers
160 views

IS Spring Security SPNEGO API CSRF safe?

I have implemented Spring Security extentions SPNEGO API for Single Singh On in my application. Can anyone help me to know, is kerberos protocol or SPNEGO is CSRF safe? Do i need to implement CSRF saf
3
votes
3answers
8467 views

Dynamic Spring Security using SQL Query

Hello I want to make an intercept url pattern and access dynamically by using sql query in spring security. Generally we use this type of notation in XML and I want to take these values (/add-role a
0
votes
2answers
39 views

Spring Boot + Hibernate not using correct dialect for multiple datasources

I am setting up a Spring Boot (2.1.6) (with Spring-Data-Jpa) backend that uses 2 datasources of different types - Microsoft SQLServer and MySql. It doesnt use the correct dialect, even though specifie
0
votes
1answers
23 views

running spring cloud stream application as web app

I have a spring cloud stream application which I also want to run as a web app. The reason I need to hit at http://host:8080/ to see if the application is up to health check. I have following dependen
5
votes
3answers
168 views

Gradle Android Error: MethodHandle.invoke and MethodHandle.invokeExact

I'm trying to consume a SOAP service in my Android app. I'm trying to follow this guide. When I try to run my app I get an error: Error: MethodHandle.invoke and MethodHandle.invokeExact are only supp
1
votes
1answers
518 views

How to pass to Spring parameter by @Query, sql isn't working

I'm using Spring 4, PostgreSQL and EclipseLink. I would like to build a query to the DB, passing two parameters. I'm having these troubles : Call: SELECT n.id, n.volume, n.numero FROM numberentity n
0
votes
1answers
16 views

Spring JPA applicationContext.xml for Google Cloud SQL Postgres

I want to connect to Google Cloud SQL Postgres using my Spring 4 application using JPA. Previously, my applicationContext.xml contained: <bean id="transactionManager" class="org.springframework.or
0
votes
3answers
2943 views

How to resolve SQLServerException: Invalid object name?

I am creating a spring boot application using MS SQL server. I have a requirement where I need to initialize USERS table in user_database database using data.sql file placed in /src/main/resources/ fo
0
votes
4answers
6246 views

need to print a list in jsp which is passed from spring controller

I am getting an error in one spring example that I am following. I am able to get input from the user and transfer the data to Spring controller where it gets updated in the database using a hibernate
0
votes
1answers
14 views

Autowiring Constructor With Conditional Beans

In a @Service, I want to include two @Component, say ComponentA and ComponentB. Both of these components are conditional on some property (e.g. some environment variable; meaning these beans do not
0
votes
1answers
18 views

How do I configure Spring Kafka Listener for a specfic topic using the factory?

I want to be able to read in topics through the properties without specifying anything on the Kafka listener annotation. Not using Spring Boot. I tried having the topics read straight from the proper
0
votes
0answers
11 views

Not getting iterator correctly for multipart data

I have a chunk of code in which I intend to retrieve some data as a multipart form. The problem is that, when I execute this code: public ModelAndView addEjercicio (HttpServletRequest request, HttpSe
1
votes
1answers
30 views

Spring boot kafka set ackOnError in application.properties

Is there a way to set property ackOnError=false using spring boot application.properties file like other listener properties such as: spring.kafka.listener.ack-mode spring.kafka.listener.ack-count s
0
votes
1answers
46 views

Spring Kafka @SendTo throws exception : a KafkaTemplate is required to support replies

I'm trying to get consumer result, according to Spring kafka doc. Based on this stackoverflow question, it should be possible to do this only by using @SendTo annotation beacuse spring boot "also a
0
votes
1answers
6020 views

Hibernate ERROR: unexpected end of subtree when calling custom functions

I have crated a function in my PostgreSql database to generate a random diary number based on the financial year named 'gen_dairyno()'. I have also registered this function in hibernate dialect regi
0
votes
0answers
23 views

Unable to create an EntityManager object in a Spring example

I am learning about the Spring framework by adopting a found example. The example instantiates an EntityManager object as follows: package com.example.demo; import java.util.ArrayList; import java.u
0
votes
0answers
16 views

How to fix error due to org.asciidoctor:asciidoctor-maven

I created a new project in IntellJ, to create a simple webservice with Spring boot and kotlin. The POM.xml is well generated however when I execute MAVEN goal, i received the error posted belwo. ple