说起搭建WEB服务,以前用的是SSH,构建一个WAR包后扔给容器,里面各种XML配置文件。对于长期项目来说,初始时这么搞一下倒不是什么问题,但有时候比如只需要做一个内部工具,业务逻辑非常简单,如果再这么去搞一套,可能搭建这套东西时间远大于写业务逻辑的时间。那么有没有什么框架可以简化这个过程?找了一圈,发现SpringBoot还不错。
先看看SpringBoot官网介绍:
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”. We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.
You can use Spring Boot to create Java applications that can be started using java -jar or more traditional war deployments. We also provide a command line tool that runs “spring scripts”.
Our primary goals are:
Provide a radically faster and widely accessible getting started experience for all Spring development.
Be opinionated out of the box, but get out of the way quickly as