Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Restful service development method and device based on SSM framework

A framework and service layer technology, applied in the field of network service development and design, can solve problems such as inconsistent code structure, time-consuming, configuration files cannot take effect, etc.

Pending Publication Date: 2021-05-04
GUANGDONG GUANGYU SCI & TECH DEV
View PDF0 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The SSM framework development technology basically meets the requirements of Restful service development, but there are also problems of insufficient encapsulation in use. For example: 1. There are many plug-ins in Spring, and there are different plug-ins to choose from for the same function implementation. Therefore, when selecting When plugging in, it is necessary to learn the functions, performance, advantages and disadvantages, and usage methods of the plug-in. This undoubtedly requires programmers to spend a lot of time searching related documents and packaging related codes; 2. Spring configuration items may vary from version to version , the same configuration file may not take effect in different projects, and this problem is difficult to find; 3. The advantage of Mybatis lies in the flexible and high-performance sql statement, but the disadvantage is also obvious, that is, it does not support arbitrary Switching databases has poor portability; 4. For the MVC three-tier system, the control layer, service layer, and persistence layer codes can be written more freely. This is an advantage, but it is also a disadvantage. Basically, every programmer writes Code structure may be inconsistent
This will cause difficulties in the later maintenance of the system; 5. The lack of common toolkits in the framework cannot meet the development needs of application services, and they need to choose third-party tool libraries
6. Lack of code generation function. Although Mybatis can automatically generate code for the model and persistence layer, it lacks code for generating the control layer and persistence layer, ignoring business logic. The code structure of the two layers should be consistent. If you manually write the relevant code Time-consuming; 7. Lack of common management modules, such as user information, role permissions, system menus, user logs, file information, data dictionaries, user authentication, etc. Each new project needs to be redeveloped

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Restful service development method and device based on SSM framework
  • Restful service development method and device based on SSM framework
  • Restful service development method and device based on SSM framework

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0054] Such as figure 1 As shown, the present invention provides a Restful service development device based on the SSM framework, including: a basic module, a tool module, a code generation module and a general module;

[0055] Among them, the basic module defines the communication protocol, communication format, data verification, exception handling, basic control implementation class, basic service interface and implementation class, and implements the call logic between the control layer, service layer, and persistence layer, as well as data models and functions. Correspondence between modules.

[0056] In this embodiment, there is a one-to-one correspondence between data models and functional modules, that is, one data model corresponds to one functional module, and one functional module includes N functions. These correspondences are specified in the implementation of the control layer, service layer, and persistence layer, that is, one data model implements one control ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a Restful service development method and device based on an SSM framework. The method comprises the steps of communication protocol and format definition, data verification, exception handling, basic control implementation class, basic service interface and implementation class, implementation of calling logic among a control layer, a service layer and a persistent layer, and a corresponding relation between a data model and a function module; packaging data and tools; defining a template file of the target code file, generating a code file according to the template file, and generating a data model and a persistent layer code, wherein according to the basic module, the tool module and the code generation module, function management is achieved, codes of a configuration file, a data model and a persistent layer and codes of a service layer and a control layer are automatically generated, basic data verification is added to a data model field, and query conditions of the service layer are modified; and respectively modifying interfaces of corresponding function management according to different requirements of each function management. The development and maintenance efficiency of the application service is improved, and the development threshold of the application service is reduced.

Description

technical field [0001] The invention relates to the technical field of network service development and design, in particular to a method and device for developing a Restful service based on an SSM framework. Background technique [0002] With the development of business, software systems become more and more complex, and the business in different fields involves a lot of knowledge, content, and problems. If you develop from scratch every time, it will be a very long process, and you may not be able to do it well. Therefore, using frameworks for extremely fast development is an extremely common solution in software development. [0003] The SSM (Spring+SpringMVC+MyBatis) framework set is composed of two open source frameworks, Spring and MyBatis, and is often used as a framework for web projects with relatively simple data sources. Using the SSM framework to develop web applications, the core of Spring is Control Inversion IOC (Inversion of Control) and Aspect Oriented Prog...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/20G06F8/36G06F9/445
CPCG06F8/24G06F8/36G06F9/44526
Inventor 庄广壬陈建生冼永乐植挺生刘勇
Owner GUANGDONG GUANGYU SCI & TECH DEV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products