我一直在使用swagger4spring-web库,它似乎有一些特殊的错误(如忘记指定控制器方法的请求方法时抛出selectedIndex
。)
我虽然坚持不懈但没有任何摇晃/随意添加或删除属性似乎可以修复它。
当我点击我的from azure.storage.blob import BlobService
import pandas as pd
import os.path
STORAGEACCOUNTNAME= 'account_name'
STORAGEACCOUNTKEY= "key"
LOCALFILENAME= 'path/to.csv'
CONTAINERNAME= 'container_name'
BLOBNAME= 'bloby_data/000000_0'
blob_service = BlobService(account_name=STORAGEACCOUNTNAME, account_key=STORAGEACCOUNTKEY)
# Only get a local copy if haven't already got it
if not os.path.isfile(LOCALFILENAME):
blob_service.get_blob_to_path(CONTAINERNAME,BLOBNAME,LOCALFILENAME)
df_customer = pd.read_csv(LOCALFILENAME, sep='\t')
端点时,我得到500:
ArrayIndexOutOfBoundsException
这是我的控制器类:
/api/resourceList
这是唯一的控制器类。当我注释掉那些昂首阔步的注释时,我只是在java.lang.StackOverflowError
at scala.collection.LinearSeqOptimized$class.reduceRight(LinearSeqOptimized.scala:131)
at scala.collection.immutable.List.reduceRight(List.scala:84)
at scala.collection.LinearSeqOptimized$class.reduceRight(LinearSeqOptimized.scala:131)
at scala.collection.immutable.List.reduceRight(List.scala:84)
at scala.collection.LinearSeqOptimized$class.reduceRight(LinearSeqOptimized.scala:131)
at scala.collection.immutable.List.reduceRight(List.scala:84)
... (many more lines)
中得到一个空数组(如预期的那样)。
我正在使用package com.onezork.frobozz.api;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.onezork.frobozz.ServiceIdentity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.time.Instant;
@Controller
@Api("healthcheck")
@RequestMapping(value = "/healthcheck")
public class HealthCheckApi {
private final Instant startTime = Instant.now();
@RequestMapping(value = "/", method = RequestMethod.GET)
@ApiOperation("/")
@ResponseBody
public String healthcheck() {
return ServiceIdentity.getMyHostname() + " running for " +
(Instant.now().getEpochSecond() -
startTime.getEpochSecond())+ " seconds";
}
}
0.3.5,/api/resourceList
4.1.6.RELEASE,java 8,tomcat-maven-plugin 1.1来运行它。
修改
当 工作时,当且仅当我修改我的类上的注释时才会这样:
swagger4spring-web
我不知道为什么。
编辑#2
我认为我需要更清楚地说明问题:
spring-*
以获取swagger文档