Fetch the repository succeeded.
This action will force synchronization from xqnode/SpringBoot-Vue-Demo, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
https://www.bilibili.com/video/BV14y4y1M7Nc/
这是一个极其简单的前后端分离项目脚手架
前端:Vue,Vue-Router,Vuex,Axios,ElementUI
后台:SpringBoot,Mybatis-Plus(不用写sql,简单!)
后台:maven导入springboot工程,然后配置数据库,启动后台
前台:进入vue文件夹,执行命令:
npm install
npm run serve
即可启动前台vue工程
- 数据库的字段设计要以下划线分割,而不是驼峰,例如 可以使用 user_id 而不要使用 userId,字段设计的名称一定要规范
- 不要使用单个字母作为分割的一部分,例如:不要使用 u_id,而推荐你使用user_id
- 数据库多表关联查询推荐使用单独的VO来做扩展,尽量不要改动数据库映射的entity,比如你可以加一个类UserVO来扩充一些字段,而不是在User实体里面扩展
- 如果非要在User实体里面扩展,你需要加上 @TableField(exist=false) 来表示这个字段在数据库不存在,否则会报错
- 日期字段的格式化,需要使用 @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") 注解来做日期解析,可以参考Book实体里面的createTime字段
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。