tyboot 1.1.0 release, based on the rapid development of the scaffolding of Spring Boot

tyboot 1.1.0 

update content:

1. Upgrade swagger

2. The trigger event can be obtained to method names and parameters

3. Request the execution time of printing interceptor

4. unified user interface level type of assignment

The interceptor Extensible Authentication Interface

6. Request frequency limit to achieve a simple way to limit the fixed time window of the request frequency

7.bug repair

8. Database Script

9. Finishing sample project interfaces, front-end development to prepare for the next.

--------------------------------------

Feature

1. simplify the development process underlying business 
    a. For single-table queries, do not write sql. List, paging, do not write. 
    mapper b.dao layer just an empty interface, most businesses do not need to write any code (unless the complex report queries) in the mapper does not need xml file of mapper. 
    c.baseService a large number of generic method for using a single form object CRUD in the service layer does not need to write code, lists and pagination queries need only one line of code. 
    D. advocate single-table operation. Do not advocate the use of complex sql solve complex business problems. 
2. Reduce the cost of learning. Newcomers get started quickly, the basics of newcomers to cross the border, you can quickly enter the state of business development. 
3. Common components are integrated. redis, mq, events, mongodb etc. 
4. achieve common business model. Business model out of the box, it can greatly reduce the project development cycle. GM plans to achieve business model has 
  orders for systems, system virtual account, payment gateway, dynamic forms, reporting system, common reservation system, offers customized strategies, 
  basic data (verification code dictionaries, inside information, location information, the information stored in common file , and the operation record count) 
the third-party systems commonly integrated. SMS (Ali big fish), storage (seven cattle, Ali OSS), pay (micro-channel public platform, Alipay)

Project structure

tyboot 
  ├─tyboot-API 
  │ ├─tyboot-API-the Boot sample project, to achieve a data dictionary, rights management, other projects of common basic functions 
  ├─tyboot-component ------ Components 
  │ ├─tyboot-component- activemq ------ integrated ActiveMQ 
  │ ├─tyboot-Component-AMQP ---------- AMQP easy integration of spring 
  │ ├─tyboot-component-cache --------- cache, for further implementation and redis package, location, pipeline, zset implement paging queries, distributed lock 
  │ ├─tyboot-component-emq ----------- integrated mqtt service EMQ 
  │ ├─tyboot -component-event --------- use spring mechanism to achieve events based on event handling mechanism rest interface 
  │ ├─tyboot-component-mongo --------- integrated mongo 
  │ ├─tyboot- component-opendata ------ integrated with popular third-party open interfaces, seven cows, fish Ali, Tencent im, Aurora push 
  │ └─tyboot-component-validation ---- parameters check  
  ├─tyboot-core-- --------- core package, example project will generally refer to
  │ ├─tyboot-core- auth --------------- user authentication, session sharing
  │ ├─tyboot-core-foundation --------- libraries common tools, within the context of a thread package; Bean, File, transfer list tree structure, encryption and decryption and the like. . . . . 
  │ ├─tyboot-core-rdbms -------------- integrated mybatis, mybatisplus, simplifying packaging and servic orm General Procedure 
  │ └─tyboot-core-restful -------- ---- restful style of interface package, the integrated interface documents, uniform exception handling, request interceptor processing, and returns data encapsulation, encapsulation context 
  └─tyboot-prototype ------ common business model, the specific business scenario for encapsulation achieve 
      ├─tyboot-prototype-account ------ virtual account system 
      ├─tyboot-prototype-order -------- universal order system 
      └─tyboot-prototype-trade -------- simple payment channels to achieve, Alipay, micro letter

Directory conventions:

Example: 
tyboot-API-Privilege ---------------- following directory structure of the directory items agreed 
  	    org.typroject.api.privilege. 
  	                            Controller Interface directory ------- 
  	                            face. ------------ business layer 
  	                                Model VO -------- 
  	                                ORM .--------- data operation 
  	                                    dao ------ mapper interfaces directory 
  	                                    entity-- -po directory 
  	                                service ------ achieve business class

Promise

snake

1.entity BaseEntity need to inherit 
    the corresponding data table can not do without common fields 
 
     SEQUENCE_NBR bigint 20 primary physical key 
     REC_USER_ID varchar 32's last update ID 
     REC_DATE datetime Last update time 
     
2. Using a mybatisplus, it is not necessary to introduce the sample project mapper.xml, baseMapper the method sufficient. 
  Unless you want to perform complex queries can be introduced xml file yourself 
3. Under normal circumstances dao layer mapper interface is just a sub-empty interface, unless you want to write sql, xml or introduced, which will be written in the code.

service

1. inherited baseService
  public class LocationInfoService extends BaseService<LocationInfoModel,LocationInfo,LocationInfoMapper> 
  {}
The method 2.service not overloaded, as it will only according to the method name acquisition method instance through reflection. 
3. Sample project did not write the service layer interface implementation classes used directly operated. You need to decide on their own interfaces. Responsible for the design principles of design time business or to pay attention to. For simple operations, depending on the circumstances may be. 
4. The operation of the single form of the object may not need to write the methods in the service, no need to introduce Mapper, sufficiently generic method used, 
  the paging list of queries and query only one line of code, for example:
  • Paging:
        public Page<DictionarieModel> queryDictPage(Page page, String agencyCode ,
                                                       String buType,
                                                       String dictAlias,
                                                       @Condition(Operator.like) String dictName,
                                                       String dictCode) throws Exception
            {
                return this.queryForPage(page,"排序字段",false,agencyCode,buType,dictAlias,dictName,dictCode);
            }
      Needs and the corresponding model attribute name in the same name as a parameter query. 
      Params parameter list passed baseService.queryForPage the need methods and front (queryDictPage) parameters of the same order, 
      the underlying pre-analytical method for automatically parameter name and value of the empty judgment, and then converted to the database field names for building assembled condition device. 
      Notes @Condition used to define conditional operator, the conditional operator See Operator realized, all logic and relational query is 
      currently not planning to implement or relationships.         
  • List :( agreement with the same parameters Paging)
      public List<DictionarieModel> queryDictList(String agencyCode ,
                                                     String buType,
                                                     String dictAlias,
                                                      @Condition(Operator.like)String dictName,
                                                     String dictCode) throws Exception
          {
              return this.queryForList("排序字段",false,agencyCode,buType,dictAlias,dictName,dictCode);
          }

controller

1. unified return value, the return value unified for all interfaces ResponseModel package. 
2. custom annotation @TycloudOperation used to define the interface of the access level ApiLevel, authentication control needAuth 
3. You can set whether to return to the true state of http, or all of the return 200.

About Cache

1. Single Form object cache, cache a single table lists have been integrated into baseService method can be updated with the object refresh or delete the cache, you can view the notes to select the method to use. 
2. Other buffer scene directly rediTemplate recommended operating 
3.tyboot-component-cache module provides paging query based redis zset; and calculating location query; redis pipeline using

 

Guess you like

Origin www.oschina.net/news/108545/tyboot-1-1-0-released