mirror of
https://github.com/moshowgame/SpringBootCodeGenerator.git
synced 2026-03-22 07:28:25 +08:00
fixup some wrong word
This commit is contained in:
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
* Created by by-health on '${.now?string('yyyy-MM-dd HH:mm:ss')}'.
|
||||
*/
|
||||
@Controller
|
||||
public class ConfController {
|
||||
public class ${classInfo.className}Controller {
|
||||
|
||||
@Resource
|
||||
private ${classInfo.className}Service ${classInfo.className?uncap_first}Service;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import org.springframework.stereotype.RestController;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.ExampleMatcher;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -35,7 +35,8 @@ public class ${classInfo.className}Controller {
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public Object delete(int id){
|
||||
return ${classInfo.className?uncap_first}Respository.deleteById(id);
|
||||
${classInfo.className?uncap_first}Respository.deleteById(id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,11 +62,11 @@ public class ${classInfo.className}Controller {
|
||||
;
|
||||
|
||||
//创建实例
|
||||
Example<${classInfo.className}> ex = Example.of(${classInfo.className?uncap_first}, matcher);
|
||||
Example<${classInfo.className}> example = Example.of(${classInfo.className?uncap_first}, matcher);
|
||||
//分页构造
|
||||
Pageable pageable = PageRequest.of(pageNumber,pageSize);
|
||||
|
||||
return ${classInfo.className?uncap_first}Respository.findAll(matcher, pageable);
|
||||
return ${classInfo.className?uncap_first}Respository.findAll(example, pageable);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.springframework.stereotype.Repository;
|
||||
* Created by by-health on '${.now?string('yyyy-MM-dd HH:mm:ss')}'.
|
||||
*/
|
||||
@Repository
|
||||
public interface ${classInfo.className}Respotory extends JpaRepository<${classInfo.className},Integer> {
|
||||
public interface ${classInfo.className}Respository extends JpaRepository<${classInfo.className},Integer> {
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user