diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java
index be20a695..66a60b95 100644
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/RoleMapper.java
@@ -11,12 +11,12 @@ import java.util.List;
@Repository
public interface RoleMapper {
- @Insert("INSERT INTO role (name, authority, createTime, updateTime) VALUES" +
+ @Insert("INSERT INTO user_role (name, authority, createTime, updateTime) VALUES" +
"('${name}', '${authority}', '${createTime}', '${updateTime}')")
int add(Role role);
@Update(value = {" "})
int update(Role role);
- @Delete("DELETE FROM role WHERE id != 1 and id=#{id}")
+ @Delete("DELETE FROM user_role WHERE id != 1 and id=#{id}")
int delete(int id);
- @Select("select * FROM role WHERE id=#{id}")
+ @Select("select * FROM user_role WHERE id=#{id}")
Role selectById(int id);
- @Select("select * FROM role")
+ @Select("select * FROM user_role")
List selectAll();
}
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 7829ca45..1051d967 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -19,23 +19,12 @@ spring:
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
datasource:
# 使用mysql 打开23-28行注释, 删除29-36行
- # name: wvp
- # url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
- # username:
- # password:
- # type: com.alibaba.druid.pool.DruidDataSource
- # driver-class-name: com.mysql.cj.jdbc.Driver
- name: eiot
- url: jdbc:sqlite::resource:wvp.sqlite
+ name: wvp
+ url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
username:
password:
type: com.alibaba.druid.pool.DruidDataSource
- driver-class-name: org.sqlite.JDBC
- journal_mode: WAL
- synchronous: NORMAL
- transaction_mode: IMMEDIATE
- max-active: 1
- min-idle: 1
+ driver-class-name: com.mysql.cj.jdbc.Driver
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
server:
diff --git a/src/main/resources/application-docker.yml b/src/main/resources/application-docker.yml
index 56efb463..2f6992fe 100644
--- a/src/main/resources/application-docker.yml
+++ b/src/main/resources/application-docker.yml
@@ -19,23 +19,12 @@ spring:
# [可选] jdbc数据库配置, 项目使用sqlite作为数据库,一般不需要配置
datasource:
# 使用mysql 打开23-28行注释, 删除29-36行
- # name: wvp
- # url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
- # username:
- # password:
- # type: com.alibaba.druid.pool.DruidDataSource
- # driver-class-name: com.mysql.cj.jdbc.Driver
- name: eiot
- url: jdbc:sqlite::resource:wvp.sqlite
- username:
- password:
- type: com.alibaba.druid.pool.DruidDataSource
- driver-class-name: org.sqlite.JDBC
- journal_mode: WAL
- synchronous: NORMAL
- transaction_mode: IMMEDIATE
- max-active: 1
- min-idle: 1
+ name: wvp
+ url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&allowMultiQueries=true
+ username: root
+ password: root
+ type: com.alibaba.druid.pool.DruidDataSource
+ driver-class-name: com.mysql.cj.jdbc.Driver
# [可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口
server:
diff --git a/src/main/resources/wvp.sqlite b/src/main/resources/wvp.sqlite
deleted file mode 100644
index b317a623..00000000
Binary files a/src/main/resources/wvp.sqlite and /dev/null differ