Skip to main content

Questions tagged [spring-annotations]

A common placeholder for issues related to the use of annotations with the Spring framework

spring-annotations
0 votes
0 answers
39 views

Using default value in @Value annotation through a map

i want to use a static final map<String,String> to map a string against the default value in @Value annotation , like: @Value("${property1:"+ map.get(property1)+"}") private ...
Shivank's user avatar
  • 11
0 votes
0 answers
17 views

How to correctly use the values of injected objects as annotation values? I encountered a circular dependency issue when using SpEL

I have a Spring application where I need to use values from injected propertiesCancelAuthorizationLinkageListenerProperties properties in my @KafkaListener annotation. Here is a simplified version of ...
dwb5013's user avatar
  • 159
0 votes
1 answer
42 views

Spring doesn't scan classes annotated with @Component/@Service etc

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

Spring UnsatisfiedDependencyException, Error creating bean with name

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

Why does my @Pattern @Size annotations don't work with @Valid (In Spring Boot v.3)?

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
0 answers
73 views

Getting DelegatingWsConfiguration proxy issue error

I'm developing a Spring Boot application. It's working fine in my local system and able to create data but in dev environment it's not working. Can anyone help me on this issue? issue : [org....
Praveen s's user avatar
0 votes
1 answer
40 views

404 not found postman

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

Why is AspectJ Logging Not Triggering When Aspect and Interface are Annotated?

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
  • 735
0 votes
1 answer
36 views

Is there a way to remove leading and trailing substrings without custom code?

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
  • 735
0 votes
0 answers
89 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]

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 ...
chenbihao's user avatar
2 votes
3 answers
99 views

@DateTimeFormat not converting date while sending response

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
0 answers
15 views

Customize Spring Boot Annotation With New Fields

I want to customize spring-boot Cacheable annotation with new fields. Is it possible? @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Inherited @Documented @...
Sha's user avatar
  • 1,079
0 votes
0 answers
17 views

Load localized messages in annotations - @CsvBindByName

I am trying to load localized messages from messages.properties in Resource Bundle into the @CsvBindByName annotation in opencsv. My goal here is to be able to load or change values from the messages....
pk.'s user avatar
  • 99
0 votes
1 answer
38 views

Why I'm getting error while running Spring Boot application that define bean of type 'com.exam.repo.UserRepository' in your configuration?

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

Custom annotation for date validation in a pathVariable in the controller is working incorrectly

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

15 30 50 per page
1
2 3 4 5
88