| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://192.168.0.189:3306/billion-db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://192.168.0.189:3306/billion-db-base?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | # 从库数据源 |
| | | slave: |
| | | # 从数据源开关/默认关闭 |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | enabled: true |
| | | url: jdbc:mysql://192.168.0.189:3306/billion-db-self?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | # 初始连接数 |
| | | initialSize: 5 |
| | | # 最小连接池数量 |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.billion.common.annotation.DataSource; |
| | | import com.billion.common.enums.DataSourceType; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('tool:gen:list')") |
| | | @GetMapping("/db/list") |
| | | @DataSource(value = DataSourceType.SLAVE) |
| | | public TableDataInfo dataList(GenTable genTable) |
| | | { |
| | | startPage(); |
| | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.billion.common.annotation.DataSource; |
| | | import com.billion.common.enums.DataSourceType; |
| | | import com.billion.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @date 2024-11-12 |
| | | */ |
| | | @Service |
| | | @DataSource(value = DataSourceType.SLAVE) |
| | | public class BsWorkshopServiceImpl extends ServiceImpl<BsWorkshopMapper, BsWorkshop> implements IBsWorkshopService |
| | | { |
| | | @Autowired |
| | |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: `http://localhost:8080`, |
| | | target: `http://localhost:8083`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |