I'm Matsushita from Dream Hanks. This time, I will explain the procedure for creating a project for the Spring-MVC framework.
In this web application development, MyBatis is used as the DB access framework.
Summary of serialized articles
Prepare the following items. ・ Eclipse2020 ・ Jdk: 1.8 ・ Tomcat: 8.5 ・ Mysql: 8. ・ A5SQL
The following can be downloaded from eclipse → help → marketplace ・ Spring4 ・ Spring Tools 3 Add-On for Spring Tools 4
① Select a new project
② Search with Spring → Select "Spring Legacy Project" → Next
Why did you choose "Spring Legacy Project"?
Legacy projects may have to be set up by yourself compared to Boot. You can learn more about the Spring framework by configuring it yourself.
In particular, the following points are significantly different from Spring Boot. -You have to set pom.xml, root-context.xml, servlet-context.xml ・ You have to prepare tomcat yourself.
③ Set the project name ④ Set "Spring MVC Project" for the template → Next
Why did you choose "Spring MVC Project" as the template?
First of all, the template is the file structure of the project as shown in the image below. By selecting "pring MVC Project", you can create a file structure that is specific to the Spring MVC model to some extent. We will prepare eclipse for easy development.
⑤ Set the top level directory of the package Example "com.dreamhanks.workmanager] com.dreamhanks → Set the top level directory name workmanager → Set the app name you want to create
Next time, I will explain how to link Spring, MySql, and MyBatis. [2nd] How to link Spring, MySql and MyBatis
Thank you for reading.
Recommended Posts