Getting started with Spring + Eclipse development

Source: Internet
Author: User
Tags aop

Spring is a very good lightweight framework, and through spring's IOC container, our focus is on the business logic that needs to be implemented. Support for AOP enables us to dynamically enhance the business approach. Writing a common business logic bean is easy and easy to test because it can separate unit tests from the Java container, such as the servlet,jsp environment. The final step is to organize these business beans in the Spring framework as XML configuration files, and they work as we intended! Very easy!

This article presents a basic spring Getting started example and demonstrates how to use spring's AOP to separate complex business logic into every aspect.

1. Development environment Configuration

2. Writing the Bean interface and its implementation

3. Configure the Bean in spring and get an instance of the bean

4. Write advisor to enhance Servicebean

5. Summarize

1. Development environment Configuration

First, the Java environment needs to be configured correctly. Recommended installation of JDK1.4.2 and proper configuration of environment variables:

JAVA_HOME=<JDK installation directory >

Classpath=.

Path=%java_home%\bin .....

We will use the free Eclipse 3.1 as the IDE. Create a new Java Project, copy the Spring release package Spring.jar and Commons-logging-1.0.4.jar to the project directory, and configure Java in Project > properties Build Path:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.