1. How to learn Spring? You can learn Spring through the following ways: (1) Spring Download Pack MVC-STEP-BY-STEP and SAMPLE directory in the Spring Directory are examples of preferred Spring development. (2) AppFuse integrates the current most popular lightweight lightweight framework or tools Ant, XDoclet, Spring, Hibernate (Ibatis), Junit, Cactus, Strutstestcase, Canoo's WebTest, Struts Menu, Display Tag Library, OSCache, JSTL, Struts. You can learn Spring through the AppFuse source code. AppFuse website: http://raibledesigns.com/wiki/wiki.jsp? Page = Appfuse (3) Spring Development Guide (Htttp://www.xiaxin.net/spring_dev_guide.rar) A spring entry Books, the concept of reverse control and dependency injections, as well as Spring Bean management, Spring's MVC, Spring, and Hibernte, IBATIs. (4) Spring Research Chinese Forum Springframework Chinese Forum (http://spring.jActiongroup.net) Spring section 2 of http://forum.javaeye.com, uses Spring framework programming, console prints Log4j : WARN PLEASE INITIALIZE THE LOG4J SYSTEM PROPERLY? Explain that your log4j.properties is not configured. Please put the log4j.properties in the ClassPath of the project, Eclipse's classpath is a bin directory, so you can put the log4j.properties in the SRC directory because the files in the SRC directory are copied to the bin directory. Here is an example of log4j.properties:
log4j.rootLogger = DEBUG, stdoutlog4j.appender.stdout = org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout = org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern =% d% 5p (% F: % L) -% M% N 3, java.lang.noclassdeffounderror? Generally, because you don't put the necessary JAR packages into the lib. For example, you have to use Spring and Hibernate, you need hibernat.jar, aopalliance.jar, cglig.jar, Jakarta-Commons, in addition to Spring.jar. http://www.springframework.org/download.html Download Spring Development Pack, provide two zip packs Spring-framework 1.1.3-with-dependencies.zip and Spring-Framework-1.1.3.zip, I suggest you Download Spring-Framework 1.1.3-with-dependencies.zip. This zip decompression is more than one lib directory than the latter, where Hibernate, J2EE, DOM4J, AOPALLIANCE, JAKARTA-Commons, etc. are common packages. 4, java.io.filenotfoundexception: could not open class path resource [.... hbm.xml], prompt not to find an XML file? The reason is generally two: (1) The XML file is not in the ClassPath. (2) The XML name in ApplicationContext-Hibernate.xml does not have a package name. such as:
String [] paths = { "com / yz / spring / dao / hibernate / applicationContext-hibernate.xml", "com / yz / spring / service / applicationContext-service.xml"}; ctx = new ClassPathXmlApplicationContext (paths); 8 How do I load ApplicationContext in web applications? You can automatically load by defining web.xml.
Expert One ON One J2EE Design and Developmentexpert One ON One J2EE Development WION ONEB You should also take a look at the Martinfowler's Inversion of Control Containers and The Dependency Injection Pattern.
Http://www.martinfowler.com/articles/injection.html will study Spring's documentation.
Http://www.jactiongroup.net/reference/html/index.html (Chinese version, unsatisfactory translation) is more practical.