模糊搜索 和 分页
以下例子主要使用了秀川在csdn上面的例子:springboot jpa 多条件查询(多表)
1.在controller包中创建了DefaultController:
1 | import org.springframework.stereotype.Controller; |
2.CurdController:
1 | import com.chanchifeng.curd.model.User; |
3.UserRepository
1 | import com.chanchifeng.curd.model.User; |
4.UserServiceImpl:
1 | import com.chanchifeng.curd.model.User; |
5.UserService:
1 | import com.chanchifeng.curd.model.User; |
6.修改在templates中的curd文件夹中的index.html
1 |
|
7.修改在templates下的index.html:
1 |
|
8.在浏览器中输入http://localhost:8080/curd/curdController/queryAll,测试功能模块,效果图如下:
上传文件
以下例子主要使用了gnail_oug在csdn上面的例子:Spring Boot教程(十三):Spring Boot文件上传
a.在controller包中创建UploadAction:
1 | import org.springframework.stereotype.Controller; |
b.templates下创建file文件夹,在其内创建index.html
1 |
|
github:SpringBoot-JPA