spring-Annotation Development1. Adding this code to the Applicationcontext.xml allows the IOC container to load a class that scans for 4 types of annotations:base-package="com.bjsxt.tmall" >Beans xmlns= "Http://www.springframework.org/schema/beans"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"Xmlns:context= "Http://www.springframework.org/schema/context"xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework
I recently want to study the source code of spring, but I encountered a lot of trouble when I want to import the spring sub project to Eclipse (in fact, I blame myself for taking it for granted ). Find the gitHub homepage (http://springsource.org/spring-framework) for spring-framework ), without reading the instruction
A deep understanding of Spring transaction principles and a deep understanding of springI. Basic principles of transactions
The essence of Spring transactions is the database's support for transactions. Without the database's support for transactions, spring cannot provide transaction functions. To use transactions to operate databases only using JDBC, follow the
Spring container manages various files and spring container
1. Import files
2. Reference The resource configuration file
If no ignore-unresolvable = "true" is referenced for multiple times, an exception "cocould not resolve placeholder" will occur.
In Spring 2.5,
You can change the format as follows:
Use the Referenced File Content:
3. Reference The resource
Spring configuration file and spring configuration file
When I first came into contact with the spring framework, I encountered such and such difficulties during configuration files. I did not make it clear in many aspects when I checked the information. I also sorted it out for future reference.
First, let's briefly describe the
Spring internal working mechanism (I): spring Internal Working Mechanism
Spring has many internal mechanisms, so I plan to write them in several more stages.
This chapter only explores what Spring container startup has done;
Preface:
It is said that Spring containers are lik
The Event-driven model in spring, also known as the Publish-subscribe pattern, is a typical application of the observer pattern, as summarized in the previous blog post, http://www.cnblogs.com/fingerboy/p/5468994.html Here's a look at the application of the observer pattern in Spring.The structure of the spring Event-driven model. Start by clarifying the concepts of several
Spring containerThe spring container can help you manage all your bean objects. Jargon is called IOC control inversion. In a traditional program. The generation of objects is completed by the developer. In control reversal, the object's generation is all given to the frame. This advantage is to reduce the dependence of the program.The Bean's life cycle in spring
Lin Bingwen Evankaka Original works.Reprint please specify the source Http://blog.csdn.net/evankakaThis article will be the presenter of Spring's configuration under Eclipse, with spring executing the first HelloWorld.First, download the required documentsHere we have configured the Java execution Environment and installed eclipse.Download Spring: http://maven.springframework.org/release/org/springframework
Spring transaction configuration, spring transaction1. Declarative transaction Configuration* Configure SessionFactory* Configure the Transaction Manager* Propagation Features of transactions* The methods of those classes use transactions.
The specific configuration is as follows:
In this way, you do not need to write the code used to manage transactions in the Code:
Public void addUser (User user)Throws E
1. What is Spring?
Spring is an open-source container framework for IoC and AOP. It aims to simplify enterprise development.
Ii. Control reversal (IoC)
Control inversion: the so-called control inversion means that the application itself is not responsible for the creation and maintenance of dependent objects, and the creation and maintenance of dependent objects are the responsibility of external containe
Spring Study Notes-Why use Spring
In our project, we don't need Hibernate, Struts, or ibatis. But we use Spring in almost every project. Why? Let's analyze the advantages of Spring:1. Reduce coupling between components to achieve decoupling between different layers of software2. You can use many services provided by co
Spring container loads and executes a method. spring container loads and runs
Today, I encountered a problem. I need to add a timer to the project and execute the timer after the project is started. So what are the methods to be executed after spring container Initialization on the Internet:
I checked a lot of information and found two methods that met the condit
Spring boot attracts a lot of fans with its many features of friendship, such as 0 configuration and microservices. and its seamless integration with the Spring security framework makes it a secure feature. On this basis, using the Thymeleaf template engine for rendering, static and dynamic combination, so that the page development more simple and intuitive.The user name and password to submit a login throu
support for DAO in springSpring's support for data Access Objects (DAO) is designed to simplify its use with data access technologies such as Jdbc,hibernateor JDO. This allows us to easily switch the persistence layer. Don't worry about capturing each technology-specific exception when coding.
optimized Exception type system : The data access exception is refined, and the exception type is enriched. (All unchecked Exception, this anomaly does not change, the same exception is used to de
Some thread classes or Servlets cannot call the classes inside the spring container by using spring annotationsTry to change the thread or servlet plus @component or @controller annotations to be managed by the spring container, and then call the other classes inside the Spring container and fail!Finally, find the foll
Quick StartThe main objective of this chapter is to build the Spring Boot Foundation project and implement a simple HTTP request processing, which gives a preliminary understanding of spring boot and experiences its simple structure and rapid development.System Requirements:Java 7 and aboveSpring Framework 4.1.5 and aboveThis article uses Java 1.8.0_73, Spring Bo
define the first and then use it where you want to use it.2. Connection point (Joinpoint)This is a better explanation, that is, spring allows you to use the place of notification, that is really more, the basic of each method before, after (both have a row), or throw an exception can be a connection point, Spring only supports method connection points. Other as ASPECTJ can also let you in the constructor o
Specify multiple profiles of equal relationships for SpringThe first way: The wildcard specifies the file (which is why we recommend naming all the configuration files for a rule)Second way: Load multiple configuration paths, using ApplicationContext variable-length parameter construction methodThe third way: similar to the second, but called the constructor of the ApplicationContext parameter as a string array//load Spring configuration file, create
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.