Migrating the Spring Boot application to Java 9: CompatibilityWith the advent of Java 9, there is a lot of discussion about how to migrate applications to use modular systems. Unfortunately, most of the articles focus on the simple Hello World program. Or worse, for Spring applications, the sample application uses traditional practices-such as using XML as an example.The purpose of this article is to correc
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 actually Servlet. Servlet is used to receive request
Just yesterday Spring Boot2.0.0.RELEASEOfficially released, this morning in the release of Spring Boot2.0 in a small episode, the spring Boot2.0 sync to the Maven warehouse when there was an error, and then spring boot officials quickly released on GitHub The V2.0.0.release version was withdrawn. In the afternoon to fi
Problem:
1. See this a bit Meng, just started to think that the JDK is not a problem. So:
Yes, no problem. Continue to think, since the error is to find what this Maven bin directory, cmd Open, naturally look at this:
Since it is java_home
Let's use spring boot to develop a simple "Hello World" web app, built using MAVEN. Before you begin, check your version of Java and Maven to see if it is a supported version of Spring boot1.3:$ Java-versionjava Version "1.8.0_45" Java (tm) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot (tm) 64-bit Server V M (build 25.45-b02, Mixed mode)$ mvn-vapache m
Spring: Use Spring AOP to separate log input and method. spring AOP
Log output is a common function. The traditional method is to write the output statement inside the method body. When calling this method, use the input statement output information to record the execution of the method!
1. First write a common class:
Package com. importnew; public class Common {
Preparatory workFirst, build a simple Web project that will be used to add security controls later, and if you are building a web app using spring boot, you can read the Spring Boot Development web App article first.Web tier Implementation Request mapping@Controller Public class Hellocontroller { @RequestMapping ("/") public String Index () { return "Index"; } @RequestMapping ("/hell
Spring el--spring Expression language:
Supports the use of expressions in XML and annotations, similar to the El Expression language of JSPs.
Spring development often involves invoking a variety of resources, including common files, URLs, configuration files, system environment variables, and so on, and we might use spring's expression language to implement reso
also need to introduce the Jasper package dependencies that are used to compile the JSP.
After adding JSP support configuration, the following a method and B method is to jump to the/web-inf/jsp/regiester.jsp page.
Package Xyz.letus.boot.controller;
Import Java.util.Map;
Import Javax.servlet.http.HttpServletRequest;
Import Org.springframework.stereotype.Controller;
Import org.springframework.web.bind.annotation.RequestMapping;
Import Org.springframework.web.servlet.ModelAndView;
@
Http://www.iteye.com/blogs/subjects/spring3http://jinnianshilongnian.iteye.com/blog/1482071Learn Spring with me (Open Tao blog)Spring is an open source framework that is created to address the complexities of enterprise application development. One of the main advantages of the framework is its layered architecture, which allows you to choose which components to use while providing an integrated framework f
processing, the purpose is to encapsulate data. 8.Servlet is how the request is handled usually when we send a request like Http://localhost:8080/TomcatTest/login, How does the container find the Loginservlet class to handle it? In fact, Tomcat has a mapper class that is designed to hold the child container information in the container container in Tomcat, Before the Org.apache.catalina.connector.Request class goes into the container container, Mapper will be based on this request hostname, C
Next we will create a web project. For simplicity, We will directly use the template in Virgo to create a new project. The control layer uses spring MVC 3.Create a WEB Project
Open STS and create a project. Select sprinng template project.
Figure: Create a spring template project
Select spring MVC Project
Figure: Template Selection
Enter the project name
[Spring] uses Spring's AbstractRoutingDataSource to implement multi-data source switching. spring dynamically switches data sources.
Recently, because the project needs to synchronize data between two projects, specifically, Project 1 data is synchronized to project 2 through the message queue, because this update operation also involves updating data in multiple databases, you need to switch between multip
1. Click Create New Project2. Select Spring initializer and jdk1.8 Note: Project names are lowercase letters3, now only need a create a Web, choose a good4, no use of the file, you can delete5. pom.xml file automatically introduces web and Java related packages and packaged plugins Both the main program and the test program are automatically generated.Spring Boot series (ii) Spring initializer quickly crea
If you use JUnit's liberary, you can complete the test of the program.
In spring development, Spring provides the relevant test modules, which makes it easy to load the configuration files and test them.
How to use:
The first step:
Introduction of the test package, found in the download of the Spring package Lib:
Add jar to project and build path
Step Two: Wr
Using MAVEN to create a Java Web project (Spring MVC) uses the following tools:1. Maven 3.22, IntelliJ idea 133. JDK 1.74. Spring 4.1.1 Released5, TOMCAT76. Logback 1.0.13 Log Output componentThe next step is to show how to create a Web project with a maven template1. Use Maven-archetype-webapp template to quickly create skeleton structure of Web projectOpen the console, go to the directory where you want t
Each sub-project of 1 Spring
Spring framework (CORE ):The Spring framework provides a comprehensive programming and Configuration Model for modern Java-based enterprise applications-on any kind of deployment platform. A key element of spring is infrastructural supportThe application level:
Using idea 15 as a development tool一、四个 Module650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8B/5F/wKiom1hKsICSrBCGAAEIDxJakOg515.png-wh_500x0-wm_3 -wmp_4-s_3112128658.png "title=" four modules. png "alt=" wkiom1hksicsrbcgaaeidxjakog515.png-wh_50 "/>
API as an interface, jar package, providing dependency
Core Base module, providing entity classes, tool classes, jar packages, providing dependency
Consumer Dubbo in the consumer, control layer, war pack
provide the relevant API classes at runtime. At this point, the Execute MVN Package command will get a war file that we can directly put under Tomcat (requires 7.0.42 or more). The above describes the process of developing an application based on spring boot, and its documentation is not yet complete, but there are a number of examples on GitHub, including integrated access to the database with
1. The content of the article is summarized:The spring framework is MAVEN-enabled, because the jar packages packaged by all the modules of the spring framework and other jar packages that spring relies on are stored in a central Maven repository, and if your project is managed using MAVEN, Then you can use MAVEN in your project to introduce the
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.