0
cb219
3y

What was the idea behind java spring (jpa) and creating/using like a million annotations? There are annotations for literally everything...

Comments
  • 0
    Annotations are honestly one of my favorite features of java.

    Whether its for code generation by tagging something for a code preprocessor (lombok), or adding metadata to tell a framework/library how you want it to work (spring DI, spring rest controller, jpa, etc), annotations make this easy by being concise and declarative
  • 0
    The idea is that you don't have to explicitly code all the functionality, you just provide some metadata and you the rest Is auto generated with best practices applied already

    The fact that It's using annotations rather than some custom file format adds a lot to the usability too.

    I personally like it and even make my own annotations in the same spirit as spring does
Add Comment