| | |
| | | |
| | | @Autowired |
| | | private IDictHospService dictHospService; |
| | | // @Autowired |
| | | // private DataSourceConfig dataSourceConfig; |
| | | @Autowired |
| | | private DruidConfig druidConfig; |
| | | private DataSourceConfig dataSourceConfig; |
| | | // @Autowired |
| | | // private DruidConfig druidConfig; |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { |
| | |
| | | response.getWriter().write("{\"message\":\"401:找不到院区数据\"}"); |
| | | return false; |
| | | } |
| | | // dataSourceConfig.addDataSource(hosp.getDbname()); |
| | | druidConfig.addDataSource(hosp.getDbname()); |
| | | dataSourceConfig.addDataSource(hosp.getDbname()); |
| | | // druidConfig.addDataSource(hosp.getDbname()); |
| | | DataSourceContextHolder.setDataSourceKey(hosp.getDbname()); |
| | | } catch (IOException e) { |
| | | return false; |