Intellij

import com.thomasjwilde.dynamic_spring.DynamicRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ${EntityName}Repository extends DynamicRepository<${EntityName}, ${IdType}> {

}
import com.thomasjwilde.dynamic_spring.services.DynamicSearchService;
import org.springframework.stereotype.Service;

@Service
public class ${EntityName}Service  extends DynamicSearchService<${EntityName}, ${IdType}, ${EntityName}Repository> {

}
import com.thomasjwilde.dynamic_spring.BaseController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/${EntityName}")
public class ${EntityName}Controller extends BaseController<${EntityName}, Long, ${EntityName}Service> {

}
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface ${EntityName}Mapper {

    ${EntityName}Mapper INSTANCE = Mappers.getMapper(${EntityName}Mapper.class);

    ${EntityName} toEntity(${EntityName}DTO dto);
    List<${EntityName}> toEntityList(List<${EntityName}DTO> dtoList);

}

Comments