Discover java spring framework tutorial, include the articles, news, trends, analysis and practical advice about java spring framework tutorial on alibabacloud.com
One: Paste constraint url:http://www.springframework.org/schema/beans/spring-beans.xsdHttp://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd "2 Select the second one.Two:Click File-->settingThree: Click Languages and FrameworksFour, click Schjemas and DTDs click on the three buttons to add.Add the URL and local file location and click Save. Can!
Has always been, we have applied a lot of AOP framework, but for the low-level implementation of AOP is not too much depth, the saying is "know it, do not know why", with the sudden rise of AOP academic discussion, I also opened up their horizons, in-depth understanding of the colorful AOP of the world.
Let's take a look at the public definition:
Baidu Encyclopedia:
In the software industry, AOP is the abbreviation of Aspect oriented programming, whi
configuring the knowledge of AOP.1) Configure the sessionfactory and let spring create the session. Add the following code to the Applicationcontext.xml:We used to create the session with Hibernatesessionfactory.java, now delete it and give it to spring to create. Here, a bean with the session factory class is created with the id "sessionfactory".2) Configure the transaction manager. Add the following code
Building the Java EE Framework based on springThe content includes:1.MAVEN tool Use,2.J2EE Frame Technology selection,3. Common additions and deletions based on JPA,4.SPRING Transaction Management4.spring-security Safety Management,5.spring-session Distributed session manage
The key component of the spring framework is the aspect-oriented programming (AOP) framework. Aspect-oriented programming not only breaks down the logic of the program into different parts called the so-called worry. The functionality of an application that spans multiple points is known as crosscutting concerns and these crosscutting concerns are distinguished f
official document is to show us, the official people are not looking atAdd a few jar packagesThese three one do not want to lazy, all have to add, I was personally experienced, really lazy to move results a one to add, but more trouble, early know tube he what dick hair, cluth in good4, we configure the level two cache XML fileEhcache.xmlDon't ask me why English has suddenly become so good, copy the official, you know5, modify the Person.hbm.xml file6. Finally, we're going to add a test for the
Java EE (Java platform,enterprise Edition) is the enterprise application version of Sun Corporation (Oracle's acquisition of April 20, 2009). This version was formerly known as the Java EE. can help us develop and deploy portable, robust, scalable, and secure server-side Java applications. Built on the
}web-inf/logs/error.log log4j.appender.e.file.maxfilesize=500kblog4j.aPpender. E.append = true## Only output logs above the error level!!! Log4j.appender.e.threshold = Errorlog4j.appender.e.layout = Org.apache.log4j.patternlayoutlog4j.appender.e.layout.conversionpattern =%-d{yyyy-mm-dd HH:mm:ss} [%t:%r]-[%p]%m %nlog4j.appender.e.encoding=utf-8Configure the Info-level output to the console, and debug and error are output to the corresponding file. 4. Using the Log ObjectImport Org.slf4j.logger;im
Create a new project and add support for the databaseDownload MySQL Driver pack mysql-connector-java-5.1.7-bin.jar, shortcut key ctrl+alt+shift+s, add jar package to ProjectWriting Test Text Jdbctemplatedemo.java1 PackageCom.jdbc;2 3 Importorg.junit.Test;4 Importorg.springframework.jdbc.core.JdbcTemplate;5 ImportOrg.springframework.jdbc.datasource.DriverManagerDataSource;6 7 Public classJdbctemplatedemo {8 @Test9 Public voidAdd () {TenDriverman
First, elaborated:IoC: We used to write the framework although we have layered, web, business layer, persistence layer. But the relationships between the layers. The coupling is high, when the layer calls the other layer, the object of the class of the new corresponding layer is needed, so we need to change the call of each layer when we make the modification later.The coupling is relatively high and is not conducive to maintenance.And
Because of the test, recently had to touch the Java spring @Scheduled scheduled tasks, it was thought that the configuration of the expression and crontab is exactly the same, did not expect a bit different.in spring , a cron expression has at least 6 or 7 space-delimited time elements.As follows:Example:0 0/5 * * * is triggered every 5 minutes0 15 10 * *? Trigge
= "java"%> 2 3 4 5 6 7 8 9 Configure TomcatFirst, Tomcat is configured, and the following is a well-configured interfaceRun the project, Access http://localhost:8080/home/What is needed here is to configure Tomcat, set application context, such as application context as "/home", then the root address of the project's server is:http://localhost:8080/home/, then to display the Home.jsp interface should be: Http://localhost:8080/home/h
configuration of the context
/* "3" SET Transaction Management * 3.1 "allows the @transactional tag to be valid * makes @transactional effective and can be dynamically intercepted by means of a method identified in the Bean, which is Advice by the spring framework. Similar to @enableasync, you need to set up @enabletransactionmanagement. But note: For method enhancements, we should use the same approach,
JAVAEE--SPRING01: Introduction, construction, concept, configuration details, attribute injection and application to project Javaee--struts2_04: Custom interceptors, struts2 tags, login functions and check the implementation of the login Interceptor Java EE learning--struts2_ 03:OGNL expressions, OGNL and Struts2 combination and exercises: Customer list Java EE learning--struts2_02: Results jump mode, Acces
There has always been a recent exposure to programming principles or patterns such as the IoC (inversion of control, controlled inversion), DI (Dependency injection, Dependency injection), which is at the heart of the famous Java framework Spring, Struts, and so on. According to this check the Wikipedia entries, and from the library to borrow related books, read
In the near future, instead of doing. NET projects, but using Java as a development language, think about using SPRINGMVC development, because the previous years have used struts1/2+hibernate/ibatis+spring developed projects, so there are some foundation. After seeing some SPRINGMVC's introduction on the net, I made a demo.This demo will be divided into several to introduce, today, first of all, the most ba
"Java EE Spring" 12, integrated SSH Framework (end version)Finally, we send the whole project, the code, people do not want to download the project, you can see all the code here (because the project needs a download points, really not much =, I think I have been so long, collect points should not be excessive ... HeyHere, I try to make it, lest the copy and past
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.