mirror of
https://gitee.com/incloudcode/yexuejc-springboot.git
synced 2025-12-16 14:44:16 +08:00
2.x 合并到master(方便后续分支)
This commit is contained in:
@@ -13,14 +13,16 @@
|
||||
https://gitee.com/incloudcode/yexuejc-springboot使用例子
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<yexuejc-springboot.version>${parent.version}</yexuejc-springboot.version>
|
||||
</properties>
|
||||
|
||||
<parent>
|
||||
<groupId>com.yexuejc.springboot</groupId>
|
||||
<artifactId>yexuejc-springboot-parent</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<version>2.1.3</version>
|
||||
</parent>
|
||||
<properties>
|
||||
<yexuejc.base.version>1.3.9</yexuejc.base.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!--base 引用-->
|
||||
<dependency>
|
||||
@@ -32,7 +34,6 @@
|
||||
<dependency>
|
||||
<groupId>top.yexuejc</groupId>
|
||||
<artifactId>yexuejc-base</artifactId>
|
||||
<version>${yexuejc.base.version}</version>
|
||||
</dependency>
|
||||
<!-- 使用springMVC -->
|
||||
<dependency>
|
||||
@@ -47,7 +48,7 @@
|
||||
<!-- JJWT -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<artifactId>jjwt-api</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<!-- 使用Redis -->
|
||||
@@ -80,13 +81,6 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>yexuejc-nexus-public</id>
|
||||
<name>yexuejc-nexus-public</name>
|
||||
<url>https://nexus.yexuejc.club/repository/maven-public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.example.demo.mapper.handler.JsonTypeHandler;
|
||||
import com.yexuejc.base.util.JsonUtil;
|
||||
import com.yexuejc.springboot.base.security.inte.User;
|
||||
|
||||
@@ -27,7 +28,7 @@ public class Consumer extends Model<Consumer> implements User {
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableId(value = "consumer_id", type = IdType.UUID)
|
||||
@TableId(value = "consumer_id", type = IdType.ASSIGN_UUID)
|
||||
private String consumerId;
|
||||
/**
|
||||
* 手机号
|
||||
@@ -92,7 +93,7 @@ public class Consumer extends Model<Consumer> implements User {
|
||||
/**
|
||||
* 角色、权限
|
||||
*/
|
||||
@TableField(value = "roles", el = "roles,typeHandler=com.yexuejc.guansc.core.mybatis.handler.JsonTypeHandler")
|
||||
@TableField(value = "roles", typeHandler = JsonTypeHandler.class)
|
||||
private List<String> roles;
|
||||
/**
|
||||
* 支付密码
|
||||
@@ -157,19 +158,16 @@ public class Consumer extends Model<Consumer> implements User {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Consumer setEnable(boolean enable) {
|
||||
this.enable = enable;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Consumer setNonExpire(boolean nonExpire) {
|
||||
this.nonExpire = nonExpire;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Consumer setNonLock(boolean nonLock) {
|
||||
this.nonLock = nonLock;
|
||||
return this;
|
||||
@@ -275,7 +273,7 @@ public class Consumer extends Model<Consumer> implements User {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
public Serializable pkVal() {
|
||||
return this.consumerId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
server.port=8545
|
||||
logging.level.root=info
|
||||
|
||||
#========================================================================================================================
|
||||
@@ -27,9 +28,9 @@ yexuejc.redis.db1=true
|
||||
spring.redis.jedis.pool.max-active=100
|
||||
spring.redis.jedis.pool.max-idle=10
|
||||
spring.redis.jedis.pool.min-idle=3
|
||||
spring.redis.host=121.42.165.89
|
||||
spring.redis.password=
|
||||
spring.redis.port=16379
|
||||
spring.redis.host=192.168.0.107
|
||||
spring.redis.password=yexuejc2022
|
||||
spring.redis.port=6379
|
||||
|
||||
|
||||
#db
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.example.demo;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class DemoApplicationTests {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>com.yexuejc.springboot</groupId>
|
||||
<artifactId>yexuejc-springboot-parent</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<version>2.1.3</version>
|
||||
</parent>
|
||||
<groupId>top.yexuejc</groupId>
|
||||
<artifactId>yexuejc-springboot-simple</artifactId>
|
||||
@@ -14,14 +14,13 @@
|
||||
<description>测试工程</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<yexuejc-springboot.version>${parent.version}</yexuejc-springboot.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yexuejc.springboot</groupId>
|
||||
<artifactId>yexuejc-springboot-base</artifactId>
|
||||
<version>${parent.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package top.yexuejc.springboot.simple;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class YexuejcSpringbootSimpleApplicationTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user