This project is aimed to provide a clear view of Spring Core and its concepts like AOP, bean injection, autowiring, and etc.
- Constructor injection
- Spring scope
- Lifecycle of a bean
- Setter injection
- Bean injection
- Collection injection
- Autowire byName
- Autowire byType
- Bean annotation
- AOP programs
- Before advice
- Throws advice
When running the project, you are required to follow the command instructions. Ensure that all the necessary concepts are loaded into the project. Be careful about what to run and what to leave commented out in the relevant sections of the bean.xml file.
When running the main function in the AOP module, refer to the AOP example file. I have used an IllegalArgumentException()
The workspace contains two folders by default, where:
src
: the folder to maintain sources- the folder to maintain dependencies: To download all the required dependencies
Download all the dependencies and add them to the classpath before running the project.
To create a Java project in Visual Studio Code (VSCode), you can follow these steps:
- Press Ctrl + Shift + P to open the command palette.
- Search for "Create Java Project" in the command palette.
- Select "Create Java Project" from the options provided.
- In the Explorer panel, you'll find the newly created Java project.
- Inside the project, navigate to the referenced libraries or dependencies.
- Add the required JAR files to the referenced libraries by copying them into the appropriate folder or by using any available configuration options provided by VSCode.
To set up a Java project in IntelliJ IDEA, you can follow these steps:
- Open IntelliJ IDEA.
- Go to File > New > Project.
- Select Java from the options on the left side.
- Choose the appropriate SDK (Java Development Kit) if prompted.
- Click Next.
- Specify the project name and location. Click Finish.
Once the project is created, you can add external JAR files to it:
- Locate the External Libraries section in the Project tool window.
- Right-click on it and select Add as Library.
- Choose Java if the JAR file contains Java code, or JARs or directories... if it's a generic JAR file.
- Navigate to the location of the JAR file on your filesystem and select it.
- Click OK or Apply to add the JAR file to your project.