Spring learning materials and Knowledge base collections

Source: Internet
Author: User
Tags knowledge base log4j

Here is my learning to use spring to present some of the information and experience, I hope to be useful to some friends.

1. Learning Materials Section

1. 1 It is highly recommended to learn the Mvc-step-by-step in the doc directory in the spring download package. Examples in the sample directory are also examples of better spring development. 1. 2 Appfuse: When I first started learning, I used Appfuse, which helped to build projects quickly. Integrates several of the most popular open source lightweight frameworks or tools Ant,xdoclet,spring,hibernate (IBATIS), junit,cactus,strutstestcase,jstl,struts, and so on. AppFuse website: Http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse 1.3 Spring Development Guide (Xia Xin) (http://www.xiaxin.net/Spring_ Dev_guide.rar) Introductory book, which briefly introduces the concepts of reversal control and dependency injection, and spring's bean management, the combination of spring's mvc,spring and Hibernte,ibatis. It's also useful for beginners. 1.4 Spring Learning Chinese Forum springframework Chinese Forum (http://spring.jactiongroup.net). Javaread Open Source website (http://www.javaread.com/question/list) question and answer column, the registration is simple, the question replies very quickly. The spring section of the Java Sight Forum (http://forum.javaeye.com) has a discussion of issues. 1.5 Depth Study: After the basic master, you should go and see these two books. The two books were written by Rod Johnson, Spring's author. Expert one on one Java design and Development Expert one on one Java EE Development without EJB 1.6 to study the documentation for spring. Http://www.jactiongroup.net/reference/html/index.html

2. Knowledge Base

The

2.1 How to configure Quartz in the spring configuration is as follows: <bean id= "Taskjob" class= " Org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean ">     <property Name= "TargetObject" ref= "MyService"/>     <property name= "Targetmethod" value= "MyMethod"/> & nbsp;   <property name= "concurrent" value= "false"/> </bean> <bean id= "Tasktrigger" Org.springframework.scheduling.quartz.SimpleTriggerBean ">     <property name=" Jobdetail "ref= "Taskjob"/>     <property name= "Startdelay" value= "10000"/>     <property N Ame= "Repeatinterval" value= "60000"/> </bean> detailed reference: HTTP://WWW.JAVAREAD.COM/ARTICLE/SHOW/69

2.2 How to configure interceptors under Spring datasecurityadvisor <bean id= "Datasecurityadvice class=" com.javaread. Your advice implementation class "/> < Bean id= "datasecurityadvisor" class= "Org.springframework.aop.support.RegexpMethodPointcutAdvisor" >          <property name= "Advice" >              <ref local= "Datasecurityadvice"/>         </ property>         <property name= "Patterns" >              <list><!--interception mode-->                  <value>.*get.*</value>   <value >.*create.*</value>   <value>.*update.*</value>   <value>.*delete .*</value>             </list>         </property> </bean> Use advice: When you need to use the interceptor, add the code to the corresponding bean. <property name= "Postinterceptors" >  <list>   <ref local= "Datasecurityadvisor"/>  </list> </property>

The control of how transaction management   Transaction management is implemented in 2.3 spring should be put into the business logic layer. The XML file is defined as: Transaction customization: <bean id= "Txproxytemplate" abstract= "true" class= " Org.springframework.transaction.interceptor.TransactionProxyFactoryBean "> <property name=" TransactionManager "><ref bean=" TransactionManager "/></property> <property" Transactionattributes "> <props> <prop key=" save* ">PROPAGATION_REQUIRED</prop> <prop key=" remove* ">PROPAGATION_REQUIRED</prop> <prop key=" * ">PROPAGATION_REQUIRED</prop> </props > </property> </bean> Service Bean configuration: <bean id= "Yourmanage" parent= "Txproxytemplate" > < Property name= "Target" > <bean class= "com.javaread." Your service bean > <property name= "Yourdao" ><ref Bean= "Yourdao"/></property> </bean> </property> </bean>

In the 2.4 Spring framework, the bean is getting more and more, how to manage the Main method has two, a to classify beans, with different XML file configuration, and then load. B to simplify configuration using annotation new features. More information: http://www.javaread.com/question/show/962.5 How to configure log4j in spring is very simple, add the following code to Web.xml. <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/web-inf/ Log4j.properties</param-value> </context-param>

The author of this 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.