Spring Boot Integration
Additional Dependencies¶
The Spring Web dependency does not bring in support for traditional Spring MVC with .jsp files.
To get this functionality we need to add three additional dependencies to our build.gradle file.
implementation 'javax.servlet:jstl:1.2'
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
Controller and DAO Files¶
Nothing will change in regards to creating Controller or DAO files.
Each type should have its own package, com.example.bootmvc.controllers and com.example.bootmvc.data, respectively.
Drill¶
- Add the two JSP dependencies above to the
dependenciesblock in the BootMVCVideoStore/build.gradle and do a Gradle refresh.- Under the src/main folder, create the new Folder webapp/WEB-INF. NOTE: this is not a src folder
- Create
com.example.bootmvc.controllersandcom.example.bootmvc.datapackages.