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

We are trying to perform audit logging for the user details when changed using the annotation mentioned below. But when the patch call is triggered for the entity, the changes are not logged in the ...
Jayashree's user avatar
0 votes
0 answers
64 views

I’m upgrading a legacy Java Spring MVC application. Current setup: Java 1.8 (recently upgraded from Java 1.7) Spring 3.2.18 Uses the old AbstractFormController, SimpleFormController, and XML-based ...
Shanikiran Nimbalkar's user avatar
0 votes
1 answer
177 views

Why does OpenAPI Generator generate some of the methods with _<Number>, even though operation IDs in my spec are unique? Is there any workaround (by using properties) in OpenAPI 7.9.0? There is ...
randomDisplayName's user avatar
0 votes
0 answers
63 views

If I use the just standard way @PreAuthorize("hasRole(@roleProperties.getSelect()) or hasRole(@roleProperties.getOtherSelect())") over my RestController methods, the @PreAuthorize works ...
Pehmolelu's user avatar
  • 3,566
0 votes
0 answers
69 views

I have been trying to find a simple definition of an annotation is Spring Boot, specifically: a) What it does b) When / how you would use it While I am using annotations in my code such as @Repository ...
Walker Farrow's user avatar
1 vote
1 answer
121 views

I'm using spring-boot 3.4.2. I want to use AOP aspects in order to modify annotations that I use in a spring boot test. However my @Around method is not triggered during test execution. If I annotate ...
truj's user avatar
  • 13
1 vote
1 answer
121 views

I'm creating an annotation, like below @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Annotation { String template(); String[] parameters() default {}; } I ...
GaripTipici's user avatar
0 votes
0 answers
180 views

I'm working on a simple Spring Boot project where I have used sping web and lombok dependency. In the model class I have used lombok annotation instead of creating constractor, getter and setter ...
Habibur Rahman's user avatar
-1 votes
2 answers
50 views

I have a custom validator and need to include message parameters to construct the error message dynamically. public class DescriptionLengthValidator implements ConstraintValidator<...
Chamod Pathirana's user avatar
3 votes
1 answer
50 views

Having the following code: public class Constants { public static final String X = "-"; } And in another class @Value("${some.property:Constants.X") private String separator; ...
Eduardo's user avatar
  • 2,279
0 votes
1 answer
54 views

Is there a way to change the value passed to a custom @Qualifier, and pass it to the delegating @Qualifier? I understand that we can create custom qualifiers by @Qualifier @Target({ ElementType.FIELD, ...
Ryan Wong's user avatar
-1 votes
1 answer
62 views

I am trying to understand this question, suppose I am having spring without spring boot, I am creating a new context but without passing the configuration class like below @ComponentScan("com....
Sasirekha Kumaran's user avatar
-3 votes
1 answer
54 views

The @Value annotation is not fetching data from application.properties Please check the code in the below repository https://github.com/dev1ad/props The @Value in WebController works whereas the @...
Developer's user avatar
0 votes
1 answer
274 views

I have spring boot application. I am trying to follow the official spring tutorial from here https://github.com/spring-attic/tut-react-and-spring-data-rest/ or specifically this class: https://github....
Zlelik's user avatar
  • 618
1 vote
0 answers
136 views

I have several methods with quite similar annotations. I want to extract common parts. For example I have this: @ApiResponse( description = "Some description", ...
talex's user avatar
  • 20.8k
0 votes
1 answer
64 views

I have an application in java 21 that is a minecraft spigot plugin. I use spring framework 6.1.10. These are my dependencies: <dependency> <groupId>org.springframework&...
Michał Łuczak's user avatar
1 vote
1 answer
80 views

I have my security config class like this @Configuration @EnableWebSecurity @ComponentScan @EnableJpaRepositories public class SecurityConfig { @Value("${cors-allow-origin.url}") ...
Unai's user avatar
  • 11
0 votes
1 answer
587 views

I'm trying to learn Java using Spring Boot v.3 and to manage a FAKE database with it. This afternoon I was trying to implement some "constraints" for the username and password input via @/...
Litmanen84's user avatar
0 votes
1 answer
99 views

i run my spring application and it's showing no errors, here's my controller package com.testAOP.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework....
Mariam Takrida's user avatar
0 votes
1 answer
213 views

I'm looking for a way to get logging around methods. So I've started looking at examples of Spring-AOP and AspectJ. However, none of these seem to actually work, or at least are missing pieces in ...
Zach's user avatar
  • 765
0 votes
1 answer
44 views

Can you remove leading-and-lagging characters-and-substrings from a string without using RegEx-and/or-Custom-Code? For example, I want to remove leading https:// and lagging / (backslashes). I can ...
Zach's user avatar
  • 765
0 votes
0 answers
131 views

Why is the Spring Boot new version like this? The old version doesn't.Annotation-specified bean name 'application' for bean class [xxx.Application] This is a multi-module demo. Annotation-specified ...
Biel Chen's user avatar
2 votes
3 answers
271 views

I have a Spring MVC application (Without Boot). I am using Spring MVC 6. I am trying to learn @ResponseBody tag and I created an object of my bean class in the controller and sending it in the ...
Ali Asger Habib's user avatar
0 votes
1 answer
70 views

package com.exam.examserver; import java.util.HashSet; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import ...
Yogender Sharma's user avatar
0 votes
0 answers
67 views

There is an annotation being used in a dto to validate a DateTime variable, which is working correctly, returning a 400. However, when I try to use this annotation in the controller, it returns an ...
Rebeca Maria Fialho Camilo's user avatar
4 votes
1 answer
752 views

I am familiar with composite annotations. However, it seems they are not enough for my specific need even after some research. General case I want to create an annotation for testing that, put on a ...
usr-local-ΕΨΗΕΛΩΝ's user avatar
0 votes
1 answer
116 views

When upgrading from spring-boot 3.2.1 to 3.2.2 one the following SPEL security annotations stopped working. Now, it always gives a 401. Apparently, Spring security version did not upgrade between the ...
Abu Sulaiman's user avatar
  • 1,507
1 vote
1 answer
276 views

I need to set up thread pool size for scheduled tasks based on either specified property or available resources. So, I wrote the following code: @EnableScheduling @Configuration public class ...
Gary Greenberg's user avatar
-2 votes
2 answers
1k views

I am building a Kafka streaming app (Java/Spring) and have a configuration class that uses @Value to assign values to the properties there as usual. In the configuration class is a method that sets ...
jhachtel's user avatar
0 votes
1 answer
428 views

Problem: Reserved keywords I have an entity class named User for historical reasons which Hibernate calculates a table name of user by default. That name is a reserved SQL keyword and breaks without ...
Thorsten Schöning's user avatar
1 vote
0 answers
427 views

I am trying to design an application that will show metrics about it's health and other custom metrics, like how long each function runs and how many times etc. I am on spring boot 2.7.1. I want to ...
Fleky's user avatar
  • 11
3 votes
2 answers
5k views

i currently study more in deep the @TestConfiguration and i wonder why using this combo.. @TestConfiguration public class TestConfig { // some bean definitions and then using @...
work-in-progress's user avatar
0 votes
1 answer
60 views

What is the behavior for Spring's Transactional when writing-then-reading? Let's say I have a method annotated with @Transactional, and the first thing it does is modify an object. Then, I read that ...
KJ0797's user avatar
  • 285
0 votes
1 answer
459 views

I am encountering an issue with the @Aggregation annotation in a Spring Data MongoDB repository in my Spring Boot application. While the @Query annotation works as expected, using @Aggregation results ...
Richard N's user avatar
1 vote
0 answers
44 views

I m making a @Configuration class that is to just provide the names of topics and queues I want to publish/subscribe to using JMS. The config file looks something like the following but repeated 10+ ...
chunkynuggy's user avatar
0 votes
1 answer
554 views

I have custom Interface "Platform" with @ExtendWith annotation and Class which implements ExecutionCondition. @Documented @Inherited @Retention(RetentionPolicy.RUNTIME) @Target({ElementType....
Fimoknat's user avatar
-1 votes
1 answer
93 views

i have created two seperated class in entity, varibale declared in user class is : private Long id; private String name; variable declared in book class is: private Long id; private String title; ...
Sreenath's user avatar
0 votes
1 answer
432 views

I have a getMapping controller which accepts emailId and Set as input. I want to have a validation check for Non empty/blank values and email id validation, below is the sample code. @Email validation ...
Nithya's user avatar
  • 1
0 votes
1 answer
63 views

When I have two beans with the same name, the first one I defined always runs when I try to use them. How can I make the second bean run instead? I even tried using the @Primary annotation, but it ...
Subhani's user avatar
1 vote
0 answers
269 views

I need help understanding how a spring boot application reads annotations in order to configure the application context. Let me give an example of what is confusing me: I have a spring boot ...
Neon Blizzard's user avatar
0 votes
1 answer
397 views

I'm encountering an issue with my Spring application in Java 17, and I'm getting the error message "Could not resolve placeholder 'spring.jpa.hibernate.ddl-auto' in value "${spring.jpa....
Kaique S. Silva's user avatar
0 votes
1 answer
54 views

Good morning, I have the following custom annotation in Java (Spring Boot): @Target({ PARAMETER }) @Retention(RetentionPolicy.RUNTIME) @Documented @Constraint(validatedBy = DomainKeyValidator.class) ...
Etraz's user avatar
  • 55
0 votes
0 answers
348 views

I was trying to setup usage of REST APIs in one of our application. SO I was trying to achieving this with interceptor approach. The problem i was having as we are having two kinds of restful ...
user3309305's user avatar
0 votes
1 answer
1k views

I have a Spring Boot controller method that handles file uploads, and I'm trying to use the @ModelAttribute annotation to bind some fields from the request. Here's my controller method: @PostMapping(...
Yasiru Deshan's user avatar
0 votes
1 answer
1k views

Over here I get an error saying qualifier cannot find method value in it where I can pass a name: @Qualifier("abstractLanguageService") public abstract class Ae implements Le { // ... } ...
parthwader64's user avatar
-1 votes
1 answer
54 views

For GET web service , while hitting the WebService in postman, able to retrieve data from local and same code is not working in web logic server. Input data format : JSON Output data format : JSON For ...
Hari chandana's user avatar
0 votes
0 answers
88 views

I recently updated my application to Spring 3.1.2 and I created a custom annotation which is not getting triggerred when applied on Method. Below is the code for the same. The annotation. @Documented @...
Mithil Baria's user avatar
0 votes
1 answer
672 views

Total newbie having trouble learning how to modify a spring boot application with a custom validator(maven, h2 repository, thymeleaf, not sure if this info is implied or necessary so here it is). I ...
Lalochezia's user avatar
0 votes
1 answer
447 views

My CommandLineRunner class package course; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; @Component public class CourseCommandLineRunner ...
aayush mohanka's user avatar
1 vote
2 answers
701 views

I have in Class a field Map<Object, String> type. How can I save Object's from Map when parent Class object save? I understand whats the problem, but cant solve it. I cant place annotation @***...
rekki's user avatar
  • 23

1
2 3 4 5
27