Category "annotations"

@Size annotation doesn't seem to work for my class

I have a Spring Boot Controller with an endpoint that accepts the following Configuration class (as json). The class has the param maxIterations and has a @Size

How to read config file (*.yaml *.properties) without spring framework

I have a project but not in spring, how can I use annotation to read content in config files like *.yaml or *.properties under resource package.

Is it possible to test a function that uses get_type_hints with a doctest?

I have a function that uses typing.get_type_hints. I want to add a documentation test to it. However, it looks like get_type_hints fails to resolve types that a

How to create and annotate a stacked proportional bar chart

I'm struggling to create a stacked bar chart derived from value_counts() of a columns from a dataframe. Assume a dataframe like the following, where responder i

How to implement a parameter decorator in TypeScript?

I've been trying to use a parameter decorator @logParameter: class Person { public name: string; public surname: string; constructor(name : string, sur

Inject application properties without Spring

I would like a simple, preferably annotation-based way to inject external properties into a java program, without using the spring framework (org.springframewor

Command line load-time weaving

So I am starting with AspectJ and have a problem. The following example works perfectly in Eclipse but when I try to run it in bash - it does not work. This i

Spring AOP with Around advice and @annotation not working

I am using Spring AOP for logging in my application. Here is the applicationContext.xml file <mvc:annotation-driven /> <context:component-scan base-

Can't find @Nullable inside javax.annotation.*

I want use @Nullable annotation to eliminate NullPointerExceptions. I found some tutorials on the net, I noticed that this annotation comes from the package j

Hibernate Mapping Error: MappingException: An AnnotationConfiguration instance

I have a project with Hibernate.I tried to read the configuration file hibernate.cfg and got this error: Error creando una factoria de session.org.hibernate.M

Get/Set Annotation from/in existsing PDF using itextSharp

I'm working on a project where i have to read an existing pdf using iTextSharp.PdfReader, then getAnnotations in order to insert them back in a new generated pd

JPA Multiple Embedded fields with prefix?

With JPA annoations, I want to reuse same embedded object like this : @Entity public class User { @Embedded public Address homeAddress; @Embedded

Only using @JsonIgnore during serialization, but not deserialization

I have a user object that is sent to and from the server. When I send out the user object, I don't want to send the hashed password to the client. So, I added @

IntelliJ IDEA highlights @Entity class names with "Cannot resolve symbol" in JPQL

IntelliJ IDEA highlights persistent @Entity class names with "Cannot resolve symbol" in red in JPQL which is distracting and buries real issues. So, for examp

Spring MVC request and response flow explanation

I can't find correct client request flow in below syntax.Could someone please clarify what is happening here? Client(1) --> Dispatcher Servlet(2) --> Han

intellij incorrectly saying no beans of type found for autowired repository

I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error No beans? As you can see below it passes the test?

How to map JSON field names to different object field names?

What is the equiv way in Jackson json annotation for the following jax-b annotations? I need to produce json rather than xml and need to know the conventional

How to annotate bar chart with values different to those from get_height()

I solved my own question after a long and failed search, so I'm posting the question here and the answer immediately below. The goal: plot percentages but annot

Default properties of Java Annotation

What are the exact default values of two meta annotations (Target and Retention) in a user defined annotation? public @interface AnnotationWithDefaultProps { }