Skip to content

Commit

Permalink
sync: hosted cloud (#1481)
Browse files Browse the repository at this point in the history
@coderabbitai ignore

---------

Signed-off-by: William Chan <root@williamchan.me>
Co-authored-by: Harry Yep <git@hode.co.uk>
Co-authored-by: William Chan <root@williamchan.me>
Co-authored-by: JaneSu <sujian@apitable.com>
Co-authored-by: Zoe <zhengxu@apitable.com>
Co-authored-by: Caedman Ziwen Lan <lanziwen@apitable.com>
Co-authored-by: Kilian <wangkailang@users.noreply.github.com>
Co-authored-by: Guofeng Chen <66124783+functionChenGuoFeng@users.noreply.github.com>
Co-authored-by: Chambers <chenbochao@vikadata.com>
Co-authored-by: ziqiang <zhaoziqiang@vikadata.com>
Co-authored-by: Alex (hufeng) <hufeng@vikadata.com>
Co-authored-by: Kelly Peilin Chan <kelly@apitable.com>
Co-authored-by: XuKecheng <wsad8254695@outlook.com>
Co-authored-by: chalme <pc.chalme@gmail.com>
Co-authored-by: Evie Wanmei Huang <37546178+wmEvie@users.noreply.github.com>
Co-authored-by: Michael Xiaoliang Chan <mcl_chan@sina.com>
Co-authored-by: chenguofeng <1508194634@qq.com>
Co-authored-by: ziqiang <1694392889@qq.com>
Co-authored-by: Kelvin Jiawen Pan <panjiawen@apitable.com>
Co-authored-by: Jeremy Yin <jeremyyin2012@gmail.com>
Co-authored-by: yanmingZhang <44792891+quppenge@users.noreply.github.com>
Co-authored-by: wangkailang <wangkailang@vikadata.com>
Co-authored-by: yechen <262000730@qq.com>
Co-authored-by: Michael Xiaoliang Chan <111508006+yo-ooiii@users.noreply.github.com>
Co-authored-by: Zoe <13400804+zoe-icu@users.noreply.github.com>
Co-authored-by: ShawnDeng <dengguiheng@aitable.ai>
Co-authored-by: Jover <joverzh@gmail.com>
  • Loading branch information
27 people committed Nov 27, 2023
1 parent 186300f commit 0a52d9e
Show file tree
Hide file tree
Showing 1,146 changed files with 18,272 additions and 11,236 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ api-codegen-test:
--additional-properties=npmVersion=0.0.1 \
--additional-properties=useObjectParameters=true --additional-properties=prependFormOrBodyParameters=true -o ./packages/api-client
cp -rf /tmp/api-client_package.json.bak packages/api-client/package.json
@echo "api client has been generated from integration"
pnpm run build:api-client



Expand All @@ -564,3 +566,5 @@ api-codegen-integration:
--additional-properties=npmVersion=0.0.1 \
--additional-properties=useObjectParameters=true --additional-properties=prependFormOrBodyParameters=true -o ./packages/api-client
cp -rf /tmp/api-client_package.json.bak packages/api-client/package.json
@echo "api client has been generated from integration"
pnpm run build:api-client
209 changes: 88 additions & 121 deletions backend-server/application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,116 +2,101 @@ import java.nio.charset.StandardCharsets
import java.time.LocalDateTime

plugins {
id 'org.springframework.boot'
id 'testing.java-conventions'
id 'idea'
id 'com.google.protobuf'
alias(libs.plugins.spring.dependency.management)
alias(libs.plugins.spring.boot)
alias(libs.plugins.protobuf)
}

dependencies {
// shard module dependencies
implementation project(':shared:core')

implementation project(':shared:starters:sms')
implementation project(':shared:starters:mail')
implementation project(':shared:starters:amqp')
implementation project(':shared:starters:oss')
implementation project(':shared:starters:socketio')
implementation project(':shared:starters:beetl')

annotationProcessor rootProject.ext.dependencies['configuration-processor']

implementation rootProject.ext.dependencies['spring-web-starter']
implementation rootProject.ext.dependencies['spring-webflux-starter']
implementation rootProject.ext.dependencies['spring-thymeleaf']
implementation rootProject.ext.dependencies['spring-mail-starter']
implementation rootProject.ext.dependencies['spring-actuator-starter']
implementation rootProject.ext.dependencies['spring-aop-starter']
implementation rootProject.ext.dependencies['spring-validation-starter']
implementation rootProject.ext.dependencies['spring-security-starter']
implementation rootProject.ext.dependencies['spring-integration-starter']
implementation rootProject.ext.dependencies['spring-integration-redis']
implementation rootProject.ext.dependencies['spring-thymeleaf-starter']
implementation(rootProject.ext.dependencies['spring-session-redis']) {
exclude group: 'io.lettuce', module: 'lettuce-core'
}
implementation('org.apache.commons:commons-pool2')
implementation rootProject.ext.dependencies['jedis']
implementation rootProject.ext.dependencies['spring-security-cas']
implementation rootProject.ext.dependencies['prometheus']
implementation rootProject.ext.dependencies['mybatis-plus-starter']
runtimeOnly rootProject.ext.dependencies['mysql']
implementation rootProject.ext.dependencies['easyexcel']
implementation rootProject.ext.dependencies['p6spy']
implementation rootProject.ext.dependencies['servlet-api']
implementation rootProject.ext.dependencies['hutool']
implementation rootProject.ext.dependencies['swagger2']
implementation rootProject.ext.dependencies['java-semver']
implementation rootProject.ext.dependencies['grpc-spring-boot']
implementation rootProject.ext.dependencies['grpc-server-spring-boot']
implementation rootProject.ext.dependencies['pdf']
implementation rootProject.ext.dependencies['sentry']
implementation(rootProject.ext.dependencies['spring-cloud-starter-sleuth']) {
exclude group: 'org.springframework.cloud', module: 'spring-cloud-sleuth-brave'
}
implementation rootProject.ext.dependencies['spring-cloud-sleuth-otel']
implementation rootProject.ext.dependencies['opentelemetry-exporter-jaeger']
implementation rootProject.ext.dependencies['okhttp3']
implementation rootProject.ext.dependencies['okhttp3-logging-interceptor']
implementation rootProject.ext.dependencies['rs-api']
implementation rootProject.ext.dependencies['gson-fire']
implementation rootProject.ext.dependencies['jackson-databind-nullable']
implementation rootProject.ext.dependencies['jsoup']
implementation rootProject.ext.dependencies['protobuf-java']
implementation rootProject.ext.dependencies['io-grpc']
implementation(rootProject.ext.dependencies['shedlock'])
implementation(rootProject.ext.dependencies['shedlock-redis'])
implementation rootProject.ext.dependencies['springdoc-openapi-ui']
implementation rootProject.ext.dependencies['knife4j-openapi3']

runtimeOnly rootProject.ext.dependencies['mysql']

annotationProcessor rootProject.ext.dependencies['lombok']
compileOnly rootProject.ext.dependencies['lombok']

testCompileOnly rootProject.ext.dependencies["lombok"]
testAnnotationProcessor rootProject.ext.dependencies["lombok"]

testImplementation rootProject.ext.dependencies['spring-test-starter']
testImplementation rootProject.ext.dependencies['mybatis-plus-starter-test']
testImplementation rootProject.ext.dependencies['visible-assertions']
testImplementation rootProject.ext.dependencies['mockito-inline']
testImplementation rootProject.ext.dependencies['okhttp3-mockwebserver']
testImplementation rootProject.ext.dependencies['reactor-test']

// for clock module
testImplementation rootProject.ext.dependencies['assertj']
testImplementation rootProject.ext.dependencies['awaitility']

// for enterprise
implementation rootProject.ext.dependencies['spring-plugin-core']
implementation rootProject.ext.dependencies['spring-plugin-metadata']

// for v-ee
implementation(rootProject.ext.dependencies['social-dingtalk'])
implementation(rootProject.ext.dependencies['social-feishu'])
implementation(rootProject.ext.dependencies['social-wecom'])
implementation(rootProject.ext.dependencies['social-qq'])
implementation rootProject.ext.dependencies['pingpp']
implementation(rootProject.ext.dependencies['aliyun-core'])
implementation(rootProject.ext.dependencies['aliyun-afs'])
implementation rootProject.ext.dependencies['nimbus']
implementation rootProject.ext.dependencies['jose4j']
// spring boot starters dependencies
implementation platform(libs.spring.boot.dependencies)
annotationProcessor libs.spring.boot.configuration.processor
implementation libs.spring.boot.web
implementation libs.spring.boot.webflux
implementation libs.spring.boot.mail
implementation libs.spring.boot.actuator
implementation libs.spring.boot.aop
implementation libs.spring.boot.validation
implementation libs.spring.boot.security
implementation libs.spring.boot.integration
implementation libs.spring.boot.thymeleaf
implementation libs.spring.integration.redis
implementation libs.spring.session.redis
implementation libs.mysql
runtimeOnly libs.mysql
implementation libs.spring.security.cas
annotationProcessor libs.lombok
compileOnly libs.lombok
implementation libs.commons.pool2
implementation libs.jedis
implementation libs.prometheus.pushgateway
implementation libs.servlet
implementation libs.bundles.okhttp3

// other spring boot starter dependencies
implementation libs.mybatis.plus
implementation libs.bundles.sentry
implementation libs.bundles.apidoc
implementation libs.bundles.grpc

// protobuf dependencies
implementation(platform(libs.protobuf.dependencies))
implementation(libs.protobuf.java)

// io-grpc dependencies
implementation(platform(libs.iogrpc.dependencies))
implementation libs.bundles.iogrpc

// utilities dependencies
implementation libs.p6spy
implementation libs.semver
implementation libs.javax.ws
implementation libs.gson.fire
implementation libs.jackson.databind.nullable
implementation libs.jsoup
implementation libs.bundles.easyexcel
implementation libs.bundles.hutool
implementation libs.bundles.pdfbox
implementation libs.bundles.shedlock

// for enterprise module
implementation libs.bundles.social
implementation libs.v.client
implementation libs.auth0
implementation libs.pingpp
implementation libs.stripe
implementation libs.aliyun.core
implementation libs.aliyun.afs
implementation libs.nimbus
implementation libs.jose4j
implementation files('lib/aegis-java-sdk-2.3.3.jar')
implementation(rootProject.ext.dependencies['wx-miniapp'])
implementation(rootProject.ext.dependencies['wx-mp'])
implementation(rootProject.ext.dependencies['wx-open'])
implementation(rootProject.ext.dependencies['v-client'])
implementation(rootProject.ext.dependencies['sensors'])
implementation(rootProject.ext.dependencies['posthog'])

// for apitable-ee
implementation(rootProject.ext.dependencies['auth0'])
implementation(rootProject.ext.dependencies['stripe'])
implementation libs.wx.miniapp
implementation libs.wx.mp
implementation libs.wx.open
implementation libs.sensors
implementation libs.posthog

// test framework dependencies
testCompileOnly libs.lombok
testAnnotationProcessor libs.lombok
testImplementation libs.spring.boot.test
testImplementation libs.mybatis.plus.test
testImplementation libs.visible.assertions
testImplementation libs.mockito.inline
testImplementation libs.okhttp3.mockwebserver
testImplementation libs.reactor
testImplementation libs.assertj
testImplementation libs.awaitility
}

jar {
Expand Down Expand Up @@ -145,33 +130,24 @@ bootJar {
// SpringBoot Plugin On Gradle
springBoot {
mainClass.set('com.apitable.Application')
// build-info.properties in resources/main/META-INF directory
buildInfo {
properties {
artifact = 'Api Server'
version = rootProject.version
group = rootProject.group
name = 'Api Server'
}
}
}

test {
// Stops test execution after the first failed test.
failFast = true
}

def protobufVersion = libs.versions.protobuf.asProvider().get()
def iogrpcVersion = libs.versions.iogrpc.get()

protobuf {
// use the specified version of protoc executable same as protobuf version in project
protoc {
artifact = "com.google.protobuf:protoc:${protobuf_java_version}"
}
generatedFilesBaseDir = "$projectDir/src/generated"
clean {
delete generatedFilesBaseDir
artifact = "com.google.protobuf:protoc:${protobufVersion}"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${io_grpc_version}"
artifact = "io.grpc:protoc-gen-grpc-java:${iogrpcVersion}"
}
}

Expand All @@ -181,12 +157,3 @@ protobuf {
}
}
}

idea {
module {
sourceDirs += file('src/generated/main/java')
sourceDirs += file('src/generated/main/grpc')
generatedSourceDirs += file('src/generated/main/java')
generatedSourceDirs += file('src/generated/main/grpc')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@

package com.apitable.asset.controller;

import java.util.Collections;
import java.util.List;

import javax.annotation.Resource;
import javax.validation.Valid;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;

import com.apitable.asset.enums.AssetType;
import com.apitable.asset.ro.AssetUploadCertificateRO;
import com.apitable.asset.ro.AssetUrlSignatureRo;
Expand All @@ -41,7 +32,12 @@
import com.apitable.shared.component.scanner.annotation.GetResource;
import com.apitable.shared.component.scanner.annotation.PostResource;
import com.apitable.shared.context.SessionContext;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
Expand Down Expand Up @@ -69,8 +65,9 @@ public ResponseData<String> getSignatureUrl(@RequestParam(value = "token") Strin
@PostResource(path = "/signatures", requiredLogin = false)
@Operation(summary = "Batch get asset signature url")
public ResponseData<List<AssetUrlSignatureVo>> getSignatureUrls(
@RequestBody final AssetUrlSignatureRo data) {
return ResponseData.success(iAssetUploadTokenService.getAssetUrlSignatureVos(data.getResourceKeys()));
@RequestBody final AssetUrlSignatureRo data) {
return ResponseData.success(
iAssetUploadTokenService.getAssetUrlSignatureVos(data.getResourceKeys()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
*
* @author Chambers
*/
package com.apitable.asset.controller;
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

import lombok.Data;

/**
* image DTO.
*/
@Data
public class ImageDto {

Expand Down
Loading

0 comments on commit 0a52d9e

Please sign in to comment.