captcha-spring-boot-starter

Demo project for Spring Boot

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.github.ducheng
ArtifactId

ArtifactId

captcha-spring-boot-starter
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

captcha-spring-boot-starter
Demo project for Spring Boot
Project URL

Project URL

https://github.com/ducheng/captcha-spring-boot-starter
Source Code Management

Source Code Management

https://github.com/ducheng/captcha-spring-boot-starter

Download captcha-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.ducheng/captcha-spring-boot-starter/ -->
<dependency>
    <groupId>com.github.ducheng</groupId>
    <artifactId>captcha-spring-boot-starter</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.ducheng/captcha-spring-boot-starter/
implementation 'com.github.ducheng:captcha-spring-boot-starter:0.0.3'
// https://jarcasting.com/artifacts/com.github.ducheng/captcha-spring-boot-starter/
implementation ("com.github.ducheng:captcha-spring-boot-starter:0.0.3")
'com.github.ducheng:captcha-spring-boot-starter:jar:0.0.3'
<dependency org="com.github.ducheng" name="captcha-spring-boot-starter" rev="0.0.3">
  <artifact name="captcha-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.ducheng', module='captcha-spring-boot-starter', version='0.0.3')
)
libraryDependencies += "com.github.ducheng" % "captcha-spring-boot-starter" % "0.0.3"
[com.github.ducheng/captcha-spring-boot-starter "0.0.3"]

Dependencies

compile (6)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar
com.google.guava : guava jar 28.1-jre
org.apache.commons : commons-lang3 jar
com.alibaba : fastjson jar 1.2.62
cn.hutool : hutool-all jar 5.2.3
org.springframework.boot : spring-boot-configuration-processor Optional jar

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar

Project Modules

There are no modules declared in this project.

captcha-spring-boot-starter

返回自定义验证码

  1. 使用方式maven 依赖 ,已成功发布到maven中央仓库
com.github.ducheng captcha-spring-boot-starter 0.0.1
  1. 使用测试类

    @GetMapping("/index") @ReturnCaptcha(codeNumber = 6,disturbLinesize = 60) public Captcha getindex() { return Captcha.LINE; }

注意不能和@RestController 一起使用

Captcha 是一个枚举,有三种 可以 选择验证码的干扰方式 LineCaptcha 线段干扰 (line) CircleCaptcha 圆圈干扰(circle),ShearCaptcha 扭曲干扰(shear) 对应的四个属性 // 长、 int lengSize() default 200;

// 宽、
int widhSize() default 100;

// 验证码字符数、
int codeNumber() default 4;

// 干扰线宽度
int disturbLinesize() default 4;

image

Versions

Version
0.0.3
0.0.2
0.0.1