xinput-springboot-base

springboot的一个基本封装

License

License

GroupId

GroupId

com.github.xinput123
ArtifactId

ArtifactId

xinput-springboot-base
Last Version

Last Version

0.1.4
Release Date

Release Date

Type

Type

jar
Description

Description

xinput-springboot-base
springboot的一个基本封装
Project URL

Project URL

https://github.com/xinput123/xinput-springboot-base
Source Code Management

Source Code Management

https://github.com/xinput123/xinput-springboot-base

Download xinput-springboot-base

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.xinput123/xinput-springboot-base/ -->
<dependency>
    <groupId>com.github.xinput123</groupId>
    <artifactId>xinput-springboot-base</artifactId>
    <version>0.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.xinput123/xinput-springboot-base/
implementation 'com.github.xinput123:xinput-springboot-base:0.1.4'
// https://jarcasting.com/artifacts/com.github.xinput123/xinput-springboot-base/
implementation ("com.github.xinput123:xinput-springboot-base:0.1.4")
'com.github.xinput123:xinput-springboot-base:jar:0.1.4'
<dependency org="com.github.xinput123" name="xinput-springboot-base" rev="0.1.4">
  <artifact name="xinput-springboot-base" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.xinput123', module='xinput-springboot-base', version='0.1.4')
)
libraryDependencies += "com.github.xinput123" % "xinput-springboot-base" % "0.1.4"
[com.github.xinput123/xinput-springboot-base "0.1.4"]

Dependencies

compile (11)

Group / Artifact Type Version
com.github.xinput123 : bleach jar 0.1.2
org.springframework.boot : spring-boot-starter-web jar
org.springframework.boot : spring-boot-starter-websocket jar
org.springframework.boot : spring-boot-starter-jdbc jar
mysql : mysql-connector-java jar
org.springframework.boot : spring-boot-starter-data-mongodb jar
com.github.ulisesbocchio : jasypt-spring-boot jar 3.0.3
com.baomidou : mybatis-plus-boot-starter jar 3.3.2
org.springframework.boot : spring-boot-starter-log4j2 jar
org.apache.logging.log4j : log4j-web jar 2.11.1
com.auth0 : java-jwt jar 3.10.3

test (1)

Group / Artifact Type Version
junit : junit jar

Project Modules

There are no modules declared in this project.

xinput-springboot-base

xinput-springboot-base 是一个对springboot的简单封装,主要是参考play框架的做法去封装的

使用

<dependency>
    <groupId>com.github.xinput123</groupId>
    <artifactId>xinput-springboot-base</artifactId>
    <version>0.1.3</version>
</dependency>

在resource目录下创建 system.properties 文件

属性 描述
api.cookie.token 自定义Cookie中token对应的key值,默认是jwt,该值暂时无用了
api.secret.key 自定义生成Token时的key,默认为xinput-boot
api.secure.enable 自定义是否开启全局Token验证,dev环境不验证
token.exp token过期时间,默认360024
refresh.token.exp token刷新时间,默认3600247
mock.userId 默认用户Id
mock.userName 默认用户名称
bucket.access.key 对象存储ak
bucket.access.secret 对象存储sk
wechat.appid 微信小程序appid
wechat.secret 微信小程序sk
limit.default 默认一次取多少条数据,默认 10
limit.max 自定义一次最多取多少条数据,默认 50
offset.max 自定义最大偏移量,默认 1000000
http.idle.monitor 是否开启http池回收,默认false

在resource目录下创建 redis.properties 配置文件

# redis config
redis.mode=single
redis.master=redis
redis.sentinels=localhost:6379
redis.timeout=5000
redis.ip=localhost
redis.port=6379
redis.pool.maxActive=200
redis.pool.maxIdle=60
redis.pool.minIdle=10
redis.pool.maxWait=10000
redis.pool.testOnBorrow=true
redis.pool.testOnReturn=true
redis.pool.testWhileIdle=true
redis.pool.whenExhaustedAction=WHEN_EXHAUSTED_GROW
redis.pool.timeBetweenEvictionRunsMillis=60000
redis.pool.numTestsPerEvictionRun=3
redis.pool.minEvictableIdleTimeMillis=60000
redis.pool.lifo=false
redis.ips=localhost

Versions

Version
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.2
0.0.1