All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.shoulder.security.code.img.ImageCode Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.2
Show newest version
package org.shoulder.security.code.img;


import com.fasterxml.jackson.annotation.JsonIgnore;
import org.shoulder.code.dto.ValidateCodeDTO;

import java.awt.image.BufferedImage;
import java.time.Duration;
import java.time.LocalDateTime;


/**
 * 图片验证码
 *
 * @author lym
 */
public class ImageCode extends ValidateCodeDTO {

    @JsonIgnore
    private transient BufferedImage image;

    public ImageCode(BufferedImage image, String code, Duration expireIn) {
        super(code, expireIn);
        this.image = image;
    }

    public ImageCode(BufferedImage image, String code, LocalDateTime expireTime) {
        super(code, expireTime);
        this.image = image;
    }

    public BufferedImage getImage() {
        return image;
    }

    public void setImage(BufferedImage image) {
        this.image = image;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy