Replacing an annotation with another annotation during compile time in Spring?

117
July 25, 2019, at 04:10 AM

I am using Swagger annotations over my controller parameters. So, I end up with annotations like @ApiParam(name="default name", value="this is a default value"). I think these is quite verbose. I would like to change it to something like @Foo. I want to know if there's a way to replace @Foo with @ApiParam during compile time. Also, since I am using Spring, I think I have to consider the annotation processing order in Spring, as well. I mean I shouldn't replace @ApiParam with @Foo after Swagger or Spring picks it up. Is there any way to do this?

I know I have to show what I have already tried, but I have no clue where to even start.

Also, the question is not related to Swagger, it is just an example. I want to replace one annotation with another during compile time, so that the one picked up by Spring won't be the one I have put on the source code, but the one I have replaced.

Rent Charter Buses Company
READ ALSO
Struggling to convert an Object to have keys within one of the sub objects

Struggling to convert an Object to have keys within one of the sub objects

I'm struggling to convert this file so that the clientID is the key on the Object within 'things'I want to flatten the array and then have keys for each Object within an outer Object

100
in the following code can we return the same thing without using the place variable, if yes how?

in the following code can we return the same thing without using the place variable, if yes how?

this function filters the cities array according to the condition that they should match the wordToMatch and is part of ajaxi tried using console

121
Inheriting attributes from prototype

Inheriting attributes from prototype

I am working on a school assignment and I want to inherit the properties of a previous constructor functionI used object

108
Convert string to title case with JavaScript

Convert string to title case with JavaScript

Is there a simple way to convert a string to title case? Eg

189