forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
fbb884bcbf
@ -384,7 +384,7 @@
|
||||
<includes>
|
||||
<include>**/*</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.config;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
@ -24,6 +25,9 @@ public class Knife4jConfiguration {
|
||||
|
||||
private final OpenApiExtensionResolver openApiExtensionResolver;
|
||||
|
||||
@Value("${app.version}")
|
||||
private String version;
|
||||
|
||||
|
||||
@Autowired
|
||||
public Knife4jConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
|
||||
@ -63,24 +67,20 @@ public class Knife4jConfiguration {
|
||||
|
||||
private ApiInfo apiInfo(){
|
||||
return new ApiInfoBuilder()
|
||||
.title("DataEase很棒~~~!!!")
|
||||
.license("杭州飞致云信息科技有限公司 1.0-b9")
|
||||
.description("人人可用的可视化工具")
|
||||
.termsOfServiceUrl("http://fit2cloud.com/")
|
||||
.title("DataEase")
|
||||
.description("人人可用的开源数据可视化分析工具")
|
||||
.termsOfServiceUrl("https://dataease.io")
|
||||
.contact(new Contact("fit2cloud","https://www.fit2cloud.com/dataease/index.html","dataease@fit2cloud.com"))
|
||||
.version("1.0")
|
||||
.version(version)
|
||||
.build();
|
||||
}
|
||||
|
||||
private Docket defaultApi(String groupName, String packageName) {
|
||||
List<SecurityScheme> securitySchemes=new ArrayList<>();
|
||||
securitySchemes.add(apiKey());
|
||||
List<SecurityContext> securityContexts = new ArrayList<>();
|
||||
securityContexts.add(securityContext());
|
||||
HttpAuthenticationScheme httpAuthenticationScheme = HttpAuthenticationScheme.JWT_BEARER_BUILDER
|
||||
.name(HttpHeaders.AUTHORIZATION)
|
||||
.description("Bearer Token")
|
||||
.build();
|
||||
securitySchemes.add(httpAuthenticationScheme);
|
||||
|
||||
Docket docket=new Docket(DocumentationType.OAS_30)
|
||||
.apiInfo(apiInfo())
|
||||
.groupName(groupName)
|
||||
@ -100,12 +100,16 @@ public class Knife4jConfiguration {
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiKey apiKey() {
|
||||
return new ApiKey("Authorization", "Authorization", "header");
|
||||
}
|
||||
|
||||
|
||||
List<SecurityReference> defaultAuth() {
|
||||
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
|
||||
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
|
||||
authorizationScopes[0] = authorizationScope;
|
||||
return CollectionUtil.newArrayList(new SecurityReference("BearerToken", authorizationScopes));
|
||||
return CollectionUtil.newArrayList(new SecurityReference("Authorization", authorizationScopes));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -828,7 +828,7 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
List<DatasetTableField> calcFields = datasetTableFieldMapper.selectByExample(datasetTableFieldExample);
|
||||
for (DatasetTableField ele : calcFields) {
|
||||
originField = originField.replaceAll("\\[" + ele.getId() + "]",
|
||||
String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), ele.getOriginName()));
|
||||
String.format(DorisConstants.KEYWORD_FIX, tableObj.getTableAlias(), ele.getDataeaseName()));
|
||||
}
|
||||
return originField;
|
||||
}
|
||||
|
@ -32,7 +32,9 @@ knife4j.setting.enableSwaggerModels=false
|
||||
knife4j.setting.enableDocumentManage=false
|
||||
knife4j.setting.enableSearch=false
|
||||
knife4j.setting.enableOpenApi=false
|
||||
knife4j.setting.enableAfterScript=false
|
||||
|
||||
app.version=@project.version@
|
||||
|
||||
logging.file.path=/opt/dataease/logs/${spring.application.name}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user