Historical Theory of Spring (Data desensitization) and Historical Theory of spring Desensitization
At present, the architecture of many companies has been migrated from Struts2 to SpringMVC. Have you ever wondered why SpringMVC is used instead of Servlet + JSP to build a Java web project?
In this case, let's start with the source. The source of Struts2 is actuall
[Spring] 19. Four Methods for configuring data sources in spring and four methods for Spring
No matter what persistence technology is used, data sources must be defined. Spring provides four different
I. OverviewSpring Boot Actuator is a child project of spring boot. With it, you can add some production-level services to your app without requiring special configuration. This tutorial shows the use of Eclipse + maven to build a restful app from scratch.The effect of this application is to access http://localhost:8080/fuck?name=xxx, return a JSON string, and access http://localhost:8080/metrics to see some information about the application heap.
database connection pool selection algorithm
By default, database connections can be configured automatically using the DataSource pool. Here is an algorithm for selecting a specific implementation: because of the performance and concurrency of the Tomcat data source connection pool, we always use it preferentially when Tomcat is available. If HIKARICP is available, we will use it. If Commons DBCP is available, we will use it, but it is not recommend
MongoDB is a well-known NoSQL document database, while Spring is a well-known open-source framework in the Java field. In addition to the IoC and AOP components that constitute the core of Spring, Spring also has a large number of sub-frameworks applied in different fields. Spring
interfaces The value of the Spring JDBC Abstraction Framework is reflected in the following areas: (Note: After using the spring JDBC Abstract Framework, the application developer only needs to complete the coding of the italic part.) )
Defining Database Connection Parameters
Open a database connection
Declaring SQL statements
precompiling and executing
What is spring data? Spring data is an open source framework for simplifying database access and supporting cloud services. Its primary goal is to make access to data easy and efficient, and to support map-reduce frameworks and cloud computing
Spring + spring mvc + mybatis + react + reflux + webpack Web engineering example, mybatisreflux
Recently I wrote a Java Web project demo, which is built using maven;
The backend uses spring + spring mvc + mybatis;
The front end uses react + reflux + webpack and ES6 syntax. A
return JSON format of the data to the front, there is no use of Spring MCV view parser, of course, if you want to use, you can add their own, personally feel like there is no need.The backend specifically adds a servlet for processing URL requests, which is simply forward to the specified HTML page; In this servlet you can add permissions to control and filter related things.Front End Description1. Install
transaction.
types of transaction management supported by springSpring supports two types of transaction management:
Programmatic Transaction Management : This means that you manage transactions programmatically, giving you great flexibility, but difficult to maintain.
Declarative Transaction Management : This means that you can separate business code from transaction management, and you only need to manage transactions with annotations and XML configurations.
Benefits of
' (
' id ' bigint not null auto_increment,
' name ' varchar (255) NULL,
' age ' int NULL,
PRIMARY KEY (' id ')
);
INSERT into info (name,age) VALUES (' Mick ', ' a ');
INSERT into info (name,age) VALUES (' Mick1 ', ' a ');
INSERT into info (name,age) VALUES (' Mickjoust1 ', ' + ');
INSERT into info (name,age) VALUES (' Joust ', ' 22 ');
Start
View Homepage: http://localhost:8080View database data: Http://localhost:8080/show Summary
This chapter
widely used in domestic and foreign internet companies.The biggest feature of MongoDB is the support of the query language is very powerful, its syntax is somewhat similar to the object-oriented query language, almost can achieve similar relational database single-table query most of the functions, but also support the indexing of data. MongoDB's implementation of high-availability and read-write load balancing is very concise and friendly, and Mongo
Spring data gives us a lot of access to the data, and then we combine Spring-data-cassandra to see how to quickly implement access to Cassandra data.Of course, the Official Handbook is a must-see, official 1.2.0RELEASE document. Prepare for the basic use of dependency:SETP1:
=10000second.datasource.max-active=200second.datasource.test-on-borrow=truesecond.datasource.initial-size=10
#================================== Jpa config ====================== ======================# Specific actions of the entity class to maintain the database table structure: update/create-drop/validate/noneSpring. jpa. hibernate. ddl-auto = none# Print SQL statementsSpring.
Configure four data sources in Spring (conversion) and four types in Spring
Original http://blog.csdn.net/orclight/article/details/8616103
No matter what persistence technology is used, data sources must be defined. Spring provides four different
Spring data brings us a lot of convenience in accessing the data, and then we'll combine Spring-data-cassandra to see how to quickly access the Cassandra data.
Of course, the Official Handbook is sure to look at the official 1.2.0
-availability and read-write load balancing is very concise and friendly, and MongoDB comes with the concept of a replica set that can be highly available, read-write, and load balanced by designing the right set of replicas and drivers.These features of MongoDB are very handy for high-performance querying of data, and MongoDB supports Aggregate and Mapreduce using the idea of divide and conquer to handle large-scale
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.