Version 1.8: Added jakarta support
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.example.demo.controller;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
|
||||
/**
|
||||
* Generated by Springboot-3layer-Generator at Jan 23, 2023, 9:55:04 AM
|
||||
*/
|
||||
public interface CrudController<O,P>{
|
||||
|
||||
@PostMapping
|
||||
ResponseEntity<O> create(O object);
|
||||
|
||||
@PutMapping
|
||||
ResponseEntity<O> update(O object);
|
||||
|
||||
@PostMapping("find")
|
||||
ResponseEntity<Page<O>> read(O object, Integer page, Integer size);
|
||||
@GetMapping("{id}")
|
||||
ResponseEntity<O> readOne(P primaryKey);
|
||||
|
||||
@DeleteMapping
|
||||
void delete(P primaryKey);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.example.demo.serviceInterface;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
/**
|
||||
* Generated by Springboot-3layer-Generator at Jan 23, 2023, 9:55:04 AM
|
||||
*/
|
||||
public interface CrudService<E,P> {
|
||||
|
||||
E create(E entity);
|
||||
|
||||
E update(E entity);
|
||||
|
||||
Page<E> read(E entity, Pageable pageable);
|
||||
E readOne(P primaryKey);
|
||||
|
||||
void delete(P primaryKey);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user