Sample projects for various language in programing
[toc]
- 1.1 Springboot with Swagger
spring-with-swagger
启动程序,访问http://127.0.0.1:8080/swagger-ui.html
The Best APIs
https://swagger.io/
-
1.2 Springboot with Kotlin
spring-with-Kotlin
Kotlin和Java混合编程 -
1.3 Springboot with security
spring-with-security
Springboot权限控制 -
1.4 Springboot support Spring batch
spring-batch -
1.5 Springboot webservice sampel program**
spring-web
配置文件 application.properties
# spring application config
spring.application.name=webservice-template
spring.profiles.active=${spring.profiles.active}
server.context-path=/
server.port=${port}
# mybatis mapper config
mybatis.mapper-locations=classpath*:mapper/**Mapper.xml
# guava memory cache config
guava.cache.maximumSize=1000
guava.cache.duration=1
# DAYS |HOURS |MINUTES |SECONDS |MILLISECONDS |MICROSECONDS |NANOSECONDS
guava.cache.unit=DAYS
数据库配置 application-{spring.profiles.active}.properties
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://${host}:${port}/${database}
spring.datasource.username=${username}
spring.datasource.password=${password}
spring.datasource.max-idle=50
spring.datasource.max-wait=10000
spring.datasource.min-idle=10
spring.datasource.initial-size=10
Profile
DEV:使用内嵌Tomcat容器启动
PROD:不打包内嵌Tomcat,打包为war放到Jetty中启动
pom.xml
Swagger APIs
SwaggerConfig
Guava memory cache
UserService
- 2.1 Python scrapy sample program
tutorial
> cd tutorial
> scrapy crawl quotes
- 2.2 拉勾网职位信息
lagou
> cd lagou
> scrapy crawl lagouposition
> head ./lagou.csv
- 2.3 豆瓣文章信息
doubanbook
> cd doubanbook
> scrapy crawl dbbook
> head ./douban.csv
- 2.4 城市编码
citycode
> cd citycode
> scrapy crawl city
> head ./city.csv
- 2.5 甲级医院信息 hospital
> cd hospitalcrawler
> scrapy crawl hospital
> head ./hospital.csv
- 2.6 学校信息 school
> cd schoolcrawler
> scrapy crawl school
> head ./school.csv
- 3.1 查看被删的微信好友
wechat-deleted-friends
-
4.1 Wordcount
Wordcount -
4.2 Log Analysis
calllog-analysis
-
5.1 Streaming-Wordcount With Socket
Streaming-wordcount -
5.2 Streaming-Wordcount With Kafka
Streaming-kafka -
5.3 Streaming-Window operation
Streaming-window
-
6.1 HBase Bulk load via Spark
CreateAndBulkloadHFile.scala -
6.2 HBase Bulk load via Flink
// todo
- 7.1 Quartz demo
quartz-in-action
- 8.1 Grpc Demo grpc-in-action