What is this Spring? 🌱
Spring Fundamentals
Hello and welcome everyone to another Techie Talk. Today I am going to talk about another wonderful topic of Spring.

What is this Spring?
Spring is an application framework and inversion of control container for the Java platform. and it Originally build to reduce the complexity of Enterprise Java Development, It is POJO based and interface driven, Very lightweight compared to old J2EE methodologies & build around patterns and best practices (singleton , factory and etc.).
Benefits of it
- Can do Testability
- Contain Maintainability
- Scalability
- Handle Complexity
- Run complex code in faster
- Code can focus on testing
- Can remove configuration from codebase.
Prerequisites of need
- Java 7 (5 or above)
- Eclipse Juno or later (Spring sts-3.X.X.RELEASE IDE is Preferred.)
- spring-framework-3.2.4.RELEASE (or 3.x)
Lets Start Spring Project and see how its work!!!!!…………………………..
01).First use this link and initialize spring → https://start.spring.io/



In this dependency list you can use whatever you want, im use Spring Web because we are going to create simple restful web service to test our Spring project.

After adding all the dependencies click this GENERATE then it will download automatically.
02). Open Eclipse IDE and import this project

03). Select Existing maven project and import it

04) After click browse and select the project that we extracted, then you can see it on your project explorer.

05) Now we create more packages as Model, Repository & Service.
06). Create Model package as com.shanira.training.salesmanager.model

Create class called Employee.java and Generate Getters and Setters for employeeName and employeeLocation variables.
07).Create Repository package as com.shanira.training.salesmanager.repository

Create class called HibernateEmployeeRepositoryImpl.java inside the repository package.
Using interfaces is a key factor in making your code easily testable in addition to removing unnecessary couplings between your classes.
Support for safety of changes
• List myList = new ArrayList(); // programming to the List interface
- This will ensures that you only call methods on myList that are defined by the List interface (so no ArrayList specific methods)
- later on you can decide that you really need
- List myList = new TreeList();
08) Refactor the interface

Tick the✅ getAllEmployees(): List<Employee>
Interface Name : EmployeeRepository
09).Create Service package as com.shanira.training.salesmanager.service
Inside that create class called EmployeeServiceImpl.java and create Interface also.

Now you can run and see the output in the console you can get the port 8080(it can be different ) enter it in browser and get the output as shanira at kandana.
reference : https://krishantha.com/decks/spring/
Hope you see on next Article !!!! 🔥🔥🔥🔥🔥