springboot优缺点:
1.快速构建项目
2.对主流开发框架的无配置集成
3.项目可独立运行,无须外部依赖Servlet容器
4.提高了开发效率
缺点:
相关书籍文档较少且不够深入
SpringBoot+jsp整合
1.导入jar包依赖.
<!-- 如果添加parent,那么表示将引入springboot相关的jar --> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.2.RELEASE</version> </parent> <dependencies> <!-- spring web mvc:core --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.3.7.RELEASE</version> </dependency> <!-- springboot对于web的支持 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- tomcat 的支持. --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <!-- jsp支持模块 --> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <scope>provided</scope> </dependency> <!-- jstl的支持 --> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency> </dependencies> |
2.编写controller
3.编写启动类
4.编写jsp文件
5.配置前缀跟后缀
6.测试