<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # **文件中心** 依賴關系 ![](https://box.kancloud.cn/6bedb50738156a0a03ce64e6a925804d_1739x684.png) ``` <!-- 資源服務器 --> <dependency> <groupId>com.open.capacity</groupId> <artifactId>security-core</artifactId> <version>${core.version}</version> </dependency> ``` 文件中心配置文件 ? 支持阿里云oss,七牛oss兩種配置 ``` aliyun: ? oss: ??? access-key: LTAIMjvZWiXRuClW ??? accessKeySecret: YwJar7gkdZx3Q3Zk6TRuEAWaAz6n8y? ??? endpoint: oss-cn-beijing.aliyuncs.com? ??? bucketName: owenwangwen ??? domain: [https://owenwangwen.oss-cn-beijing.aliyuncs.com](https://owenwangwen.oss-cn-beijing.aliyuncs.com)qiniu: ? oss: ??? access-key: owGiAWGn6DpU5zlrfLP4K9iQusahmspTW6PxRABW ??? accessKeySecret: 5CBWKFd1pP-OSiusd1Bvhokp-ih4i3bs2QA2r-U2 ??? endpoint: [http://payo7kq4i.bkt.clouddn.com](http://payo7kq4i.bkt.clouddn.com) ??? bucketName: owenwangwen ??? ``` 文件存儲配置 token校驗redis配置 ``` spring: ? application: ??? name: file-center ? datasource: ??? dynamic: ????? enable: true ??? druid: ????? # JDBC 配置(驅動類自動從url的mysql識別,數據源類型自動識別) ????? core: ??????? url: jdbc:mysql://127.0.0.1:3306/file\_center?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false ??????? username: root ??????? password: root ??????? driver-class-name:? com.mysql.jdbc.Driver ????? log: ??????? url: jdbc:mysql://127.0.0.1:3306/log-center?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false ??????? username: root ??????? password: root ??????? driver-class-name:? com.mysql.jdbc.Driver?? mybatis: ? config-location: classpath:mybatis.cfg.xml ? mapper-locations: classpath\*:com/central/\*\*/dao/\*.xml? security: ? oauth2: ??? token: ????? store: ??????? type: redis permit: ? http\_urls:? /files-anon/\*\*? , /doc.html? ,/upload.html , /uploads.html ,/js/\*\* ,/document.html ? oauth\_urls: /files-anon/\*\*? , /doc.html? ,/upload.html , /uploads.html ,/js/\*\* ,/document.html #設置最大超時時間 ribbon:? ?? ReadTimeout: 16000? ?? ConnectTimeout: 16000 #設置最大容錯超時時間 hystrix: ? command: ??? default: ????? execution: ??????? timeout: ????????? enabled: true ??????? isolation: ????????? thread: ??????????? timeoutInMilliseconds: 16000 ??? logging: ? level: ??? root: INFO ??? org.hibernate: INFO ??? org.hibernate.type.descriptor.sql.BasicBinder: TRACE ??? org.hibernate.type.descriptor.sql.BasicExtractor: TRACE ``` 七牛云,七牛云核心配置 ![](https://box.kancloud.cn/cf44ac3e04f702f399d69821f7e9363b_1727x647.png) 七牛云上傳核心類 ![](https://box.kancloud.cn/29c024ee23404cccb6110de75752640f_1107x467.png) ## file-center 登錄流程圖 ![](https://box.kancloud.cn/7eea410bb58d317640e825e7a3e7c20e_588x703.png) ``` public Authentication authenticate(Authentication authentication) throws AuthenticationException { if (authentication == null) { throw new InvalidTokenException("Invalid token (token not found)"); } String token = (String) authentication.getPrincipal(); OAuth2Authentication auth = tokenServices.loadAuthentication(token); if (auth == null) { throw new InvalidTokenException("Invalid token: " + token); } Collection<String> resourceIds = auth.getOAuth2Request().getResourceIds(); if (resourceId != null && resourceIds != null && !resourceIds.isEmpty() && !resourceIds.contains(resourceId)) { throw new OAuth2AccessDeniedException("Invalid token does not contain resource id (" + resourceId + ")"); } checkClientDetails(auth); if (authentication.getDetails() instanceof OAuth2AuthenticationDetails) { OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails) authentication.getDetails(); // Guard against a cached copy of the same details if (!details.equals(auth.getDetails())) { // Preserve the authentication details from the one loaded by token services details.setDecodedDetails(auth.getDetails()); } } auth.setDetails(authentication.getDetails()); auth.setAuthenticated(true); return auth;
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看