What are annotations and how do they actually work for frameworks like Spring?

后端 未结 4 897
自闭症患者
自闭症患者 2020-12-03 07:14

I am new to Spring and now a days I hear a lot about Spring Framework. I have two sets of very specific questions:

Set No. 1:

  • What

4条回答
  •  甜味超标
    2020-12-03 08:14

    What are annotations in general ?

    Annotations are a convienient way of configuration, which could also be done using explicit configuration files, like deployment descriptors.

    How does annotations works specifically with Spring framework ?

    In spring they are used for dependency injection and many other purposes

    Can annotations be used outside Spring Framework or are they Framework specific ?

    Yes you can even write your own annotations. They have been introduced in java 1.5 for i.g. suppresing warnings.

    What module of Spring Framework is widely used in Industry ?

    The spring core module is used in all applications and therefore mostly used.

    You should also browse the Documentation to get a first impression what the spring framework and its modules cover.

提交回复
热议问题