Spring Boot+JPA+Mysql+ThymeLeaf快速构建CURD系统(一)Spring Boot介绍

说起搭建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 requirements start to diverge from the defaults. 
Provide a range of non-functional features that are common to large classes of projects (e.g. embedded servers, security, metrics, health checks, externalized configuration). 
Absolutely no code generation and no requirement for XML configuration.

翻译过来,大概意思是:

Spring Boot 让你更容易的构建单独的,基于Spring的,产品级的,可以直接run的应用。我们已经固话了很多配置。大部分Spring Boot的应用只需要很少的配置。

你能够创建一个Java应用,这个应用可是使用 java -jar来启动异或者使用传统的war包部署方式。我们也提供一个命令行工具来运行“spring scripts”。

我们的主要目标有:

为所有的Spring开发提供一个快速以及容易理解的快速构建方法 
通过默认配置快速构建。 
提供广泛的非业务特性,这些特性对很多项目都适用(比如:嵌入式服务,安全,度量, 健康检查,外部配置等)。 
没有代码自动生成以及XML配置的需求。

听着还是很不错的对不,下面我就动手开发一个最基本的CURD系统,并让其正确工作,以此来摸清Spring Boot的使用和特点。该系统实现一个简单通信录,可以实现增加/删除/修改/查询(CURD)联系人,后台数据库采用MySQL,前端使用ThemeLeaf技术,DAO层使用 Spring JPA和hibernate的组合。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值