Questions tagged [spring]

The Spring Framework is an open-source framework for application development on the Java platform. At its core is rich support for component-based architectures, and it currently has over twenty highly integrated modules. For Spring Boot related questions, also include the tag [spring-boot].

spring
Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Is it possible to have two implementations of MailSender in the Spring Boot app?

I have a Spring Boot app that has an email sending part. I'd like to use SMTP org.springframework.mail.javamailJavaMailSenderImpl with my "dev" profile, and the AWS SES implementation io....
Slava Imeshev's user avatar
0 votes
0 answers
5 views

How to set a CustomLogin Path in Spring Security?

I am using springboot and spring security for a web app, my user login works fine with the default login page, and also works if I use a custom login.html with the following code. http.formLogin(form ...
Joaquin Moreno's user avatar
0 votes
0 answers
8 views

Jboss EAP 8.0 not able to resolve the endpoints in the spring (and springboot) application after upgrading to 8.0 EAP. Getting 404 - Not Found

I have a spring application which needs to be upgraded to latest framework(6.1.5) and java 17. To host the upgraded app, I must upgrade my Jboss server to 8.0 from 7.4. I have made all the changes ...
charan teja's user avatar
0 votes
0 answers
16 views

Connection timed out through RestTemplate

There is one mobile application for store chain with about 20K+ users. There are users who process job tasks there on daily basis. But sometimes(about 20 cases per week) when they close their task - ...
Lotus's user avatar
  • 1
0 votes
0 answers
8 views

Thymeleaf not displaying error message and do not save the enterend email after failed login in Spring Security

I use Java 17, Spring Boot 3.2.4 and Gradle On login fail with wrong password and username (email) Thymeleaf not displaying error message and not redirect the result (email) after failed login in ...
tihmir's user avatar
  • 1
0 votes
0 answers
12 views

findById(Long id) doesn´t work? on spring

I have the following Sprig entity, with its repository, service, DTO, and controller. When I am in the incisoController and I call the function incisoSerice.findById(id) it works correctly, just like ...
sebcostilla's user avatar
-2 votes
0 answers
14 views

How to make use of Design Patterns when developing with Spring or other "heavy-weight" frameworks?

I have been developing with Spring Boot for quite some time now, and I am always trying to find ways on how to make use of Decorator, or Factory for example...when if you make use of the framework and ...
Joan's user avatar
  • 71
0 votes
1 answer
12 views

org.springframework.kafka.support.serializer.ErrorHandlingDeserializ' of type serializer.ErrorHandlingDeserializer] while setting constructor argument

By taking a reference of : How to handle the exception at consumer in Spring XMl App?, I am trying to convert Java bean dependency in xml bean and facing below eror. Could someone please exaplin what'...
Prateek's user avatar
  • 11.3k
0 votes
0 answers
7 views

How to check option for selected with Thymeleaf and Java Enum

With Spring and Thymeleaf, I'm doing the add and edit a user. I want to do an option check on a select tag on the user edit page. For example, if the user's role is ADMIN, if the admin option is not ...
emrtnm's user avatar
  • 5
0 votes
0 answers
8 views

Getting compile errors when viewing generated protobuf class

I am using the following dependency in my spring boot app: <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <...
helloabc123's user avatar
0 votes
1 answer
20 views

Docker Compose - Container can't communicate

I got a Spring - Postgres projet that I containerized with a Docker Compose. This is my compose file : services: db: container_name: astro_db image: postgres:latest restart: always ...
ForkBench's user avatar
1 vote
1 answer
16 views

KafkaProducer per task or Singleton KafkaProducer

I have several tasks that are running in parallel(ExecutorService and Runnable tasks). Is it a good option to use one KafkaProducer instance (Spring singleton bean) for all of them? In this case, how ...
Smetana Po Aktsii's user avatar
0 votes
1 answer
27 views

How to handle the exception at consumer in Spring XMl App?

How to perform error handling in Spring XML + Kafka App? I am using JSON to produce and consume messages, but when consumer gets junk data, its running endless loop. Here is what I used public class ...
Prateek's user avatar
  • 11.3k
-1 votes
0 answers
17 views

Multiple Login screens with different endpoint after login with spring security [closed]

I am working on a project with Spring Boot using spring security, I want to have multiple login screens. The normal one which leads to the dashboard and one which can only be accessed if there is a ...
ps-jakob's user avatar
0 votes
0 answers
9 views

How do I use the ExampleMatcher with jpa repositories?

I need to get data from the database with Jpa repository. I am trying to achieve the requirement with org.springframework.data.domain.ExampleMatcher. I have a flag as method parameter and based on the ...
monika-dzidic's user avatar
0 votes
0 answers
10 views

Mapping with IdClass rising a reflection exception

Assuming the following entities @Entity @Table(name = "USERSS_SERVERS") @IdClass(UserssServersID.class) public class UserssServers implements Serializable { private static final long ...
Mohammed Housseyn Taleb's user avatar
0 votes
0 answers
37 views

SpringBoot: Changing SmartLifecycle phase of the embedded container

My Spring application needs to wait for some computations to gracefully stop before shutting down; but I want the server to remain up to expose metrics/healthchecks API's while the computations are ...
Azmisov's user avatar
  • 6,917
0 votes
0 answers
10 views

additionalProperties: false does not work in OpenAPI3.0.2

I am using OpenAPI:3.0.2 My openAPI properties are as follows: abc: type: object additionalProperties: false required: - something - id properties: ...
nezuko-chan's user avatar
0 votes
0 answers
17 views

Validator geronimo-validation_1.0_spec not supporting spring 3

When i am using spring boot 3.2.0 with geronimo-validation_1.0_spec validator its not working throwing issue java.util.concurrent.ExecutionException: javax.validation.ValidationException: Could not ...
user2810698's user avatar
0 votes
0 answers
9 views

Add custom roles to authenticated user based on group from LDAP

I have the requirement to modify our springboot webapp, it uses spring security and the roles are being mapped from the database. However, the management wants to remove the DB mapping for roles, ...
Olahzzz's user avatar
  • 551
-2 votes
0 answers
14 views

Roles are not working in my springboot app

I am trying to implement Roles and Permissions(Authorities) using spring security. I am using JWT for managing sessions. This is my Enum class that i have created for my roles @RequiredArgsConstructor ...
Omotoso Iyanu's user avatar
0 votes
1 answer
16 views

Hibernate struts2 java.lang.IllegalArgumentException: org.hibernate.query.sqm.UnknownEntityException: Could not resolve root entity 'LoginHibernate'

Hello guys im new to stack overflow. Im trying to make a login validator. Using Hibernate and struts2. I cant seem to fix this java.lang.IllegalArgumentException: org.hibernate.query.sqm....
Kenneth Igot's user avatar
-1 votes
0 answers
19 views

i'm gradle newb,,, "not found in root project ~~~"

i'm a program leaner i did Spring not Spring boot,, so i tried to change from (window,eclipes,maven) to (mac M1 pro,vscode,gradle) it's so different, i don't know. what did it go by without knowing? ...
GROKEEN's user avatar
  • 11
0 votes
1 answer
26 views

Globally set custom spring validation messages

Is there a way to set error messages for particular constraints/validators globally? I.e. i want all @NotNull constraint to have a validation message (like "Need a value here", or whatever) ...
patman's user avatar
  • 2,788
0 votes
0 answers
16 views

FFmpeg - record from stream terminating unexpectedly using kokorin/Jaffree ffmpeg wrapper for Java

I am programming a Spring Boot Application using Maven and Java 21. I am trying to record a stream from a url and save it to a mkv file. I intend to do this with kokorin/Jaffree in version 2023.09.10. ...
pyrmon's user avatar
  • 1
1 vote
1 answer
73 views

Obfuscation of Java maven project with spring framework

I am facing org.springframework.beans.factory.NoSuchBeanDefinitionException after the obfuscation is done. Is there a way to avoid the changing of bean names, I have tried rules like -keep to keep the ...
Mohammed Kamran's user avatar
-3 votes
0 answers
39 views

How to map two foreign keys to the same table on two different columns?

This is the database structure in the transactions table. I would like to include both transfers and withdrawal and deposit operations these are the test data because then I would like to ensure that ...
Bartolomeo Cenisio's user avatar
0 votes
0 answers
16 views

saml2, react, spring boot 3.2.3 bundled jar and redirects

I have a spring boot 3.2.3 all-in-one application with React as the front end. I want to allow local login in addition to SSO/saml2, both resulting in a JWT used throughout React. I have the spring ...
William Eubank's user avatar
0 votes
1 answer
55 views

Spring security implement multiple SQL tables authentication

I'm relatively new to Spring Boot and I've been exploring its authentication features. I've noticed that Spring Boot offers convenient out-of-the-box authentication, provided that usernames and roles ...
Florian Saqipi's user avatar
-1 votes
0 answers
39 views

Java Spring Chess Puzzles [closed]

I have to write implementation of Chess Puzzles. Here's the description I have: Details: Consider each chess piece as a particular object, that implements ChessPiece interface. Then a chess board ...
Kere's user avatar
  • 13
0 votes
0 answers
10 views

Casting SqmLiteral to SqmExtract unit Spring boot with hibernate

I am using this predicate to get the hour out of the date time field on my postgresql database using spring boot. Expression<Integer> extractHourFunction = builder.function( ...
bdell's user avatar
  • 27
0 votes
0 answers
16 views

Save and load preferences from a ColumnToggler component from PrimeFaces [closed]

I have a JSF project whose FrontEnd was made with PrimeFaces. More specifically, there is a ColumnToggler type component that presents several filters that determine which columns of a given element ...
JoaoPedroFerrete's user avatar
1 vote
0 answers
18 views

How to dynamically update and persist Spring application properties at runtime?

I'm working on a Spring Boot application where I need to allow the admin to dynamically update certain application properties at runtime via a REST API. These properties include both integer and ...
Nikolay Boychev's user avatar
0 votes
0 answers
17 views

Handling struts error even after adding a new dependency

Since I've upgraded from Spring 5.x to 6.X, the jakarta ee is causing the following struts 1.3 related things to break in struts Action class. no suitable method found for saveErrors(jakarta.servlet....
Tan's user avatar
  • 1,503
-1 votes
0 answers
18 views

Spring Boot OAuth: Configuration of {bcrypt} client secret

I had a Spring OAuth setup (Auth server, Resource server and Client) up and running perfectly fine (not in production though, only in dev environment) until I had to enable a password encoder in my ...
Erando's user avatar
  • 847
-1 votes
0 answers
9 views

Upgrade to Hibernate 5.6 causing 'Unknown entity' MappingException with createNativeQuery for String type

Facing hibernate upgrade issue - public List<String> myMethod(int id) { Query tp = em().createNativeQuery("select f.featureName from featuremapping fm inner join features f on ...
Arunabha Ghosh's user avatar
0 votes
1 answer
23 views

Can't start Listener Java Application using ActiveMQ in IntelliJ

I have a Java MQ Listener Application that listens a Queue. When I use it locally, I use ActiveMQ to send messages, my issue is: I am having a problem when trying to run this Listener Application in ...
pctheone's user avatar
-1 votes
0 answers
18 views

Spring Security JWT configuration: Issues with JwtAuthenticationConverter and dependencies [closed]

I am tryng to configure the authorization for my spring services, but all jwt methods that i am implementing are being considered wrong or inexisting this is my code: package com.capolavoroprova....
MUMAH's user avatar
  • 1
0 votes
2 answers
34 views

Error 415 "Unsupported Media Type" when testing an endpoint with Spring Boot

Description: I am developing a web service using Spring Boot, and I am encountering an issue when testing an endpoint that should receive a list of DTOs and a file. When I perform the test, I get the ...
valencia's user avatar
0 votes
0 answers
16 views

Hibernate changes UpperCamelCase to lower_snake_case when parsing values in @Column and @Table annotations

this is how entity is defined: @Data @Entity @Table(name = "Recipes") public class BoardRow { @Id @JsonProperty @Column(name = "Id") private String id; @...
illy sigelman's user avatar
0 votes
0 answers
31 views

My controller don't validate my Java Model

I'm trying to validate my Model, which I annotated with: @NotEmpty(message="name cannot be null") @Size(min=1, max=32) @Column(name="artist_name") for example, however when I send ...
southzonehorror's user avatar
0 votes
0 answers
8 views

Java use a custom annotation to trigger a method call from @PreAuthorize

I have a controller with an endpoint I need to authorize. I want to use a custom annotation which contains @PreAuthorize annotation. This is my controller @RestController public class ActorController {...
Tamir Mayblat's user avatar
-1 votes
0 answers
14 views

Is ignite 2.16.0 vulnerable with CVE 2024-22243

Spring released a vulnerability https://spring.io/security/cve-2024-22243 Ignite latest https://ignite.apache.org/download.cgi is 2.16.0 So "Ignite release 2.16 is using spring 5.2.2" But ...
Vaishali this side's user avatar
0 votes
0 answers
25 views

Unable to invoke custom authentication provider after the client is verified in Oauth2Authorization Server Spring Boot 3

I have implemented a Oauth2 authorization server. In which the client is verified and the token is generated. But what I want to do is add a custom authentication provider for further validation ...
Hari Pandey's user avatar
0 votes
0 answers
16 views

Could not write JSON: Could not instantiate entity

I'm using this CompositeKey for my Bills class: @NoArgsConstructor @AllArgsConstructor @Data public class BillsKey implements Serializable { private Suppliers supplier; private int id; and this is ...
Irdiris's user avatar
  • 29
-1 votes
0 answers
9 views

How can i restart my Spring batch step successfully

I have a spring boot 3 projet with spring batch with one step. When I execute my batch for the first time, at the batch_job_execution table level everything goes well and when I want to execute it for ...
obela06's user avatar
  • 315
0 votes
1 answer
11 views

Kerberos SSO Issue with AD change of upns in Spring Boot Application

So I have a spring boot application that authenticates its users via kerberos and then makes an ldap-search for roles and authorities and such. It is working fine. The problem is, that there will be a ...
clatadia's user avatar
-2 votes
0 answers
25 views

GET request Returns Bad Request

I am having difficulty with JAVA SpringBoot. Can someone explain why I error out in GET Request saying it is Bad Request,while in POST request it is successful. Please let me know if annotation is ...
JDKTeam's user avatar
  • 21
-1 votes
0 answers
31 views

how to get the refresh token once a user logs in?

Here is my scenario I want to implement : User goes on the site page, on arrival on a protected page he is redirected to log in using oauth2. Once the server receives a new connection, it stores, if ...
Guigui Lechat's user avatar
0 votes
0 answers
29 views

AutoMapping in Java: nested recursive objects

I need to do a model -> DTO mapping. The model structure leads to recursion during mapping. Let's take an example to make it easier to understand. public class Father { private int id; ...
DanielaM's user avatar

1
2 3 4 5
4226