Framework by springboot to simplify 80% of code

Keywords: Java Database SpringBoot Oracle Docker

Catalog

Open Source Location

springboot does many default encapsulations based on spring and mvc.The benefits of doing so greatly facilitate developer productivity.Although each of us still needs some of our own scaffolding.Convenient for us to build projects in seconds.This project is based on the secondary starting point of the enterprise specification setup.

Project introduction

A system framework based on Spring + SpringMVC + Mybatis Agile Development.zxhtom is currently a schema for encapsulation on the management side.The built-in pages are also designed for easy management and development.However, there are separate schemes on the architecture.All the designs of the sub-architecture are coupled with the idea of separation.The shiro-service module can be used for single sign-on.It's just that he's not just a single sign-on feature in the architecture.His role is as a module of third-party services.It can publish the interfaces in the system to third parties by annotating them.It is the currently launched business functions such as Alipay and WeChat.Now that it's an architectural vision, you have to go further.In case it does.

In addition, the architecture provides modules for data auto-generation, timed tasks, system monitoring, user management, log management, and so on.Technical points include redis cluster and single machine, Authentication Code function, dual data source, interface specification, swagger, druid, websocket, and so on.

The configuration of the project is simplified through secondary scaffolding.Only need to be introduced

<dependencies>
    <dependency>
        <groupId>com.github.zxhTom</groupId>
        <artifactId>framework-root</artifactId>
        <version>${framework.version}</version>
        <type>POM</type>
        <scope>IMPORT</scope>
    </dependency>
    <dependency>
        <groupId>com.github.zxhTom</groupId>
        <artifactId>framework-core</artifactId>
        <version>${framework.version}</version>
    </dependency>
</dependencies>

These two jar s.Then set up the springboot startup class in the project.You need to add a sweep annotation on the startup class here.The package path must contain at least com.zxhtom.because my scaffolding was developed under the com.zxhtom package.

Other detailed configurations are configured in application.yml.Here zxhtom provides a configuration template (application_back.yml in the framework-core module)
The instructions in the configuration.Detailed documentation will be provided later.

Environment Setup

development tool

  • idea development code
  • navicat Operational Database
  • git management code
  • nginx Configuration Reverse Proxy
  • powerdesigner design database and reverse management
  • tomcat service publishing
  • plsql operates on oracle Database
  • Google Browser

development environment

  • JDK8+
  • Mysql5.7+
  • Redis
  • RabbitMQ
  • Zookeeper
  • Dubbo-admin
  • Dubbo-monitor
  • Tomcat8+
  • Oracle12+
  • Nginx

Tool Installation

  • There are cracks in idea about installation, so you can consult with the group here.Other services are installed with docker.A little buddy in need can trust me privately.The docker manual will be sorted out as appropriate.Subsequent projects will also be published as dockers and uploaded to the maven central repository

ps: Some jar packages used in the project have not been updated in the central warehouse for various reasons.So this is to ensure that the project can run normally.Run Reader's Manual Installation to Local Warehouse

jar download address (extract code: k1ne)
bottom Project Online clone Address
As for the manual installation to the local warehouse command MVN install:install-file-Dfile={Path/to/your/ojdbc.jar} -DgroupId=com.oracle-DartifactId=ojdbc6-Dversion=11.2.0-Dpackaging=jar

system architecture

Start Project

package com.zxhtom;

import com.zxhtom.config.CoreConfig;
import com.zxhtom.config.QuickStartConfig;
import com.zxhtom.config.SpringfoxConfig;
import com.zxhtom.config.WebMvcConfig;
import com.zxhtom.framework_task.conf.TaskConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

/**
 * Entry class, scan and inject other configuration classes and services
 */
@SpringBootApplication
@EnableCaching
@ComponentScan("com.zxhtom")
@Import({QuickStartConfig.class,CoreConfig.class,TaskConfig.class,WebMvcConfig.class,SpringfoxConfig.class})
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}














Open Source Location

Posted by hrosas on Sun, 18 Aug 2019 19:56:50 -0700