-4

I'm a beginner to spring. All i see in using spring is configuring dependencies in xml format and enhance the maintainability by not changing the class files .but when we use annotations and auto wiring we are again recompiling class files which raised this question in my mind. can some body please explain the exact use of spring and auto wiring.

Umer Farooq
  • 762
  • 1
  • 8
  • 17
  • Possible duplicate of [Xml configuration versus Annotation based configuration](https://stackoverflow.com/questions/182393/xml-configuration-versus-annotation-based-configuration) – John May 02 '18 at 03:43

1 Answers1

0

Spring became famous for most of it's loosely coupling capability. Classes are not dependent each other when you write them but they get their dependencies at runtime. Before annotations it is what XML handled the labeling classes etc. With annotations we can simply label a class being an entity by adding @entity annotation. So auto wiring means what ever the method we used to couple the classes will be used to wire up the classes at runtime.

Juliyanage Silva
  • 2,529
  • 1
  • 21
  • 33