腾讯云是免费的, 但有额度, 貌似100万请求来着… 做个追剧更新爬虫什么的自用 还是可以的!
开始:
创建API key
https://console.cloud.tencent.com/cam/capi
(貌似不需要这一步,因为后面暂时用不到)
创建云函数
打开
https://console.cloud.tencent.com/scf/list?rid=8&ns=default
点创建云函数, 选java平台
打开IDEA 创建Gradle java工程
next next … finish
修改build.gradle
创建完成后 添加 sdk以及打包zip脚本, 等会要打包提交到服务器
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile('com.tencentcloudapi:scf-java-events:0.0.1')
// compile fileTree(dir: 'jars', include: '*.jar')
}
apply plugin: 'java'
task buildZip(type: Zip) {
from compileJava
from processResources
into