Java Spring on Windows 10 Part 1: Spring Framework

🌿1. Install Spring Framework

Install Apache Common Logging API

Download the latest version:

Install Spring Framework

Download the latest version:

🍳2. Setup Eclipse

Let’s open a new Java project.

Add Spring Libraries

☕️3. Create a Spring Demo

Let’s add two classes. prints a message.

public class Hello {
private String msg;

public void setChicken (String s) {
this.msg = s;

public void getChicken() {
System.out.println("Message: "+msg);
} handles the application context.

public class SpringApp {

public static void main(String[] args) {
ApplicationContext context =
new ClassPathXmlApplicationContext(
Hello mHello =
(Hello) context.getBean("hello");

Bring in the Addon to Ease Your Work.

Let’s add an addon, Spring Tools, to help us to create the Beans.xml.

Create Beans.XML

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=...>

<bean id = "hello" class = "com.homanspring.Hello">
<property name = "chicken" value = "Hello to Spring World!"/>

Message: Hello to Spring World!




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Homan Huang

Homan Huang


Computer Science BS from SFSU. I studied and worked on Android system since 2017. If you are interesting in my past works, please go to my LinkedIn.