├── .gitignore ├── .travis.yml ├── README.md ├── generate_web.db ├── img ├── dbList.png ├── demo.png ├── tbList.png └── template_manage.png ├── mybatis-generator-web-biz ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── mustfun │ │ └── generator │ │ └── biz │ │ ├── BootLauncher.java │ │ ├── config │ │ └── InitDataBase.java │ │ ├── facade │ │ ├── CityController.java │ │ └── impl │ │ │ ├── CityControllerImpl.java │ │ │ ├── ExtApiControllerImpl.java │ │ │ └── IndexControllerImpl.java │ │ └── mq │ │ └── MqConfig.java │ └── resources │ ├── static │ ├── css │ │ ├── chartist.min.css │ │ ├── fullcalendar.min.css │ │ ├── img │ │ │ ├── sample-1.jpg │ │ │ ├── sort_asc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ ├── sort_desc_disabled.png │ │ │ └── user-bg.jpg │ │ ├── jquery-jvectormap.css │ │ ├── jquery.dataTables.min.css │ │ ├── jquery.dataTables.min01.css │ │ ├── materialize.css │ │ ├── morris.css │ │ ├── page-center.css │ │ ├── perfect-scrollbar.css │ │ ├── prism.css │ │ ├── style.css │ │ └── xcharts.min.css │ ├── font │ │ ├── Material-Design-Icons │ │ │ ├── Material-Design-Icons.eot │ │ │ └── Material-Design-Icons.ttf │ │ └── roboto │ │ │ ├── Roboto-Bold.ttf │ │ │ ├── Roboto-Light.ttf │ │ │ ├── Roboto-Medium.ttf │ │ │ ├── Roboto-Regular.ttf │ │ │ └── Roboto-Thin.ttf │ ├── img │ │ ├── avatar.jpg │ │ ├── generic-logo.png │ │ ├── login-logo.png │ │ ├── materialize-logo.png │ │ ├── office.jpg │ │ ├── sample-1.jpg │ │ ├── signature-scan.png │ │ ├── style_typography_roboto.png │ │ └── user-bg.jpg │ └── js │ │ ├── chart-script.js │ │ ├── chart.min.js │ │ ├── chartist-script.js │ │ ├── chartist.min.js │ │ ├── chartjs-sample-chart.js │ │ ├── d3.min.js │ │ ├── data-tables-script.js │ │ ├── flot-chart.js │ │ ├── flot-script.js │ │ ├── fullcalendar-script.js │ │ ├── fullcalendar.min.js │ │ ├── jquery-1.11.3.js │ │ ├── jquery-jvectormap-1.2.2.min.js │ │ ├── jquery-jvectormap-world-mill-en.js │ │ ├── jquery-ui.custom.min.js │ │ ├── jquery.dataTables.min.js │ │ ├── jquery.flot.min.js │ │ ├── jquery.flot.pie.js │ │ ├── jquery.flot.stack.js │ │ ├── jquery.flot.time.js │ │ ├── jquery.sparkline.min.js │ │ ├── materialize.js │ │ ├── materialize.min.js │ │ ├── moment.min.js │ │ ├── morris-script.js │ │ ├── morris.min.js │ │ ├── perfect-scrollbar.min.js │ │ ├── plugins.js │ │ ├── prism.js │ │ ├── raphael-min.js │ │ ├── sparkline-script.js │ │ ├── vectormap-script.js │ │ ├── xcharts-script.js │ │ └── xcharts.min.js │ ├── temp │ ├── Bo.java.vm │ ├── Controller.java.vm │ ├── Dao.java.vm │ ├── Dao.xml.vm │ ├── Po.java.vm │ ├── Req.java.vm │ ├── Resp.java.vm │ ├── Result.java.vm │ ├── Service.java.vm │ └── ServiceImpl.java.vm │ └── templates │ ├── app-email.html │ ├── app-widget.html │ ├── changelogs.html │ ├── charts-chartist.html │ ├── charts-chartjs.html │ ├── charts-flotcharts.html │ ├── charts-morris.html │ ├── charts-sparklines.html │ ├── charts-xcharts.html │ ├── common │ ├── footer.html │ ├── header.html │ ├── loading.html │ ├── receource.html │ ├── rightSidebar.html │ ├── scripts.html │ └── sidebar.html │ ├── core │ ├── addTemplate.html │ ├── configList.html │ ├── dbList.html │ ├── index.html │ ├── tableList.html │ ├── templateList.html │ └── ui-modals.html │ ├── css-color.html │ ├── css-grid.html │ ├── css-helpers.html │ ├── css-icons.html │ ├── css-media.html │ ├── css-sass.html │ ├── css-shadow.html │ ├── css-typography.html │ ├── form-elements.html │ ├── form-layouts.html │ ├── index.html │ ├── index01.html │ ├── page-404.html │ ├── page-500.html │ ├── page-blank.html │ ├── page-invoice.html │ ├── page-lock-screen.html │ ├── page-login.html │ ├── page-register.html │ ├── table-basic.html │ ├── table-data.html │ ├── ui-accordions.html │ ├── ui-badges.html │ ├── ui-buttons.html │ ├── ui-cards.html │ ├── ui-collections.html │ ├── ui-media.html │ ├── ui-modals.html │ ├── ui-navbar.html │ ├── ui-pagination.html │ ├── ui-preloader.html │ ├── ui-toasts.html │ └── ui-tooltip.html ├── mybatis-generator-web-business ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── github │ └── mustfun │ └── generator │ └── business │ └── App.java ├── mybatis-generator-web-config ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── mustfun │ │ └── generator │ │ └── config │ │ └── App.java │ └── resources │ ├── config │ ├── application-dev.yml │ ├── application-pre.yml │ ├── application-prod.yml │ └── application-qa.yml │ ├── ehcache.xml │ ├── generator │ └── generator-config.properties │ ├── import.sql │ ├── logback-test.xml │ ├── logback.xml │ └── mybatis │ ├── generatorConfig.xml │ ├── mybatis-config.xml │ └── spring-mybatis.xml ├── mybatis-generator-web-dao ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── github │ │ └── mustfun │ │ └── generator │ │ └── dao │ │ └── mapper │ │ ├── CityMapper.java │ │ ├── DbSourceMapper.java │ │ ├── OrderMapper.java │ │ └── TemplateMapper.java │ └── resources │ └── mybatis │ └── mapper │ ├── dbSourceMapper.xml │ ├── orderMapper.xml │ └── templateMapper.xml ├── mybatis-generator-web-facade ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── github │ └── mustfun │ └── generator │ └── facade │ └── App.java ├── mybatis-generator-web-model ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── github │ └── mustfun │ └── generator │ └── model │ ├── constants │ └── FileConstants.java │ ├── enums │ ├── DbTypeEnums.java │ └── VmTypeEnums.java │ ├── po │ ├── City.java │ ├── DbConfigPo.java │ ├── DbSourcePo.java │ ├── LocalColumn.java │ ├── LocalTable.java │ ├── Order.java │ └── Template.java │ └── result │ └── Result.java ├── mybatis-generator-web-parent └── pom.xml ├── mybatis-generator-web-service ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── github │ └── mustfun │ └── generator │ └── service │ ├── DbSourceService.java │ ├── ExtApiService.java │ ├── OrderService.java │ ├── TemplateService.java │ └── impl │ ├── DbSourceServiceImpl.java │ ├── ExtApiServiceImpl.java │ ├── GenerateCodeService.java │ ├── OrderServiceImpl.java │ └── TemplateServiceImpl.java ├── mybatis-generator-web-support ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── github │ └── mustfun │ └── generator │ └── support │ ├── config │ ├── AbstractDataSourceConfig.java │ ├── BaseDruidConfig.java │ ├── DruidConfig.java │ ├── DruidOtherConfig.java │ ├── MasterDataSourceConfig.java │ ├── MasterSlaveDataSourceConfig.java │ ├── MybatisConfig.java │ ├── SlaveDataSourceConfig.java │ └── SlaveDruidConfig.java │ ├── handler │ ├── ConnectionHolder.java │ └── SpringContextHolder.java │ ├── result │ └── BaseResult.java │ ├── transcation │ └── TransactionConfig.java │ ├── util │ ├── DateUtils.java │ └── DbUtil.java │ └── web │ └── WebConfig.java ├── mybatis-generator-web-test ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── github │ └── mustfun │ └── generator │ └── test │ ├── DataBaseTools.java │ └── TestDataSource.java └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Java template 3 | # Compiled class file 4 | *.class 5 | 6 | # Log file 7 | *.log 8 | #idea 9 | .idea 10 | *.iml 11 | 12 | # BlueJ files 13 | *.ctxt 14 | 15 | # Mobile Tools for Java (J2ME) 16 | .mtj.tmp/ 17 | 18 | # Package Files # 19 | *.jar 20 | *.war 21 | *.ear 22 | *.zip 23 | *.tar.gz 24 | *.rar 25 | .target 26 | 27 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 28 | hs_err_pid* 29 | 30 | /**/target/ 31 | 32 | # jrebel 33 | rebel.xml 34 | *.bak 35 | 36 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | sudo: false 5 | script: 6 | - mvn cobertura:cobertura 7 | - echo '代码覆盖率统计完毕....' 8 | after_success: 9 | - bash <(curl -s https://codecov.io/bash) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 自动代码生成工具 2 | 3 | [![Build Status](https://travis-ci.org/mustfun/mybatis-generator-web.svg?branch=master)](https://travis-ci.org/mustfun/mybatis-generator-web) 4 | [![codecov](https://codecov.io/gh/mustfun/warning-control/branch/master/graph/badge.svg)](https://codecov.io/gh/mustfun/warning-control) 5 | ![GitHub release](https://img.shields.io/github/release/mustfun/warning-control.svg) 6 | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.mustfun/warning-control/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.mustfun/warning-control/badge.svg) 7 | [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php) 8 | 9 | 10 | ### 1、用处 11 | 一键生成Mybatis Mapper文件、Dao文件,Service , Controller层增删改查代码 12 | ### 2、介绍 13 | 本工具基于模板配置而成,可自定义模板,可以生成自己的Controller/Service/Dao/XML文件,比如您想要在类中自定义一些注解,修改模板即可 14 | ### 3、展示 15 | #### 数据库列表如下图所示: 16 | 17 | ![数据库列表](img/dbList.png) 18 | 19 | #### 读取到的表如下: 20 | 21 | ![数据库列表](img/tbList.png) 22 | 23 | #### 模板配置如下: 24 | 可随心所欲配置模板,自定义你所需要的代码出来 25 | 26 | ![数据库列表](img/template_manage.png) 27 | 28 | #### 生成的代码如下: 29 | 30 | ![数据库列表](img/demo.png) 31 | 32 | #### Mapper文件生成教完善 33 | 含有queryListByCondition等常用方法 34 | 35 | ```java 36 | 37 | ``` 38 | 39 | -------------------------------------------------------------------------------- /generate_web.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustfun/mybatis-generator-web/3ec2869203c67c19940265a381540637cd7db5e8/generate_web.db -------------------------------------------------------------------------------- /img/dbList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustfun/mybatis-generator-web/3ec2869203c67c19940265a381540637cd7db5e8/img/dbList.png -------------------------------------------------------------------------------- /img/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustfun/mybatis-generator-web/3ec2869203c67c19940265a381540637cd7db5e8/img/demo.png -------------------------------------------------------------------------------- /img/tbList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustfun/mybatis-generator-web/3ec2869203c67c19940265a381540637cd7db5e8/img/tbList.png -------------------------------------------------------------------------------- /img/template_manage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mustfun/mybatis-generator-web/3ec2869203c67c19940265a381540637cd7db5e8/img/template_manage.png -------------------------------------------------------------------------------- /mybatis-generator-web-biz/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | mybatis-generator-web-parent 5 | com.github.mustfun 6 | 1.0.0-SNAPSHOT 7 | ../mybatis-generator-web-parent/pom.xml 8 | 9 | 4.0.0 10 | 11 | mybatis-generator-web-biz 12 | jar 13 | 14 | mybatis-generator-web-biz 15 | http://www.biwan.com 16 | 17 | 18 | com.itar.soa.mybatis-generator-web.BootLauncher 19 | 20 | 21 | 22 | 23 | com.github.mustfun 24 | mybatis-generator-web-business 25 | 1.0.0-SNAPSHOT 26 | 27 | 28 | junit 29 | junit 30 | 31 | 32 | 33 | 34 | 35 | mybatis-generator-web-biz 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-maven-plugin 40 | ${springboot.version} 41 | 42 | 43 | 44 | repackage 45 | 46 | 47 | exec 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /mybatis-generator-web-biz/src/main/java/com/github/mustfun/generator/biz/BootLauncher.java: -------------------------------------------------------------------------------- 1 | package com.github.mustfun.generator.biz; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.ComponentScan; 6 | 7 | /** 8 | * @author dengzhiyuan 9 | */ 10 | @SpringBootApplication 11 | @ComponentScan(basePackages = {"com.github.mustfun.generator"}) 12 | public class BootLauncher { 13 | public static void main(String[] args) { 14 | SpringApplication springApplication = new SpringApplication(BootLauncher.class); 15 | springApplication.run(args); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /mybatis-generator-web-biz/src/main/java/com/github/mustfun/generator/biz/config/InitDataBase.java: -------------------------------------------------------------------------------- 1 | package com.github.mustfun.generator.biz.config; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.github.mustfun.generator.model.constants.FileConstants; 5 | import com.github.mustfun.generator.model.po.DbConfigPo; 6 | import com.github.mustfun.generator.model.po.DbSourcePo; 7 | import com.github.mustfun.generator.service.DbSourceService; 8 | import com.github.mustfun.generator.service.ExtApiService; 9 | import org.apache.commons.io.IOUtils; 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Component; 14 | 15 | import javax.annotation.PostConstruct; 16 | import java.io.FileInputStream; 17 | import java.io.IOException; 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | /** 22 | * @author dengzhiyuan 23 | * @version 1.0 24 | * @date 2018/4/16 25 | * @since 1.0 26 | */ 27 | @Component 28 | public class InitDataBase { 29 | 30 | private static final Logger LOG = LoggerFactory.getLogger(InitDataBase.class); 31 | 32 | @Autowired 33 | private ExtApiService extApiService; 34 | 35 | @Autowired 36 | private DbSourceService dbSourceService; 37 | 38 | @PostConstruct 39 | public void initDataBase(){ 40 | List dbSourcePos = dbSourceService.queryList(); 41 | for (DbSourcePo dbSourcePo : dbSourcePos) { 42 | extApiService.initDb(dbSourcePo); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /mybatis-generator-web-biz/src/main/java/com/github/mustfun/generator/biz/facade/CityController.java: -------------------------------------------------------------------------------- 1 | package com.github.mustfun.generator.biz.facade; 2 | 3 | import com.github.mustfun.generator.model.po.City; 4 | import com.github.mustfun.generator.support.result.BaseResult; 5 | 6 | /** 7 | * Created by dengzhiyuan on 2017/4/6. 8 | */ 9 | public interface CityController { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /mybatis-generator-web-biz/src/main/java/com/github/mustfun/generator/biz/facade/impl/CityControllerImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.mustfun.generator.biz.facade.impl; 2 | 3 | import com.github.mustfun.generator.biz.facade.CityController; 4 | import com.github.mustfun.generator.model.po.City; 5 | import com.github.mustfun.generator.service.DbSourceService; 6 | import com.github.mustfun.generator.support.result.BaseResult; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.http.MediaType; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | /** 14 | * @author dengzhiyuan 15 | * @version 1.0 16 | * @date 2017/5/4 17 | * @since 1.0 18 | */ 19 | @RestController 20 | @RequestMapping("/city") 21 | public class CityControllerImpl implements CityController { 22 | 23 | @Autowired 24 | private DbSourceService dbSourceService; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /mybatis-generator-web-biz/src/main/java/com/github/mustfun/generator/biz/facade/impl/ExtApiControllerImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.mustfun.generator.biz.facade.impl; 2 | 3 | import com.github.mustfun.generator.model.po.DbConfigPo; 4 | import com.github.mustfun.generator.model.po.DbSourcePo; 5 | import com.github.mustfun.generator.model.po.Template; 6 | import com.github.mustfun.generator.service.ExtApiService; 7 | import com.github.mustfun.generator.support.result.BaseResult; 8 | import org.apache.commons.io.IOUtils; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.http.MediaType; 13 | import org.springframework.web.bind.annotation.*; 14 | 15 | import javax.servlet.http.HttpServletResponse; 16 | import java.io.IOException; 17 | import java.util.List; 18 | 19 | /** 20 | * @author dengzhiyuan 21 | * @version 1.0 22 | * @date 2017/5/4 23 | * @since 1.0 24 | */ 25 | @RestController 26 | @RequestMapping("/api") 27 | public class ExtApiControllerImpl { 28 | 29 | private static final Logger LOG = LoggerFactory.getLogger(ExtApiControllerImpl.class); 30 | @Autowired 31 | private ExtApiService extApiService; 32 | 33 | 34 | @RequestMapping(value = "save_db_config",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE) 35 | public BaseResult saveDbConfig(DbSourcePo dbSourcePo) { 36 | return extApiService.saveDbConfig(dbSourcePo); 37 | } 38 | 39 | @RequestMapping(value = "save_template",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE) 40 | public BaseResult saveTemplate(Template dbSourcePo) { 41 | return extApiService.saveTemplate(dbSourcePo); 42 | } 43 | 44 | @RequestMapping(value = "delete_template/{id}",method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_UTF8_VALUE) 45 | public BaseResult deleteTemplate(@PathVariable("id") Integer dbSourcePo) { 46 | return extApiService.deleteTemplate(dbSourcePo); 47 | } 48 | 49 | @RequestMapping(value = "update_template/{id}",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE) 50 | public BaseResult updateTemplate(Template template) { 51 | return extApiService.updateTemplate(template); 52 | } 53 | 54 | 55 | @RequestMapping(value = "generate_code",method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_UTF8_VALUE) 56 | public void generateCode(@RequestParam("tableName") List tableNames,@RequestParam("packageName") String packageName, 57 | @RequestParam("address")String address,@RequestParam("vmList")List vmList, 58 | HttpServletResponse response) { 59 | byte[] data = extApiService.generateCode(tableNames,packageName, address,vmList); 60 | response.reset(); 61 | response.setHeader("Content-Disposition", "attachment; filename=\"generator-web.zip\""); 62 | response.addHeader("Content-Length", "" + data.length); 63 | response.setContentType("application/octet-stream; charset=UTF-8"); 64 | 65 | try { 66 | IOUtils.write(data, response.getOutputStream()); 67 | } catch (IOException e) { 68 | LOG.error("下载代码异常,{}",e); 69 | } 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /mybatis-generator-web-biz/src/main/java/com/github/mustfun/generator/biz/facade/impl/IndexControllerImpl.java: -------------------------------------------------------------------------------- 1 | package com.github.mustfun.generator.biz.facade.impl; 2 | 3 | import com.github.mustfun.generator.model.enums.DbTypeEnums; 4 | import com.github.mustfun.generator.model.enums.VmTypeEnums; 5 | import com.github.mustfun.generator.model.po.DbSourcePo; 6 | import com.github.mustfun.generator.model.po.LocalTable; 7 | import com.github.mustfun.generator.model.po.Template; 8 | import com.github.mustfun.generator.service.DbSourceService; 9 | import com.github.mustfun.generator.service.ExtApiService; 10 | import com.github.mustfun.generator.service.TemplateService; 11 | import com.github.mustfun.generator.support.handler.ConnectionHolder; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.stereotype.Controller; 16 | import org.springframework.ui.Model; 17 | import org.springframework.web.bind.annotation.PathVariable; 18 | import org.springframework.web.bind.annotation.RequestMapping; 19 | import org.springframework.web.bind.annotation.RequestMethod; 20 | import org.springframework.web.bind.annotation.RequestParam; 21 | 22 | import java.sql.Connection; 23 | import java.util.List; 24 | 25 | /** 26 | * @author dengzhiyuan 27 | * @version 1.0 28 | * @date 2017/5/4 29 | * @since 1.0 30 | */ 31 | @Controller 32 | @RequestMapping("/") 33 | public class IndexControllerImpl{ 34 | 35 | private static final Logger LOG = LoggerFactory.getLogger(IndexControllerImpl.class); 36 | 37 | @Autowired 38 | private ExtApiService extApiService; 39 | 40 | @Autowired 41 | private DbSourceService dbService; 42 | 43 | @Autowired 44 | private TemplateService templateService; 45 | 46 | 47 | @RequestMapping(value = "/",method = RequestMethod.GET) 48 | public String index() { 49 | return "core/index"; 50 | } 51 | 52 | 53 | @RequestMapping(value = "/dbList",method = RequestMethod.GET) 54 | public String dbList(Model model) { 55 | //List strings = IOUtils.readLines(new FileInputStream(FileConstants.TEMP_DB_CONFIG_DB), "UTF-8"); 56 | //从数据库中读取 57 | List dbSourcePos = dbService.queryList(); 58 | for (DbSourcePo dbSourcePo : dbSourcePos) { 59 | extApiService.initDb(dbSourcePo); 60 | } 61 | model.addAttribute("dbConfigList", dbSourcePos); 62 | return "core/dbList"; 63 | } 64 | 65 | @RequestMapping(value = "/templateList",method = RequestMethod.GET) 66 | public String templateList(Model model) { 67 | //从数据库中读取 68 | List