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

com.iqiny.silly.spring.spel.field.SillyUuidMethodValuesField Maven / Gradle / Ivy

/*
 *  Copyright  iqiny.com
 *
 *  https://gitee.com/iqiny/silly
 *
 *  project name:silly-spring
 *  project description:top silly project pom.xml file
 */
package com.iqiny.silly.spring.spel.field;

import com.iqiny.silly.core.config.property.valuesfield.BaseSillyMethodPropertyValuesField;
import com.iqiny.silly.core.savehandle.SillyOnceSourceData;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * Uuid方法
 */
@Component
public class SillyUuidMethodValuesField extends BaseSillyMethodPropertyValuesField {

    public static final String NAME = "uuid";

    @Override
    public String fieldName() {
        return NAME;
    }

    @Override
    protected Class[] getParameterTypes(SillyOnceSourceData data) {
        return new Class[]{};
    }

    public static String uuid() {
        return UUID.randomUUID().toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy