courses) {
68 | this.courses = courses;
69 | }
70 |
71 |
72 |
73 |
74 | public Properties getUserInfo() {
75 | return userInfo;
76 | }
77 |
78 |
79 | public void setUserInfo(Properties userInfo) {
80 | this.userInfo = userInfo;
81 | }
82 |
83 |
84 | @Override
85 | public String toString() {
86 | return "Employee Name : " + name + "\nPhones : " + phones + ",\nAddresses : " + addresses + "\nCourses : " + courses
87 | +"\nUser Info : " + userInfo + "\n========\n";
88 | }
89 |
90 |
91 |
92 |
93 |
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/Practice_1_With_XML_Approach/src/main/java/com/masai/model/Car.java:
--------------------------------------------------------------------------------
1 | package com.masai.model;
2 |
3 | public class Car {
4 |
5 |
6 | private int idNumber;
7 |
8 | private String modelName;
9 |
10 | private String compnayName;
11 |
12 | private double price;
13 |
14 | private String yearOfLuanching;
15 |
16 |
17 | public Car() {
18 | // TODO Auto-generated constructor stub
19 | }
20 |
21 |
22 | public Car(int idNumber, String modelName, String compnayName, double price, String yearOfLuanching) {
23 | super();
24 | this.idNumber = idNumber;
25 | this.modelName = modelName;
26 | this.compnayName = compnayName;
27 | this.price = price;
28 | this.yearOfLuanching = yearOfLuanching;
29 | }
30 |
31 |
32 | public int getIdNumber() {
33 | return idNumber;
34 | }
35 |
36 |
37 | public void setIdNumber(int idNumber) {
38 | this.idNumber = idNumber;
39 | }
40 |
41 |
42 | public String getModelName() {
43 | return modelName;
44 | }
45 |
46 |
47 | public void setModelName(String modelName) {
48 | this.modelName = modelName;
49 | }
50 |
51 |
52 | public String getCompnayName() {
53 | return compnayName;
54 | }
55 |
56 |
57 | public void setCompnayName(String compnayName) {
58 | this.compnayName = compnayName;
59 | }
60 |
61 |
62 | public double getPrice() {
63 | return price;
64 | }
65 |
66 |
67 | public void setPrice(double price) {
68 | this.price = price;
69 | }
70 |
71 |
72 | public String getYearOfLuanching() {
73 | return yearOfLuanching;
74 | }
75 |
76 |
77 | public void setYearOfLuanching(String yearOfLuanching) {
78 | this.yearOfLuanching = yearOfLuanching;
79 | }
80 |
81 |
82 | @Override
83 | public String toString() {
84 | return "Car Id Number : " + idNumber + "\nModel Name : " + modelName + "\nCompnay Name : " + compnayName + "\nPrice : "
85 | + price + "\nYear Of Luanching : " + yearOfLuanching + "\n===============\n";
86 | }
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/Practice_1_With_XML_Approach/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/Practice_2_With_XML_Approach/resources/applicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
14 |
15 |
16 |
17 |
18 |
19 |
27 |
28 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 1
55 | 2
56 | 3
57 | 4
58 | 5
59 |
60 |
61 |
62 |
63 |
64 |
65 | 5
66 | 5
67 | 6
68 | 7
69 | 8
70 | 9
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/Autowiring_XML_1/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Autowiring_XML_2/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Autowiring_Annotation_1/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Autowiring_With_Qualifier_1/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Practice_2_With_XML_Approach/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Practice_3_With_XML_Approach/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Practice_4_With_XML_Approach/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Practice_5_With_XML_Approach/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Practice_1_With_Annotation_Approach/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Practice_2_With_Annotation_Approach/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Spring Projects ✨
2 |
3 | This repository contains a collection of Spring projects that demonstrate different approaches to building applications using the Spring framework. The projects showcase both annotation-based and XML-based configurations, providing a comprehensive overview of Spring's flexibility and power.
4 |
5 | ## Projects 📂
6 |
7 | 1. **Project 1: Annotation-Based Approach 🚀**
8 | - This project showcases the usage of annotations for configuring Spring beans, dependency injection, and other Spring features.
9 | - The code demonstrates best practices and common patterns used in Spring applications.
10 | - Examples include the usage of `@Component`, `@Autowired`, `@Controller`, `@Service`, and more.
11 |
12 | 2. **Project 2: XML-Based Approach 📄**
13 | - This project focuses on the XML-based configuration style in Spring.
14 | - It provides examples of defining beans, dependency injection, and other Spring features using XML configuration files.
15 | - The code demonstrates how to set up application contexts, wire dependencies, and handle advanced scenarios using XML.
16 |
17 | ## Getting Started 🚀
18 |
19 | To run any of the projects in this repository, follow these steps:
20 |
21 | 1. Clone the repository using the following command:
22 | ```
23 | git clone https://github.com/Shubh2-0/Spring-Projects-.git
24 | ```
25 |
26 | 2. Navigate to the specific project you want to explore:
27 | ```
28 | cd spring-projects/project-name
29 | ```
30 |
31 | 3. Follow the project-specific instructions provided in their respective directories.
32 |
33 | ## Usage 🛠️
34 |
35 | Feel free to explore, modify, and use these projects to learn more about Spring. Each project is self-contained and provides a detailed README with instructions on how to run it.
36 |
37 | ## Resources 📚
38 |
39 | In addition to the code, this repository also contains image files that can be used as references or visual aids when working with the projects. The images are located in the `images/` directory. 🖼️
40 |
41 | ## Contributing 🤝
42 |
43 | If you'd like to contribute to this repository, please follow these steps:
44 |
45 | 1. Fork the repository on GitHub.
46 |
47 | 2. Create a new branch with a descriptive name for your feature or bug fix.
48 |
49 | 3. Make your changes and commit them with clear and concise messages.
50 |
51 | 4. Push your changes to your forked repository.
52 |
53 | 5. Submit a pull request to the main repository, explaining the purpose and changes of your contribution.
54 |
55 | Please ensure that your code adheres to the existing coding style and conventions used in this repository.
56 |
57 |
58 | ## Acknowledgements 🙏
59 |
60 | The projects in this repository are inspired by various Spring tutorials, documentation, and community resources. We extend our gratitude to the Spring community for their valuable contributions.
61 |
62 | If you find these projects helpful, please consider giving them a ⭐️ on GitHub and sharing them with others who may benefit from them.
63 |
64 | ## 📬 Contact
65 |
66 | If you want to contact me, you can reach me through below handles.
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | 💓Happy Coding😄💻
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------