mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
Merge branch 'master' of 2276811600/pigx into dev
This commit is contained in:
commit
bf06eb9e5d
4 files changed
+14
-7
No files matched your search
+9
-1
@@ -30,6 +30,7 @@ import org.jasypt.encryption.StringEncryptor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
@@ -134,11 +135,18 @@ public class GenDatasourceConfServiceImpl extends ServiceImpl<GenDatasourceConfM
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkDataSource(GenDatasourceConf conf) {
|
||||
Connection connection =null;
|
||||
try {
|
||||
DriverManager.getConnection(conf.getUrl(),conf.getUsername(),conf.getPassword());
|
||||
connection = DriverManager.getConnection(conf.getUrl(), conf.getUsername(), conf.getPassword());
|
||||
} catch (SQLException e) {
|
||||
log.error("数据源配置 {} , 获取链接失败", conf.getName(), e);
|
||||
return Boolean.FALSE;
|
||||
}finally {
|
||||
try {
|
||||
connection.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, delObj, fetchList, putObj} from '@/api/'
|
||||
import {tableOption} from '@/const/crud/'
|
||||
import {fetchList, getObj, addObj, putObj, delObj} from '@/api/${pathName}'
|
||||
import {tableOption} from '@/const/crud/${pathName}'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/'
|
||||
import {getObj, addObj, putObj} from '@/api/${pathName}'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
|
||||
@@ -51,10 +51,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {delObj, fetchList} from '@/api/'
|
||||
import TableForm from './'
|
||||
import {fetchList, delObj} from '@/api/${pathName}'
|
||||
import TableForm from './${pathName}-form'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user