简体中文 | English
My personal assistant.
The purpose of the project is to integrate all the back-end services I need in daily work and life. Furthermore, in this project, I will practice the skills I learned and accumulate some useful code snippets.
Note!
A completely private project, forking is not recommended.
- Spring Boot
- Maven
- MySQL
- JpaRepository
- Dozer
- SLF4J
- Swagger
- Batch processing
- Redis
- Scheduled Task
- Freemarker
- Selenium
- Lombok
- AdminLTE
- Under the package
com.quanqinle.myassistant.biz.batchjob
, there is an implementation reading data from CVS and writing to DB - In config file, set
spring.batch.job.enabled
to open or shutdown the batch job
RedisChannelListenerConf.java
: achieve Channel Subscribe, set Listener
- In the config file, set
@EnableScheduling
to open or shutdown Scheduled Task ScheduledTaskService.java
: achieve Scheduled Task, use cron to set the timing period
Change from Swagger UI
method to springfox-swagger
method.
Swagger UI
needs to maintain sample.json, I don't like this! To use springfox-swagger
, just to add annotations in codes. That sounds great!
- visit webui:
http://localhost:8080/swagger-ui.html
- access json:
http://localhost:8080/v2/api-docs
Repository by default exposes REST APIs which we can visit through url/tablename+s/ , such as, http://localhost:8080/chineseRegions
I'm not a big fun of front-end development, so I would prefer to choose the tech which can render HTML page by a server. (At least till 2021.07.22)
Try out this front-end UI framework AdminLTE (on GitHub)
I use DataTables to create table, DataTables
has two usages as below:
-
Client-side processing - where filtering, paging and sorting calculations are all performed in the web-browser.
- serverSide=false (By default, more detail to see the Manual)
- queryAll() in EnglishWordController.java
- /pages/english/list.html
-
Server-side processing - where filtering, paging and sorting calculations are all performed by a server. It is useful when working with large data sets (typically > 50000 records)
- serverSide=true
- getList2() in EnglishWordController.java
- /pages/english/list2.html
Demos in DynastyServiceImpl.java
and DynastyVO.java