当前位置:首页>java>别再人工查代码了!SonarQube自动化代码审查,效率提升10倍

别再人工查代码了!SonarQube自动化代码审查,效率提升10倍

  • 2026-01-31 19:15:58
别再人工查代码了!SonarQube自动化代码审查,效率提升10倍

## Sonar家族框架

## 检测代码质量七个维度

- 复杂度分布(complexity):代码复杂度过高将难以理解

- 重复代码(duplications):程序中包含大量复制、粘贴的代码而导致代码臃肿,sonar可以展示源码中重复严重的地方

- 单元测试统计(unit tests):统计并展示单元测试覆盖率,开发或测试可以清楚测试代码的覆盖情况

- 代码规则检查(coding rules):通过Findbugs,PMD,CheckStyle等检查代码是否符合规

- 注释率(comments):若代码注释过少,特别是人员变动后,其他人接手比较难接手;若过多,又不利于阅读

- 潜在的Bug(potential bugs):通过Findbugs,PMD,CheckStyle等检测潜在的bug

- 结构与设计(architecture & design):找出循环,展示包与包、类与类之间的依赖、检查程序之间耦合度

## 支持语言

ABAP、C/C++、C#、CSS、COBOL、Flex、Go、HTML、Java、JavaScript、Kotlin、Objective-C、PL/SQL、PL/I、PHP、Python、RPG、Ruby、Swift、T-SQL、TypeScript、VB.NET、VB6、XML

## 环境部署

### SonarQube下载与安装

在SonarQube的下载页面:https://www.sonarqube.org/downloads/

JDK11下载:https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html

### 启动SONARQUBE服务

双击StartSonar.bat即可启动SonarQube服务

启动成功命令行如下图所示:

启动成功后,用浏览器打开http://localhost:9000 

==到此为止,SonarQube的服务端实际上已经部署成功,然而它还是只是个测试用的环境不足以用于生产环境,因为SonarQube是一个需要数据存储的Web系统,它需要数据库才能成为一个完整的有数据存储和展示功能的Web系统==

==在SonarQube的目录中有个conf文件夹,该文件夹内是SonarQube的配置文件,数据库的配置即是在sonar.properties中配置的,在该配置文件中我们也能看到当前版本的SonarQube支持哪些数据库==

## 数据库配置

#--------------------------------------------------------------------------------------------------# DATABASE## IMPORTANT:# - The embedded H2 database is used by default. It is recommended for tests but not for#   production use. Supported databases are MySQL, Oracle, PostgreSQL and Microsoft SQLServer.# - Changes to database connection URL (sonar.jdbc.url) can affect SonarSource licensed products.# User credentials.# Permissions to create tables, indices and triggers must be granted to JDBC user.# The schema must be created first.#sonar.jdbc.username=#sonar.jdbc.password=#----- Embedded Database (default)# H2 embedded database server listening port, defaults to 9092#sonar.embeddedDatabase.port=9092#----- DEPRECATED #----- MySQL >=5.6 && <8.0# Support of MySQL is dropped in Data Center Editions and deprecated in all other editions# Only InnoDB storage engine is supported (not myISAM).# Only the bundled driver is supported. It can not be changed.sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&&useSSL=falsesonar.jdbc.username=mysqlsonar.jdbc.password=alex005xsonar.sorceEncoding=UTF-8sonar.login=adminsonar.password=admin#----- Oracle 11g/12c# The Oracle JDBC driver must be copied into the directory extensions/jdbc-driver/oracle/.# Only the thin client is supported, and only the versions 11.2.x or 12.2.x must be used. See# https://jira.sonarsource.com/browse/SONAR-9758 for more details.# If you need to set the schema, please refer to http://jira.sonarsource.com/browse/SONAR-5000#sonar.jdbc.url=jdbc:oracle:thin:@localhost:1521/XE#----- PostgreSQL 9.3 or greater# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema".#sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=my_schema#----- Microsoft SQLServer 2014/2016 and SQL Azure# A database named sonar must exist and its collation must be case-sensitive (CS) and accent-sensitive (AS)# Use the following connection string if you want to use integrated security with Microsoft Sql Server# Do not set sonar.jdbc.username or sonar.jdbc.password property if you are using Integrated Security# For Integrated Security to work, you have to download the Microsoft SQL JDBC driver package from# https://www.microsoft.com/en-us/download/details.aspx?id=55539# and copy sqljdbc_auth.dll to your path. You have to copy the 32 bit or 64 bit version of the dll# depending upon the architecture of your server machine.#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true# Use the following connection string if you want to use SQL Auth while connecting to MS Sql Server.# Set the sonar.jdbc.username and sonar.jdbc.password appropriately.#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar#----- Connection pool settings# The maximum number of active connections that can be allocated# at the same time, or negative for no limit.# The recommended value is 1.2 * max sizes of HTTP pools. For example if HTTP ports are# enabled with default sizes (50, see property sonar.web.http.maxThreads)# then sonar.jdbc.maxActive should be 1.2 * 50 = 60.#sonar.jdbc.maxActive=60# The maximum number of connections that can remain idle in the# pool, without extra ones being released, or negative for no limit.#sonar.jdbc.maxIdle=5# The minimum number of connections that can remain idle in the pool,# without extra ones being created, or zero to create none.#sonar.jdbc.minIdle=2# The maximum number of milliseconds that the pool will wait (when there# are no available connections) for a connection to be returned before# throwing an exception, or <= 0 to wait indefinitely.#sonar.jdbc.maxWait=5000#sonar.jdbc.minEvictableIdleTimeMillis=600000#sonar.jdbc.timeBetweenEvictionRunsMillis=30000

## Web Server配置

#--------------------------------------------------------------------------------------------------# WEB SERVER# Web server is executed in a dedicated Java process. By default heap size is 512Mb.# Use the following property to customize JVM options.#    Recommendations:##    The HotSpot Server VM is recommended. The property -server should be added if server mode#    is not enabled by default on your environment:#    http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html##    Startup can be long if entropy source is short of entropy. Adding#    -Djava.security.egd=file:/dev/./urandom is an option to resolve the problem.#    See https://wiki.apache.org/tomcat/HowTo/FasterStartUp#Entropy_Source##sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError# Same as previous property, but allows to not repeat all other settings like -Xmx#sonar.web.javaAdditionalOpts=# Binding IP address. For servers with more than one IP address, this property specifies which# address will be used for listening on the specified ports.# By default, ports will be used on all IP addresses associated with the server.#sonar.web.host=0.0.0.0# Web context. When set, it must start with forward slash (for example /sonarqube).# The default value is root context (empty value).#sonar.web.context=# TCP port for incoming HTTP connections. Default value is 9000.#sonar.web.port=9000# The maximum number of connections that the server will accept and process at any given time.# When this number has been reached, the server will not accept any more connections until# the number of connections falls below this value. The operating system may still accept connections# based on the sonar.web.connections.acceptCount property. The default value is 50.#sonar.web.http.maxThreads=50# The minimum number of threads always kept running. The default value is 5.#sonar.web.http.minThreads=5# The maximum queue length for incoming connection requests when all possible request processing# threads are in use. Any requests received when the queue is full will be refused.# The default value is 25.#sonar.web.http.acceptCount=25# By default users are logged out and sessions closed when server is restarted.# If you prefer keeping user sessions open, a secret should be defined. Value is# HS256 key encoded with base64. It must be unique for each installation of SonarQube.# Example of command-line:# echo -n "type_what_you_want" | openssl dgst -sha256 -hmac "key" -binary | base64#sonar.auth.jwtBase64Hs256Secret=# The inactivity timeout duration of user sessions, in minutes. After the configured# period of time, the user is logged out.# The default value is set to 3 days (4320 minutes)# and cannot be greater than 3 months. Value must be strictly positive.#sonar.web.sessionTimeoutInMinutes=4320# A passcode can be defined to access some web services from monitoring# tools without having to use the credentials of a system administrator.# Check the Web API documentation to know which web services are supporting this authentication mode.# The passcode should be provided in HTTP requests with the header "X-Sonar-Passcode".# By default feature is disabled.#sonar.web.systemPasscode=

==除了以上两类重要配置外,还有单点登录、LDAP、Java虚拟机配置等相关参数可配==

## 配置插件

## 配置SonarQube Scanner

下载地址:https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

#Configure here general information about the environment, such as SonarQube server connection details for example#No information about specific project should appear here#----- Default SonarQube serversonar.host.url=http://localhost:9000#----- Default source code encodingsonar.sourceEncoding=UTF-8sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&&useSSL=falsesonar.jdbc.username=mysqlsonar.jdbc.password=alex005x

### 新增系统环境变量

SONAR_SCANNER_HOME:D:\sonar-scanner-4.2.0.1873-windows

Path中新增%SONAR_SCANNER_HOME%\bin;

验证配置,在命令行输入```sonar-scanner -help```

D:\cuss-social-jscoco\target\classes\com\xhl\cuss\social>sonar-scanner -helpERROR: Unrecognized option: -helpINFO:INFO: usage: sonar-scanner [options]INFO:INFO: Options:INFO:  -D,--define <arg>     Define propertyINFO:  -h,--help             Display help informationINFO:  -v,--version          Display version informationINFO:  -X,--debug            Produce execution debug output

在工程目录下新建文件名为```sonar-project.properties```,在文件中写入如下项目信息,用于写入Sonar数据库

#项目的keysonar.projectKey=my:baseInfo#项目的名字sonar.projectName=BASIC_INFORMATION#项目的版本sonar.projectVersion=1.0.0#需要分析的源码的目录,多个目录用英文逗号隔开sonar.sources=D:/cuss-social-jscoco/src/main/java/com/xhl# Languagesonar.language=javasonar.java.binaries=.sonar.sourceEncoding=UTF-8

### 执行扫描

在工程目录下,执行命令```sonar-scanner```即可完成扫描,扫描结果会写入数据库,并可才Sonar平台上查看结果

D:\cuss-social-jscoco>sonar-scannerINFO: Scanner configuration file: D:\sonar-scanner-4.2.0.1873-windows\bin\..\conf\sonar-scanner.propertiesINFO: Project root configuration file: D:\cuss-social-jscoco\sonar-project.propertiesINFO: SonarQube Scanner 4.2.0.1873INFO: Java 11.0.3 AdoptOpenJDK (64-bit)INFO: Windows 10 10.0 amd64INFO: User cache: C:\Users\Administrator\.sonar\cacheINFO: SonarQube server 7.6.0INFO: Default locale: "zh_CN", source code encoding: "UTF-8"INFO: Load global settingsWARNING: An illegal reflective access operation has occurredWARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/C:/Users/Administrator/.sonar/cache/993f707e3af7ba4f46f121039128516b/sonar-scanner-engine-shaded-7.6-all.jar) to field java.nio.Buffer.addressWARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtilWARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operationsWARNING: All illegal access operations will be denied in a future releaseINFO: Load global settings (done) | time=50msINFO: Server id: 49B321BC-AW5aoLlje3tu4A9kELXRINFO: User cache: C:\Users\Administrator\.sonar\cacheINFO: Load/download pluginsINFO: Load plugins indexINFO: Load plugins index (done) | time=70msINFO: Plugin [l10nzh] defines 'l10nen' as base plugin. This metadata can be removed from manifest of l10n plugins since version 5.2.INFO: Load/download plugins (done) | time=100msINFO: Process project propertiesINFO: Execute project buildersINFO: Execute project builders (done) | time=10msINFO: Project key: my:baseInfoINFO: Base dir: D:\cuss-social-jscocoINFO: Working dir: D:\cuss-social-jscoco\.scannerworkINFO: Load project settingsINFO: Load project settings (done) | time=20msINFO: Load project repositoriesINFO: Load project repositories (done) | time=50msINFO: Load quality profilesINFO: Load quality profiles (done) | time=40msINFO: Load active rulesINFO: Load active rules (done) | time=340msINFO: Load metrics repositoryINFO: Load metrics repository (done) | time=21msWARN: SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM of your project, or disable the SCM Sensor in the project settings.INFO: Language is forced to javaINFO: Indexing files...INFO: Project configuration:INFO: 132 files indexedINFO: Quality profile for java: Sonar wayINFO: ------------- Run sensors on module BASIC_INFORMATIONINFO: Sensor JavaSquidSensor [java]INFO: Configured Java source version (sonar.java.source): noneINFO: JavaClasspath initializationWARN: Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property.INFO: JavaClasspath initialization (done) | time=20msINFO: JavaTestClasspath initializationINFO: JavaTestClasspath initialization (done) | time=10msINFO: Java Main Files AST scanINFO: 132 source files to be analyzedINFO: 132/132 source files have been analyzedINFO: Java Main Files AST scan (done) | time=9762msINFO: Java Test Files AST scanINFO: 0 source files to be analyzedINFO: Java Test Files AST scan (done) | time=0msINFO: 0/0 source files have been analyzedINFO: Sensor JavaSquidSensor [java] (done) | time=10202msINFO: Sensor JaCoCo XML Report Importer [jacoco]INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=10msINFO: Sensor SurefireSensor [java]INFO: parsing [D:\cuss-social-jscoco\target\surefire-reports]INFO: Sensor SurefireSensor [java] (done) | time=10msINFO: Sensor JaCoCoSensor [java]INFO: Sensor JaCoCoSensor [java] (done) | time=0msINFO: Sensor JavaXmlSensor [java]INFO: Sensor JavaXmlSensor [java] (done) | time=10msINFO: Sensor HTML [web]INFO: Sensor HTML [web] (done) | time=10msINFO: Sensor Zero Coverage SensorINFO: Sensor Zero Coverage Sensor (done) | time=80msINFO: ------------- Run sensors on projectINFO: Sensor Java CPD Block IndexerINFO: Sensor Java CPD Block Indexer (done) | time=271msINFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.INFO: 32 files had no CPD blocksINFO: Calculating CPD for 100 filesINFO: CPD calculation finishedINFO: Analysis report generated in 270ms, dir size=1 MBINFO: Analysis report compressed in 370ms, zip size=472 KBINFO: Analysis report uploaded in 80msINFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=my%3AbaseInfoINFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis reportINFO: More about the report processing at http://localhost:9000/api/ce/task?id=AW5eRz6r4XbRoxI2cCRWINFO: Analysis total time: 13.842 sINFO: ------------------------------------------------------------------------INFO: EXECUTION SUCCESSINFO: ------------------------------------------------------------------------INFO: Total time: 14.893sINFO: Final Memory: 8M/34MINFO: ------------------------------------------------------------------------

在结果中能够看到链接

http://localhost:9000/dashboard?id=my%3AbaseInfo

用浏览器打开该链接,即可查看结果

## 扫描Maven项目

点击Setup,然后输入一个Name,并点击Generate按钮生成token

点击Continue,然后根据项目的语言选择要扫描什么类型的项目,例如Java语言的项目jiu选择Java然后,根据构建工具选择Maven还是Gradle,例如选择Maven

### 配置Maven

  <pluginGroups>	 <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>  </pluginGroups>
        <profile>            <id>sonar</id>            <activation>                <activeByDefault>true</activeByDefault>            </activation>            <properties>                <sonar.host.url>                  http://192.168.70.62:9000                </sonar.host.url>            </properties>        </profile>

如果Maven环境配置成功,则只需要在命令行执行如下命令即可完成扫描

mvn sonar:sonar \  -Dsonar.projectKey=java-c-leadscloud \  -Dsonar.host.url=http://localhost:9000 \  -Dsonar.login=c8e3f17a12f5ead7dac8a7a45460b7be958ef5e1

## 扫描Gradle项目

如果选择Gradle,则需要做如下配置

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-02-07 15:14:07 HTTP/2.0 GET : https://f.mffb.com.cn/a/470435.html
  2. 运行时间 : 0.158886s [ 吞吐率:6.29req/s ] 内存消耗:4,614.36kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=e49eb0711996875e1a9ae34fd4537f61
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000932s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001555s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.001098s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.003053s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000597s ]
  6. SELECT * FROM `set` [ RunTime:0.000195s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000577s ]
  8. SELECT * FROM `article` WHERE `id` = 470435 LIMIT 1 [ RunTime:0.001433s ]
  9. UPDATE `article` SET `lasttime` = 1770448447 WHERE `id` = 470435 [ RunTime:0.009314s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 65 LIMIT 1 [ RunTime:0.003748s ]
  11. SELECT * FROM `article` WHERE `id` < 470435 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000636s ]
  12. SELECT * FROM `article` WHERE `id` > 470435 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.001943s ]
  13. SELECT * FROM `article` WHERE `id` < 470435 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.007439s ]
  14. SELECT * FROM `article` WHERE `id` < 470435 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.017695s ]
  15. SELECT * FROM `article` WHERE `id` < 470435 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.029837s ]
0.160566s