diff --git a/pom.xml b/pom.xml
index 2eaaaed..2279c9b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,6 @@
1.8
- 1.3.2
@@ -34,6 +33,10 @@
org.springframework.boot
spring-boot-starter-aop
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
org.springframework.boot
spring-boot-starter-test
@@ -113,9 +116,25 @@
- org.mybatis.spring.boot
- mybatis-spring-boot-starter
- ${mybatis.starter.version}
+ com.h2database
+ h2
+ runtime
+
+
+
+ org.projectlombok
+ lombok
+
+
+ org
+ jaudiotagger
+ 2.0.3
+
+
+
+ com.mpatric
+ mp3agic
+ 0.9.1
diff --git a/src/main/java/im/zhaojun/common/enums/StorageTypeEnumTypeHandler.java b/src/main/java/im/zhaojun/common/enums/StorageTypeEnumTypeHandler.java
deleted file mode 100644
index 0b44cfb..0000000
--- a/src/main/java/im/zhaojun/common/enums/StorageTypeEnumTypeHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package im.zhaojun.common.enums;
-
-import org.apache.ibatis.type.BaseTypeHandler;
-import org.apache.ibatis.type.JdbcType;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-public class StorageTypeEnumTypeHandler extends BaseTypeHandler{
-
- public StorageTypeEnumTypeHandler(Class type) {
- if (type == null)
- throw new IllegalArgumentException("Type argument cannot be null");
- StorageTypeEnum[] enums = type.getEnumConstants();
- if (enums == null)
- throw new IllegalArgumentException(type.getSimpleName()
- + " does not represent an enum type.");
- }
-
- @Override
- public StorageTypeEnum getNullableResult(ResultSet rs, String columnName) throws SQLException {
- String i = rs.getString(columnName);
- if (rs.wasNull()) {
- return null;
- } else {
- return StorageTypeEnum.getEnum(i);
- }
- }
-
- @Override
- public StorageTypeEnum getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
- String i = rs.getString(columnIndex);
- if (rs.wasNull()) {
- return null;
- } else {
- return StorageTypeEnum.getEnum(i);
- }
- }
-
- @Override
- public StorageTypeEnum getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
- String i = cs.getString(columnIndex);
- if (cs.wasNull()) {
- return null;
- } else {
- return StorageTypeEnum.getEnum(i);
- }
- }
-
- @Override
- public void setNonNullParameter(PreparedStatement ps, int i, StorageTypeEnum parameter, JdbcType jdbcType)
- throws SQLException {
- ps.setString(i, parameter.getKey());
- }
-
-}
\ No newline at end of file
diff --git a/src/main/java/im/zhaojun/common/enums/ViewModeEnumTypeHandler.java b/src/main/java/im/zhaojun/common/enums/ViewModeEnumTypeHandler.java
deleted file mode 100644
index d17510c..0000000
--- a/src/main/java/im/zhaojun/common/enums/ViewModeEnumTypeHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package im.zhaojun.common.enums;
-
-import org.apache.ibatis.type.BaseTypeHandler;
-import org.apache.ibatis.type.JdbcType;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-
-public class ViewModeEnumTypeHandler extends BaseTypeHandler{
-
- public ViewModeEnumTypeHandler(Class type) {
- if (type == null)
- throw new IllegalArgumentException("Type argument cannot be null");
- ViewModeEnum[] enums = type.getEnumConstants();
- if (enums == null)
- throw new IllegalArgumentException(type.getSimpleName()
- + " does not represent an enum type.");
- }
-
- @Override
- public ViewModeEnum getNullableResult(ResultSet rs, String columnName) throws SQLException {
- String i = rs.getString(columnName);
- if (rs.wasNull()) {
- return null;
- } else {
- return ViewModeEnum.getEnum(i);
- }
- }
-
- @Override
- public ViewModeEnum getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
- String i = rs.getString(columnIndex);
- if (rs.wasNull()) {
- return null;
- } else {
- return ViewModeEnum.getEnum(i);
- }
- }
-
- @Override
- public ViewModeEnum getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
- String i = cs.getString(columnIndex);
- if (cs.wasNull()) {
- return null;
- } else {
- return ViewModeEnum.getEnum(i);
- }
- }
-
- @Override
- public void setNonNullParameter(PreparedStatement ps, int i, ViewModeEnum parameter, JdbcType jdbcType)
- throws SQLException {
- ps.setString(i, parameter.getValue());
-
- }
-
-}
\ No newline at end of file
diff --git a/src/main/java/im/zhaojun/common/mapper/StorageConfigMapper.java b/src/main/java/im/zhaojun/common/mapper/StorageConfigMapper.java
deleted file mode 100644
index dfa6ba5..0000000
--- a/src/main/java/im/zhaojun/common/mapper/StorageConfigMapper.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package im.zhaojun.common.mapper;
-
-import im.zhaojun.common.enums.StorageTypeEnum;
-import im.zhaojun.common.model.StorageConfig;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-
-@Mapper
-public interface StorageConfigMapper {
- int deleteByPrimaryKey(Integer id);
-
- int insert(StorageConfig record);
-
- int insertSelective(StorageConfig record);
-
- StorageConfig selectByPrimaryKey(Integer id);
-
- int updateByPrimaryKeySelective(StorageConfig record);
-
- int updateByPrimaryKey(StorageConfig record);
-
- List selectStorageConfigByType(StorageTypeEnum type);
-}
\ No newline at end of file
diff --git a/src/main/java/im/zhaojun/common/mapper/SystemConfigMapper.java b/src/main/java/im/zhaojun/common/mapper/SystemConfigMapper.java
deleted file mode 100644
index f898aab..0000000
--- a/src/main/java/im/zhaojun/common/mapper/SystemConfigMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package im.zhaojun.common.mapper;
-
-import im.zhaojun.common.model.SystemConfig;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface SystemConfigMapper {
-
- int insert(SystemConfig record);
-
- int updateByPrimaryKeySelective(SystemConfig record);
-
- int updateByPrimaryKey(SystemConfig record);
-
- SystemConfig selectFirstConfig();
-}
\ No newline at end of file
diff --git a/src/main/resources/mapper/StorageConfigMapper.xml b/src/main/resources/mapper/StorageConfigMapper.xml
deleted file mode 100644
index ebc6e41..0000000
--- a/src/main/resources/mapper/StorageConfigMapper.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- id, "type", "key", title, "value"
-
-
-
-
-
- delete from storage_config
- where id = #{id,jdbcType=INTEGER}
-
-
-
-
- insert into storage_config ("key", "type", title,
- "value")
- values (#{key,jdbcType=LONGVARCHAR}, #{type,jdbcType=LONGVARCHAR}, #{title,jdbcType=LONGVARCHAR},
- #{value,jdbcType=LONGVARCHAR})
-
-
-
-
- insert into storage_config
-
-
- "key",
-
-
- "type",
-
-
- title,
-
-
- "value",
-
-
-
-
- #{key,jdbcType=LONGVARCHAR},
-
-
- #{type,jdbcType=LONGVARCHAR},
-
-
- #{title,jdbcType=LONGVARCHAR},
-
-
- #{value,jdbcType=LONGVARCHAR},
-
-
-
-
-
-
- update storage_config
-
-
- "key" = #{key,jdbcType=LONGVARCHAR},
-
-
- "type" = #{type,jdbcType=LONGVARCHAR},
-
-
- title = #{title,jdbcType=LONGVARCHAR},
-
-
- "value" = #{value,jdbcType=LONGVARCHAR},
-
-
- where id = #{id,jdbcType=INTEGER}
-
-
-
-
- update storage_config
- set "key" = #{key,jdbcType=LONGVARCHAR},
- "type" = #{type,jdbcType=LONGVARCHAR},
- title = #{title,jdbcType=LONGVARCHAR},
- "value" = #{value,jdbcType=LONGVARCHAR}
- where id = #{id,jdbcType=INTEGER}
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/mapper/SystemConfigMapper.xml b/src/main/resources/mapper/SystemConfigMapper.xml
deleted file mode 100644
index e4bd338..0000000
--- a/src/main/resources/mapper/SystemConfigMapper.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- id, site_name, "mode", sidebarEnable, infoEnable, searchEnable, searchIgnoreCase, storageStrategy
-
-
-
- insert into system_config (site_name, "mode", sidebarEnable,
- infoEnable, searchEnable, searchIgnoreCase, storage_strategy, timeout
- )
- values (#{siteName,jdbcType=LONGVARCHAR}, #{mode,jdbcType=NUMERIC}, #{sidebarenable,jdbcType=NUMERIC},
- #{infoenable,jdbcType=NUMERIC}, #{searchenable,jdbcType=NUMERIC}, #{searchignorecase,jdbcType=NUMERIC},
- #{storageStrategy,jdbcType=LONGVARCHAR}
- )
-
-
-
- update system_config
-
-
- site_name = #{siteName,jdbcType=LONGVARCHAR},
-
-
- "mode" = #{mode,jdbcType=NUMERIC},
-
-
- sidebarEnable = #{sidebarEnable,jdbcType=NUMERIC},
-
-
- infoEnable = #{infoEnable,jdbcType=NUMERIC},
-
-
- searchEnable = #{searchEnable,jdbcType=NUMERIC},
-
-
- searchIgnoreCase = #{searchIgnoreCase,jdbcType=NUMERIC},
-
-
- storageStrategy = #{storageStrategy,jdbcType=LONGVARCHAR},
-
-
- where id = #{id,jdbcType=INTEGER}
-
-
-
- update system_config
- set site_name = #{siteName,jdbcType=LONGVARCHAR},
- "mode" = #{mode,jdbcType=NUMERIC},
- sidebarEnable = #{sidebarEnable,jdbcType=NUMERIC},
- infoEnable = #{infoEnable,jdbcType=NUMERIC},
- searchEnable = #{searchEnable,jdbcType=NUMERIC},
- searchIgnoreCase = #{searchIgnoreCase,jdbcType=NUMERIC},
- storageStrategy = #{storageStrategy,jdbcType=NUMERIC}
- where id = #{id,jdbcType=INTEGER}
-
-
-
-
\ No newline at end of file