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

com.itxiaoer.commons.sample.jpa.service.UserService Maven / Gradle / Ivy

package com.itxiaoer.commons.sample.jpa.service;

import com.itxiaoer.commons.jpa.service.BasicJpaService;
import com.itxiaoer.commons.sample.jpa.dto.UserDto;
import com.itxiaoer.commons.sample.jpa.entity.User;
import com.itxiaoer.commons.sample.jpa.repository.UserRepository;
import org.springframework.stereotype.Service;

import java.util.UUID;
import java.util.function.BiConsumer;

/**
 * @author : liuyk
 */
@Service
public class UserService extends BasicJpaService {

    @Override
    public BiConsumer consumer() {
        return (dest, source) -> dest.setId(UUID.randomUUID().toString());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy