Giter Site home page Giter Site logo

ligzy / springboot-bootstrap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hui113025/springboot-bootstrap

0.0 0.0 0.0 28.23 MB

springboot-bootstrap 后台管理系统

TSQL 0.34% Java 1.89% JavaScript 31.15% CSS 9.40% HTML 54.72% PHP 1.07% PowerShell 0.01% CoffeeScript 1.11% Makefile 0.01% Python 0.24% Go 0.04% Shell 0.01% FreeMarker 0.02%

springboot-bootstrap's Introduction

springcloud-config

如何运行

请使用mvn:spring-boot:run命令运行,不要使用main()方法运行,否则对静态资源修及模板文件的修改不会立即生效,影响开发效率。

开发规范

  1. 尽量精简项目大小,不要随便添加类和造轮子,需要工具类的话首先从apache-commons-*和guava中找,那里面的工具类基本满足本项目90%开发需求。
  2. Java代码风格保持统一,可以参考阿里巴巴Java开发手册(正式版)
  3. 类与方法不应该过大,如果方法内代码行数过多应拆分并重构该方法,如果类内方法过多应拆分并重构该类,以便复用及减少重复代码
  4. Model对象不允许添加任何与其对应数据表无关的成员变量(字段),如果需要添加的话请在com.module.product.common.dto下创建相应的DTO,如StudentDto
  5. 单表查询可不用写SQL,直接使用通用MapperCondition对象以编程方式完成,连表查询必须在对应的XML中编写SQL。无论使用哪种方式,请考虑SQL的性能,至少做到用到什么字段查什么字段,严禁无脑 select *
  6. 通常情况下不要自行处理异常,遇到业务异常应创建com.module.core.exception.ServiceException并抛出交由异常处理器统一处理。 注意,ServiceException内的message会作为返回JSON的消息部分,请根据业务认真填写,有的甚至直接作为文案显示,比如throw new ServiceException("验证码不正确");)。
  7. js、css、html、jsp、properties、xml等文件名称包含多单词时必需用分次符(-)拼接,如user-center.html、user-center.js,HTML内元素id、attribute命名也应遵守该命名约定,如<button id="btn-create-order"></button>

开发流程

  1. 克隆项目至IDE并切换至dev分支
  2. 使用com.module.product.CodeGenerator代码生成工具生成对应数据表(Model)的基础代码。
  3. 创建对应的jsp、js文件。

框架&文档

  • 以上架构克隆同事,作为种子项目
  • Spring Boot(文档)
  • Thymeleaf(文档)
  • MyBaits(文档)
  • MyBaits通用Mapper、分页插件(文档)

springboot-bootstrap's People

Contributors

hui113025 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.