Skip to content

KareemEmadElfrargi/Spring-Framework-Demo-002

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Spring XML Dependency Injection - Library Project

This is a Java console-based application that demonstrates Dependency Injection using XML configuration in Spring Framework.

It simulates a library system with:

  • A list of books
  • Each book has an author, publisher, and categories
  • A map of authors by their countries

🔧 Technologies Used

  • Java 8+
  • Spring Framework (Core Container)
  • XML-based Bean Configuration
  • Maven (optional for structure)
  • IntelliJ IDEA

💡 Concepts Covered

  • Dependency Injection via XML
  • Nested Beans
  • Collections Injection:
    • List of books and categories
    • Map of authors by country
  • Bean Reuse via ref and value-ref

▶️ How to Run

  1. Clone the repository or download the project files.
  2. Open in your favorite IDE (IntelliJ / Eclipse).
  3. Make sure Spring libraries are added to your classpath.
  4. Run the Main.java class.
  5. You should see the output printed in the console showing books, authors, publishers, and mapped authors by country.