Spring Boot Learning Tutorial: Beginning the First Spring Boot Application

This article is originally written by the author. Please indicate the source for reprinting. SummarySpring Boot can easily create independent production-level Spring-based applications. It follows the principle of "convention is greater than configuration", uses the least configuration, and automates everything as much as possible, ma ...

Posted by matthew_ellis24 on Tue, 07 May 2019 08:35:04 +0200

Eliminate if-else/switch-case in code

In many cases, there will be many branches in our code, and the code below the branches has some complex logic, I believe that many people like to use if-else/switch-case to achieve. If you don't do well, you will put the implementation code directly under the branch of if-else/switch-case: switch ( type ) { case case1: ... ...

Posted by mightymouse on Tue, 07 May 2019 07:35:04 +0200

SpringBoot Actual Warfare | Unified Handling of Exceptions

Wechat Public Number: An Excellent Abandoned PersonIf you have any questions or suggestions, please leave a message in the background. I will try my best to solve your problems. Preface For example, today we introduce how SpringBoot handles global exceptions in a unified way. The two main annotations for global exception handling in SpringBoot ...

Posted by niwa3836 on Mon, 06 May 2019 16:45:04 +0200

When configuring relational mapping in 3.2, the table names are different from those in 3.1.

Chapter 3.2 describes the mapping relationship of the corresponding classes according to the steps in the book. It is found that at startup, all the tables previously built in Chapter 3.1 were deleted and re-established, and the data of Ingredient table was lost. Because of the use of JPA, hibernate was used by default, all tables were deleted ...

Posted by axiom82 on Mon, 06 May 2019 04:50:03 +0200

SpringMVC Tutorial 2 [Processing Response Requests]

1. Basic operations 1. How to respond to requests Not responding | void+@ResponseBody comment | ModelAndView | via setViewName method | Specify Response Page Directly| Return value is of type String, Return result specifies jump address| Redirect|prefix the jump address with redirect:prefix is sufficient| Both variables are declared in the Http ...

Posted by redhair on Sun, 05 May 2019 18:32:04 +0200