2018-11-27 Upgraded to Spring 5.1 + Spring Boot 2.1!
For hands-on, bring your own laptop with the following preparations:
If you have any questions about preparation, please reply or DM to my account @suke_masa on Twitter and we will answer!
This is the material for the Spring overview lecture that will be used in the first 30 minutes. It is convenient to download it from the URL below so that you can refer to it later in hands-on. https://www.slideshare.net/masatoshitada7/pivotalspring-framework-51-spring-boot-21-jjugccc
We recommend a 64-bit OS with a memory of 4GB or more. The OS can be Windows / macOS / Linux.
brew install jq
.The database and application server use the built-in one (H2, Embedded Tomcat), so there is no need to install it.
Please clone from GitHub with the following command.
$ git clone https://github.com/MasatoshiTada/spring5-boot2-handson.git
(1) Start Eclipse. (2) Select [File]-[Import]. (3) Select [Maven]-[Existing Maven Project] and select [Next].
(4) Click the [Browse] button in the [Root Directory] and select the cloned [spring5-boot2-handson] folder.
(5) Make sure that all four projects [01-spring5], [02-spring5-answer], [03-boot2], and [04-boot2-answer] are displayed and checked, and then click [Finish]. ]Choose.
(6) The project import will start. It will take some time to download the library from Maven Central.
(1) Start IntelliJ IDEA and select [Import Project].
(2) Select the cloned [spring5-boot2-handson] folder.
(3) Select [Import project from external model]-[Maven] and select [Next].
(4) Check [Search for projects recursively] and select [Next].
If the following screen appears before the next (5), just select [Next]. Then, the screen of (5) is displayed.
(5) Make sure that all four projects [01-spring5], [02-spring5-answer], [03-boot2], and [04-boot2-answer] are displayed and checked, and then click [Next]. ]Choose.
If the above 4 projects are not displayed in the list, the folder selected in (2) may be incorrect.
(6) Select [Finish] as it is.
(7) The project import will start. It will take some time to download the library from Maven Central.
(1) 02-spring5-answer There is a main () method in the com.example.Main class of the project, so execute it.
For Eclipse, execute [Run As]-[Java Application].
(2) Check the console. If there is no stack trace etc. and "Information: Starting ProtocolHandler [" http-nio-8080 "]" is displayed at the end, the embedded Tomcat is starting correctly on port number 8080.
(3) Access http: // localhost: 8080 / sample / with a web browser. The login screen will be displayed. Please log in with your email address ʻ[email protected] and password ʻadmin
.
(4) If the customer information for 5 people is displayed as shown below, it is successful.
(5) Stop the main () method. This completes the preparation procedure.
(1) First, read through the slides.
(2) 01-spring5 / todo-1.md is the procedure of Exercise 1.
Recommended Posts