whyisma / spring-oxygen

πŸ¦„ Spring rapid development integration framework.

Home Page:https://ispong.gitee.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spring-oxygen

Spring Oxygen

Spring rapid development integration framework.

Status Version Maven Central GitHub last commit GitHub

Github watch Github star Github follow

πŸ“¦ Installation

Maven

<dependency>
  <groupId>com.github.ispong</groupId>
  <artifactId>spring-oxygen-boot-starter</artifactId>
  <version>1.0.0</version>
</dependency>

Gradle

implementation 'com.github.ispong:spring-oxygen-boot-starter:1.0.0'

πŸ”¨ Start Up

import com.ispong.oxygen.annotation.EnableOxygen;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableOxygen
public class AppConfig {

}

πŸ“„ Documentation

You can find the spring-oxygen documentation on the website.

Modules

There are a number of modules in spring-oxygen, here is a quick overview:

  • Integrate spring jdbc rapid development

  • Example

import org.springframework.stereotype.Repository;
import com.ispong.oxygen.flysql.core.Flysql;
import com.ispong.oxygen.flysql.pojo.enums.OrderType;

@Repository
public class UserDao {

    public List<UserEntity> queryUser() {

        return Flysql.select(UserEntity.class)
                .select("userName", "sex", "account", "age")
                .eq("userName", "ispong")
                .between("point", 100, 200)
                .gt("age", "18")
                .like("sex", "M")
                .in("userPower", "ADMIN", "USER", "MANAGER")
                .orderBy("userIndex", OrderType.DESC)
                .query();
    }
}
  • Integrate WeChat platform rapid development

  • Example

oxygen:
  wechatgo:
    app-id: xxxxx # appId
    app-secret: xxxxx # appSecret
    token: xxxxx # custom server token
import com.ispong.oxygen.wechatgo.handler.WechatgoEventHandler;
import com.ispong.oxygen.wechatgo.pojo.entity.WeChatEventBody;
import org.springframework.stereotype.Service;

@Service
public class WechatgoService implements WechatgoEventHandler {

    @Override
    public void subscribeEvent(WeChatEventBody weChatEventBody) {

        // do subscribe event
    }
}
  • Fast generate java code

  • Example

oxygen:
  freecode:
    author: ispong
    version: 0.0.2
    module-path: com.ispong.app.module
GET http://localhost:8080/freecode/generate?tableName=user_table
πŸ“‚ com
    πŸ“‚ ispong
        πŸ“‚ app
            πŸ“‚ module
                πŸ“„ userTableController
                πŸ“„ userTableEntity
                πŸ“„ userTableRepository
                πŸ“„ userTableService

Thanks for free JetBrains Open Source license

jetbrains

About

πŸ¦„ Spring rapid development integration framework.

https://ispong.gitee.io

License:Apache License 2.0


Languages

Language:Java 97.9%Language:FreeMarker 2.1%