When we do web development based on the spring framework, we usually have the DAO layer (Database Operations), the service layer (business logic operations, such as determining whether to find data in cache such as redis,memcached, when to call the DAO layer), the Web layer (receiving requests from front-end users, Call the service layer and respond to the front end with data and views). Among them, Spring
. Startup classStart class additions @EnableDiscoveryClient and @EnableFeignClients annotations.@SpringBootApplication @enablediscoveryclient@enablefeignclients Public class consumerapplication { publicstaticvoid main (string[] args) { Springapplication.run (consumerapplication. class , args); } }
@EnableDiscoveryClient: Enable service registration and discovery
@EnableFeignClients: Enable feign for remote invocation
Feign is a declarative Web service
a name, which is usually a framework for you to handle, so spring MVC writes a list in a method parameter to receive a batch submission of the same variable. Incoming array @RequestMapping (value= "/array", produces= "Text/html;charset=utf-8") public String arraytransaction (HttpServletRequest request, @RequestParam ("username") string[] usernames) { if (usernames! = null) {for
What is Spring MVCBefore learning something, we must know roughly what this thing is, what it can do, and why it is used.Spring MVC is an open source platform, a spring-based MVC framework that supports the development of WEB applications based on Java. The MVC
IntelliJ is recognized as one of the best Java development tools in the industry, especially in the areas of Smart Code helper, code auto-hinting, refactoring, Java EE support, Ant, JUnit, CVS integration, code review, innovative GUI design, and more. Spring MVC is a successor to Springframework and provides a full-featured MVC module for building WEB application
The Spring framework provides a full-featured MVC module for building WEB applications. Using spring's pluggable MVC architecture, you can choose to use a built-in spring web framework or a WEB framework such as Struts. With the policy interface, the
In this article we build our code based on the architecture diagram. According to the micro-service design idea, combining some excellent projects of spring cloud, such as service discovery, governance, configuration management, routing load, security control and other excellent solutions, using MAVEN technology to modular, service, atomization encapsulation and
Spring MVC is a model-view-controller (MVC) Web framework built on the central front-end controller servlet (Dispatcherservlet), which is responsible for sending each request to the appropriate handler, using the view to ultimately return the concept of the response result. Spring
Here is an excerpt from the introduction of Spring MVC in Open spring MVC : Spring Web MVC is a lightweight web framework that implements the request-driven type of the Web MVC design
Http://baike.baidu.com/view/1834982.htmSpring MVC is a follow-on product of springframework and has been integrated into spring Web flow. The Spring framework provides a full-featured MVC module for building WEB applications. Using the spring pluggable
1. Import Jar Package
Validation-api-1.0.0.ga.jar This is a more critical jar package that is primarily used to parse annotation @valid.
Hibernate-validator-4.3.2.final.jar can download the latest, this package is particularly important in the annotation encoding.
The other is some log packages (not necessarily all need): Jboss-logging-3.1.3.ga.jar, Slf4j-log4j12-1.6.1.jar
2. Structure diagram of Web project
The main str
The code used in this article is: Spring 3.0It's been a long time in contact with spring. However, every time you use the API directly provided by spring, you will naturally want to explore the mysteries of spring. This morning, an architecture of spring's beanfactory was so
I. OverviewBoth spring Web MVC and STRUTS2 are the framework of the presentation layer, which is part of the spring framework. Spring Web MVC is a Java-based lightweight web framework that implements a request-driven type of web MVC
In this article we build our code based on the architecture diagram. According to the concept of microservices design, combining some excellent projects of spring cloud, such as service discovery, governance, configuration management, routing load, security control and other excellent solutions, use MAVEN technology to modularize, service, and atomically encapsul
Spring MVC Basics
1. What is the 1.1 web MVC design pattern?
The Framework Design Concept controls the business logic and pages accordingly, and separates client requests from database processing,
The structure is clear and clear, making the code easier to modify and manage.
M-model
Business logic layer
V-view
Business presentation layer
C-controller
Control laye
The previous article introduces the integration of Spring Cloud cloud service architecture-Honghu Enterprise distributed micro-service Cloud architecture diagram, which we build according to the architecture diagram. According to
Written in front of the small tail actually this also has spring is to see the school's video basic're far off somebody else is a good grace this is to do a study notes or more
Common MVC Framework Comparisons
Performance on the run:Jsp+servlet>struts1>spring mvc>struts2+freemarker>>struts2,ognl, value stack.The develo
invisible attribute and return it. Another method is to accept a model and add any number of model attributes. You can select a style based on your needs. @ ModelAttribute acts on the method parameter. When @ ModelAttribute acts on the method parameter, it indicates that this parameter can be retrieved in the method model. If this parameter is not in the current model, it is first instantiated and then added to the model. Once this parameter is included in the model, the field of this parameter
Springmvc is in Spring on the basis of the architecture. the big thing about Spring is that the bean definition in XML is transformed into a container Beandefinition, and then instantiate it for use by the user. of our Web of the program Spring Container is : Org.springframework.web.context.support.XmlWebApplicationC
Idea creates a MAVEN-based spring framework
Recently, using idea, I found out that idea has assembled many templates, so you can create a maven-based spring MVC framework with just a few choices.
Preparatory work:
1. Installation: Idea, MAVEN, JDK, Tomcat
2, Idea configuration Jdk,maven,tomcat, please refer to my other articles, configuration, please ignore,
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.