All Projects → donhui → Sonar Mybatis

donhui / Sonar Mybatis

Licence: other
MyBatis Plugin for SonarQube: Rules to check SQL statements in MyBatis Mapper XML files

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Sonar Mybatis

Goodskill
🐂基于springcloud +dubbo构建的模拟秒杀项目,模块化设计,集成了分库分表、elasticsearch🔍、gateway、mybatis-plus、spring-session等常用开源组件
Stars: ✭ 786 (+2435.48%)
Mutual labels:  mybatis
Vertx Embedded Springboot
Vert.x embeded Springboot
Stars: ✭ 19 (-38.71%)
Mutual labels:  mybatis
Mybatis Tools
Stars: ✭ 14 (-54.84%)
Mutual labels:  mybatis
Newbee Mall
🔥 🎉newbee-mall 项目(新蜂商城)是一套电商系统,包括 newbee-mall 商城系统及 newbee-mall-admin 商城后台管理系统,基于 Spring Boot 2.X 及相关技术栈开发。 前台商城系统包含首页门户、商品分类、新品上线、首页轮播、商品推荐、商品搜索、商品展示、购物车、订单结算、订单流程、个人订单管理、会员中心、帮助中心等模块。 后台管理系统包含数据面板、轮播图管理、商品管理、订单管理、会员管理、分类管理、设置等模块。
Stars: ✭ 8,319 (+26735.48%)
Mutual labels:  mybatis
Docker Sonarqube
🐳 SonarQube in Docker
Stars: ✭ 894 (+2783.87%)
Mutual labels:  sonarqube
Sonarondocker
🐳 📡 Docker way of running SonarQube + any DB
Stars: ✭ 25 (-19.35%)
Mutual labels:  sonarqube
Sonarqube Community Branch Plugin
A plugin that allows branch analysis and pull request decoration in the Community version of Sonarqube
Stars: ✭ 775 (+2400%)
Mutual labels:  sonarqube
Webpersonal
WebPersonal 是基于 Spring Boot + Vue Admin Template 搭建的个人网站,采用Docker容器化部署。包括个人简历、权限管理、相册等功能,持续更新,您的 Star⭐,就是我最大的动力(●'◡'●)
Stars: ✭ 28 (-9.68%)
Mutual labels:  mybatis
Webside
基于RBAC的完全响应式权限管理系统
Stars: ✭ 19 (-38.71%)
Mutual labels:  mybatis
Ssm redis template
An template based on Maven, using Spring + Spring MVC + mybatis + spring-data-redis frames. It can be used to construct a new Java Web Appliaction quickly
Stars: ✭ 13 (-58.06%)
Mutual labels:  mybatis
Geek Framework
基于SpringBoot+Shiro+Redis+Jwt+Thymeleaf+MyBatis 开发的后台用户、角色、权限、会员管理、RestFul、Token和前台用户登录注册以及前后台用户分离的脚手架,技术交流请加QQ群:805442966
Stars: ✭ 804 (+2493.55%)
Mutual labels:  mybatis
Flyapi
基于SSM layui 开发的多人博客系统,目标在于让每个人都能精准阅读和专注写作。
Stars: ✭ 16 (-48.39%)
Mutual labels:  mybatis
Twjitm
项目基于idea工作环境搭建的框架,添加mybatis3,spring4,springmvc4,以及redis。主要实现通过注解和反射自定义netty私有协议栈,实现在一条socket通道上传递不同的消息,采用支持tcp,udp和http协议
Stars: ✭ 26 (-16.13%)
Mutual labels:  mybatis
Springbootexamples
Spring Boot 学习教程
Stars: ✭ 794 (+2461.29%)
Mutual labels:  mybatis
Sonar Scm Tfvc
SonarQube integration for Team Foundation Version Control
Stars: ✭ 15 (-51.61%)
Mutual labels:  sonarqube
Mapper
Mybatis Common Mapper - Easy to use
Stars: ✭ 6,680 (+21448.39%)
Mutual labels:  mybatis
Ansible Role Sonarqube
Ansible Role: SonarQube
Stars: ✭ 22 (-29.03%)
Mutual labels:  sonarqube
V5cmsjava
Spring+SpringMVC+Spring Data JPA+FreeMarker+Bootstarp(master分支),mybatis分支ORM使用的是MyBatis。
Stars: ✭ 29 (-6.45%)
Mutual labels:  mybatis
Ruoyi
(RuoYi)官方仓库 基于SpringBoot的权限管理系统 易读易懂、界面简洁美观。 核心技术采用Spring、MyBatis、Shiro没有任何其它重度依赖。直接运行即可用
Stars: ✭ 905 (+2819.35%)
Mutual labels:  mybatis
Springbootunity
rabbitmq、redis、scheduled、socket、mongodb、Swagger2、spring data jpa、Thymeleaf、freemarker etc. (muti module spring boot project) (with spring boot framework,different bussiness scence with different technology。)
Stars: ✭ 845 (+2625.81%)
Mutual labels:  mybatis

Build Status SonarCloud Status GitHub release (latest by date) GitHub All Releases HitCount

README 中文版

SonarQube MyBatis Plugin

MyBatis Plugin for SonarQube: Rules to check SQL statements in MyBatis Mapper XML files.

What is Risk SQL?

Risk SQL is that in the mybatis mapper file, there are some dynamic SQL, such as <if test=""></if> elements of Mapper file, if all parameters in the SQL statement elements of Mapper XML file are null , the SQL may at great risk.

an example as follows:

DELETE FROM table_name
WHERE 1=1
<if test="startTime != null">
    AND start_time <![CDATA[=]]> #{startTime}
</if>
<if test="endTime != null">
    AND end_time <![CDATA[=]]> #{endTime}
</if>

MyBatis Rules

There are 7 built-in mybatis rules, which select statement has three rules, update and delete statement has two rules.

mybatis-rules

How to install it?

There are two options to install a plugin into SonarQube:

  • Marketplace - Installs plugins automatically, from the SonarQube UI.
  • Manual Installation - You'll use this method if your SonarQube instance doesn't have access to the Internet.

Marketplace

If you have access to the Internet and you are connected with a SonarQube user having the Global Permission "Administer System", you can go to Administration > Marketplace.

  • Find the plugin by search mybatis
  • Click on Install and wait for the download to be processed

Once download is complete, a "Restart" button will be available to restart your instance.

Manual Installation

The plugin can be downloaded from github release .

Put the downloaded jar in $SONARQUBE_HOME/extensions/plugins, removing any previous versions of the same plugins.

Once done, you will need to restart your SonarQube Server.

How to Use it?

There is an example of using maven build command:

mvn clean compile -U -Dmaven.test.skip=true -Dmaven.javadoc.skip=true sonar:sonar -Dsonar.host.url=http://127.0.0.1:9000/ -Dsonar.projectKey=demo -Dsonar.projectName=demo -Dsonar.sourceEncoding=UTF-8 -Dsonar.sources=. -Dsonar.inclusions=src/main/** -Dsonar.exclusions==src/main/webapp/**

To analysis mybatis mapper file, src/main/resources dir must be in sonar.sources.

Support Global Stmt ID Exclude

For special issues of statements, if you want ignore them, you can put the statement id with namespace into the global stmt id exclude list.

stmt-id-exclude

Skip MyBatis Sensor

If you want to skip mybatis sensor sometimes, you can change the global properties sonar.mybatis.skip to true or add the parameter in the command: -Dsonar.mybatis.skip=true .

Contribute

Please report bugs and feature requests at https://github.com/donhui/sonar-mybatis/issues.

Or you can submit pull requests for fix bugs or create new features, any contribution is welcome.

Stargazers over time

Stargazers over time

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].