sqlite优化
This commit is contained in:
@@ -89,7 +89,6 @@ public class JdbcTemplate {
|
||||
public <T> T query(Class<T> clazz, String sql, Object ...params) throws SQLException {
|
||||
T res = null;
|
||||
Connection conn = null;
|
||||
|
||||
try {
|
||||
conn = dataSourceHolder.getConnection();
|
||||
res = jdbcOperations.executeQuery(conn, clazz,sql, params);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
NODE_ENV: '"development"',
|
||||
ENV_CONFIG: '"dev"',
|
||||
BASE_API: '"http://192.168.0.106:8080"'
|
||||
BASE_API: '"http://localhost:8080"'
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>3.7.2</version>
|
||||
<version>3.39.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
|
||||
+3
-3
@@ -21,10 +21,10 @@
|
||||
*/
|
||||
package fun.asgc.neutrino.proxy.server.base.rest.config;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import fun.asgc.neutrino.core.annotation.*;
|
||||
import fun.asgc.neutrino.core.base.Ordered;
|
||||
import fun.asgc.neutrino.core.db.template.JdbcTemplate;
|
||||
import org.sqlite.SQLiteDataSource;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -41,9 +41,9 @@ public class SystemConfiguration {
|
||||
|
||||
@Bean
|
||||
public DataSource dataSource() {
|
||||
DruidDataSource dataSource = new DruidDataSource();
|
||||
SQLiteDataSource dataSource = new SQLiteDataSource();
|
||||
dataSource.setUrl(sqliteConfig.getUrl());
|
||||
dataSource.setDriverClassName(sqliteConfig.getDriverClass());
|
||||
dataSource.setJournalMode("WAL");
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user