理由:因新搭建了一个项目,完成之后需要检测代码进行评优。

过程:

1、环境配置: IDEA 2019 + Maven3.3.9 + sonarqube7.7 + JDK1.8 + MySQL5.7

2、参考链接:

>>> https://blog.csdn.net/weixin_40861707/article/details/82117232  >>>https://blog.csdn.net/wojiushiwo945you/article/details/100699885https://blog.csdn.net/wojiushiwo945you/article/details/100699885

两个结合一起查看,信息已经很全了。

3、配置过程:

sonar.propertis文件

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.jdbc.username=root
sonar.jdbc.password=root 
sonar.sorceEncoding=UTF-8

 

maven setting.xml文件

<profile>
        <id>sonar</id>
            <properties>
            <sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar</sonar.jdbc.url>
            <sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>
            <sonar.jdbc.username>root</sonar.jdbc.username>
            <sonar.jdbc.password>root</sonar.jdbc.password>
            <sonar.host.url>http://localhost:9000</sonar.host.url>
        </properties>
    </profile>

<activeProfiles> 
  <activeProfile>sonar</activeProfile> 

</activeProfiles>
View Code

相关文章:

  • 2022-01-13
  • 2022-01-04
  • 2021-10-01
  • 2021-04-16
  • 2021-07-17
  • 2021-06-14
  • 2021-05-30
  • 2021-10-19
猜你喜欢
  • 2020-05-27
  • 2021-10-26
  • 2021-06-21
  • 2021-04-20
  • 2021-10-09
相关资源
相似解决方案