Spring Oxygen
📦 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:
✅ oxygen-flysql
-
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();
}
}
✅ oxygen-wechatgo
-
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
}
}
✅ oxygen-freecode
-
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
📂 moudle
📄 userTableController
📄 userTableEntity
📄 userTableRepository
📄 userTableService