Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Is there way to mock File.class using Mockito 4 or newer?

I used to use PowerMock to mock File.class. I'm trying to use mockStatic and mockConstruction to replace PowerMock.mockStatic and PowerMock.whenNew. However, I have been getting NPE with it. I am ...
jjakjjak's user avatar
0 votes
0 answers
17 views

Why does @Size(min) validation trigger before @NotBlank validation in Spring Boot?

I'm facing an issue where both the @NotBlank and @Size(min) validations are triggered simultaneously on empty fields in Spring Boot, but I expect the @NotBlank validation to run first. Here’s the ...
Ali Zain's user avatar
0 votes
1 answer
21 views

Visibility Modifiers in Spring / Kotlin

Is it bad practice to use private to hide the implementation of a contract and not show it even in ide autocomplet. If so, why? interface MyService { fun process() } @Service private class ...
ARTWIN's user avatar
  • 1
0 votes
0 answers
10 views

New 2025 Spring Boot Integration with PyTorch Model: Embedding a Pre-trained Network

I'm working on integrating a pre-trained PyTorch model into a Spring Boot application. My aim is to leverage the model's inference capabilities within the REST API exposed by the application. I've ...
alex_wyoming's user avatar
0 votes
1 answer
27 views

How can I ensure only the first validation error per field is returned in Spring Boot, even when there are multiple validation rules?

I am using Spring Boot and Jakarta Bean Validation in my project, and I have multiple validation rules for each field. My goal is to return only the first validation error for each field in the ...
Ali Zain's user avatar
0 votes
1 answer
28 views

AuthorizedClientServiceOAuth2AuthorizedClientManager: accessToken cannot be null

In order to authenticate with a 3rd party API using OAuth2, and use a proxy for this, in a regular Spring Boot Microservice (Java 21), I've been using the combination of a custom ...
tuse-ausm-chor's user avatar
0 votes
0 answers
39 views

How to avoid simultaneous processing of messages with same content

I am using Java, Spring Boot, RabbitMQ. I have thousands of messages with body like: {"carId":123,"actionId":126} I have one queue named cars and one topic listener that handles ...
SereneAtk's user avatar
  • 115
0 votes
2 answers
43 views

@AfterReturning method not being triggered correctly in Spring webflux Application

I am trying to print response payload after the controller method is executed in the application, but the afterReturning aspect doesn't seem to work correctly.It gets triggered before the actual ...
rjc's user avatar
  • 123
-2 votes
0 answers
36 views

Unittest failed by hibernate

I have a unit-test that uses Hibernate to test if some HQL statements are working. Unfortunately the unit-test fails because hibernate have a asseration in his code. See: https://github.com/hibernate/...
Grim's user avatar
  • 1,949
0 votes
0 answers
24 views

CFX Code Gen 4.1.0 JDK 21 And Maven Generating Classes from WSDL but without @Valid

I am trying the develop a Spring Boot Project using cxf-spring-boot-starter-jaxws 4.1.0. I have WSDL in place. For security reason I am not providing the WSDL, but I will do with some schema code here....
Kumar's user avatar
  • 1,114
1 vote
0 answers
80 views

Getting ConcurrentModificationException while working with Set

I'm trying to create Set only with names. For some reason I get java.util.ConcurrentModificationException and it happens when I call post.getTags().stream().map(Tag::getName).collect(Collectors.toSet()...
kripa tura's user avatar
0 votes
2 answers
41 views

Evaluation of @ConditionalOn* in Spring Boot

Context I created a minimalist Spring Boot project with only spring-boot-starter-web as a dependency. On my classpath I have spring-boot-autoconfigure JAR, that has preconfigured many different ...
Žeka Koževin's user avatar
0 votes
0 answers
9 views

Spring Authorization Server Question, Authorization Code is always invalid grant when second authorize

In https, I m using Spring Authorization Server. When I first log-in, it wokrs very well as Authorization Grant. but I try Second Login, Auhoriation Code doesnt work! I can get the Authorization code ...
차승주's user avatar
-3 votes
0 answers
23 views

Why does my spring endpoint return an empty array when there should be one object?

I am developing a controller class in Spring for an accounts entity class, I have added a very simple endpoint which returns all the registered accounts in the database As you can see when I hit the ...
Jabir Nurul Haque's user avatar
1 vote
1 answer
45 views

MapStruct mapper not mapping nested DTOs properly in spring boot

I have a DTO that doesn't work with mapping @Data public class IndividualDTO { private String passportNumber; private String phoneNumber; private UserDTO user; @Data public ...
448844's user avatar
  • 25

15 30 50 per page
1
2 3 4 5
14161