| | |
| | | #数据源配置 |
| | | spring: |
| | | datasource: |
| | | url: ${blade.datasource.dev.url} |
| | | username: ${blade.datasource.dev.username} |
| | | password: ${blade.datasource.dev.password} |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://127.0.0.1:3308/jczz_test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: root |
| | | redis: |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: |
| | | database: 0 |
| | | ssl: false |
| | | |
| | | |
| | | druid: |
| | | validation-query: select 1 |
| | | #第三方登陆 |
| | | social: |
| | | enabled: true |
| | |
| | | # 资源路径 |
| | | resources: |
| | | static-locations: classpath:/static/ |
| | | cloud: |
| | | sentinel: |
| | | eager: true |
| | | devtools: |
| | | restart: |
| | | log-condition-evaluation-delta: false |
| | | livereload: |
| | | port: 23333 |
| | | |
| | | #mybatis-plus配置 |
| | | mybatis-plus: |
| | | mapper-locations: classpath:cn/**/**/mapper/*Mapper.xml |
| | | #实体扫描,多个package用逗号或者分号分隔 |
| | | typeALiasesPackage: cn.**.**.entity |
| | | #服务器配置 |
| | | server: |
| | | undertow: |
| | | # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 |
| | | io-threads: 16 |
| | | # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载 |
| | | worker-threads: 400 |
| | | # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理 |
| | | buffer-size: 1024 |
| | | # 是否分配的直接内存 |
| | | direct-buffers: true |
| | | |
| | | #feign配置 |
| | | feign: |
| | | hystrix: |
| | | enabled: true |
| | | okhttp: |
| | | enabled: true |
| | | httpclient: |
| | | enabled: false |
| | | |
| | | #hystrix配置 |
| | | hystrix: |
| | | threadpool: |
| | | default: |
| | | coreSize: 300 |
| | | maxQueueSize: 1000 |
| | | queueSizeRejectionThreshold: 800 |
| | | command: |
| | | default: |
| | | execution: |
| | | isolation: |
| | | thread: |
| | | timeoutInMilliseconds: 5000 |
| | | |
| | | #ribbon配置 |
| | | ribbon: |
| | | #对当前实例的重试次数 |
| | | MaxAutoRetries: 1 |
| | | #切换实例的重试次数 |
| | | MaxAutoRetriesNextServer: 2 |
| | | #请求处理的超时时间 |
| | | ReadTimeout: 60000 |
| | | #请求连接的超时时间 |
| | | ConnectTimeout: 60000 |
| | | #对所有操作请求都进行重试 |
| | | OkToRetryOnAllOperations: true |
| | | |
| | | #对外暴露端口 |
| | | management: |
| | | endpoints: |
| | | web: |
| | | exposure: |
| | | include: "*" |
| | | endpoint: |
| | | health: |
| | | show-details: always |
| | | |
| | | #blade配置 |
| | | blade: |
| | | #token配置 |
| | | token: |
| | | #是否有状态 |
| | | state: false |
| | | #接口配置 |
| | | api: |
| | | #报文加密配置 |
| | | crypto: |
| | | #启用报文加密配置 |
| | | enabled: false |
| | | #使用AesUtil.genAesKey()生成 |
| | | aes-key: O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm |
| | | #使用DesUtil.genDesKey()生成 |
| | | des-key: jMVCBsFGDQr1USHo |
| | | #jackson配置 |
| | | jackson: |
| | | #null自动转空值 |
| | | null-to-empty: true |
| | | #大数字自动转字符串 |
| | | big-num-to-string: true |
| | | #支持text文本请求,与报文加密同时开启 |
| | | support-text-plain: false |
| | | #xss配置 |
| | | xss: |
| | | enabled: true |
| | | skip-url: |
| | | - /weixin |
| | | - /notice/submit |
| | | #安全框架配置 |
| | | secure: |
| | | #接口放行 |
| | | skip-url: |
| | | - /test/** |
| | | - /menu/routes |
| | | - /menu/auth-routes |
| | | - /menu/top-menu |
| | | - /blade-auth/** |
| | | - /tenant/info |
| | | #授权认证配置 |
| | | auth: |
| | | - method: ALL |
| | | pattern: /weixin/** |
| | | expression: "hasAuth()" |
| | | - method: POST |
| | | pattern: /dashboard/upload |
| | | expression: "hasTimeAuth(9, 17)" |
| | | - method: POST |
| | | pattern: /dashboard/submit |
| | | expression: "hasAnyRole('administrator', 'admin', 'user')" |
| | | #多终端认证配置 |
| | | client: |
| | | - client-id: sword |
| | | path-patterns: |
| | | - /sword/** |
| | | - client-id: saber |
| | | path-patterns: |
| | | - /saber/** |
| | | #多租户配置 |
| | | tenant: |
| | | #多租户增强 |
| | | enhance: true |
| | | #多租户授权保护 |
| | | license: false |
| | | #动态数据源功能 |
| | | dynamic-datasource: false |
| | | #动态数据源全局扫描 |
| | | dynamic-global: false |
| | | #多租户字段名 |
| | | column: tenant_id |
| | | #排除多租户逻辑 |
| | | exclude-tables: |
| | | - blade_user |
| | | |
| | | #swagger文档 |
| | | swagger: |
| | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>BladeX 统一认证系统</title> |
| | | <title>统一认证系统</title> |
| | | <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"> |
| | | <link rel="stylesheet" type="text/css" href="/css/iofrm-style.css"> |
| | | <link rel="stylesheet" type="text/css" href="/css/iofrm-theme.css"> |
| | |
| | | <div class="form-content"> |
| | | <div class="form-items"> |
| | | <div class="website-logo-inside"> |
| | | <h1>BladeX 统一认证系统</h1> |
| | | <h1>统一认证系统</h1> |
| | | </div> |
| | | <p>欢迎使用统一认证,提交后请对应用进行授权</p> |
| | | <div class="page-links"> |
| | | <a>请输入认证信息</a> |
| | | </div> |
| | | <#-- <div class="page-links">--> |
| | | <#-- <a>请输入认证信息</a>--> |
| | | <#-- </div>--> |
| | | <form id="form" action="/oauth/form" method="post"> |
| | | <input class="form-control" type="text" name="tenant_id" placeholder="请输入租户ID" required> |
| | | <input class="form-control" type="hidden" name="tenant_id" placeholder="请输入租户ID" required value="000000"> |
| | | <input class="form-control" type="text" name="username" placeholder="请输入用户名" required> |
| | | <input class="form-control" id="ipt" type="password" name="password" placeholder="请输入密码" required> |
| | | <div class="form-button"> |
| | |
| | | </div> |
| | | </form> |
| | | <div class="other-links"> |
| | | <span>Copyrights © 2022 <a href="https://bladex.vip" target="_blank">BladeX</a> All Rights Reserved.</span> |
| | | <span>Copyrights © 2024 <a href="https://bladex.vip" target="_blank">jczz</a> All Rights Reserved.</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) { |
| | | Properties props = System.getProperties(); |
| | | // 通用注册 |
| | | PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.enabled", "false"); |
| | | PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.server-addr", LauncherConstant.nacosAddr(profile)); |
| | | PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile)); |
| | | PropsUtil.setProperty(props, "spring.cloud.nacos.username", LauncherConstant.NACOS_USERNAME); |
| | | PropsUtil.setProperty(props, "spring.cloud.nacos.username", LauncherConstant.NACOS_USERNAME); |
| | | PropsUtil.setProperty(props, "spring.cloud.nacos.password", LauncherConstant.NACOS_PASSWORD); |
| | | // PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); |
| | | // PropsUtil.setProperty(props, "spring.zipkin.base-url", LauncherConstant.zipkinAddr(profile)); |