Use XSD to verify the SqlMapper configuration file of Mybatis (1), xsdsqlmapper
This article is based on the reconstruction of SqlSessionFactoryBean. Let's briefly review what operations have been done:
Now let's look at how to scale it. First,
This article used to be based on the refactoring of Sqlsessionfactorybean, a brief review of what has been done:
New Sqlsessionfactorybean, the original code and mybatis-spring the same;
The Buildsqlsessionfactory () method is used to extract a
This article is based on the refactoring of Sqlsessionfactorybean and briefly reviews what it does:
New Sqlsessionfactorybean, the initial code and mybatis-spring are the same;
Reconstruct the Buildsqlsessionfactory () method, and
All along, write the spring configuration file, the other configuration files are copied to the head, up to change the version number, it is not clear what is needed, what the Hell. Tidy up today and refuse to have no brain copy.one, Spring
1. Simplest schema documentHow to Write a simple XML schema document?
First, we will write out the simplest XML document.
Hello. xml
-------------------
Hello world !!
Hello. XSD
----------
The extension name of the XML schema document is.
Annotations can take full advantage of the Java reflection mechanism to obtain the class structure information, thus effectively reduce the configuration work; annotations are located in the same file as Java code and facilitate uniform maintenance
First review the dubbo-provider.xml defined in Dubbo Practice (i):XML version= "1.0" encoding= "UTF-8"?>Beansxmlns= "Http://www.springframework.org/schema/beans"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"Xmlns:context=
The environment used: dom4j spring 2.5.6, with: Spring. Jar dom4j. Jar common-logging.jar
Unit tests were performed on applications using Junit-4. And adopts interface-oriented programming (Abstract The interface layer)
Spring configuration
XSDL (XML Schema Definition Language)It consists of elements, attributes, namespaces, and other nodes of the XML document type.
I,XSDElement in
The XSD document must include at least the schema root element, the XML schema namespace definition,
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.