Spring_framework

intro

Spring framework (homepage)

Spring Release http://spring.io/blog/category/releases

Setup Spring development env in Eclipse

  1. install Spring Tool Suit(STS) for Eclipse.

    http://spring.io/tools/sts/all

  2. download spring jars

Download prebuilt jar files: http://repo.spring.io/release/org/springframework/spring

  1. Enable “ALT + /“: delete “word completion” short key; reassign to “context assist”.

logging

  • commons-logging(JCL): deprecated

  • log4j is nice and all, but no thanks.

  • slf4j

    Need:
    jcl-over-slf4j: redirect commons-logging to slf4j, spring need commons-logging
    slf4j-api: slf4j core api

  • logback

    Need:
    logback-classic.jar: use it to implement real logging
    logback-core.jar

chainsaw is a good online log receiver.

If chainsaw webstart can not run under JDK7/8, need to add “http://logging.apache.org" into java security exception list.

First Spring project

  1. add spring jars to build path

Needed Jars:

expressions
aop
beans
context
core
  1. create spring config xml, then switch to “Spring Config Editor”, a marvellous tool.

  2. create main() class, which loads spring xml.