如何解决如何在没有控制器的情况下使用Springfox生成Open API JSON
我正在使用Spring Cloud开发一个Azure Functions应用程序。因此,我的应用程序中没有控制器,也没有Spring Web。我当前的依赖项是:
dependencies {
/* Spring Cloud Azure Function */
implementation group: 'org.springframework.cloud',name: 'spring-cloud-function-adapter-azure',version: '3.0.10.RELEASE'
implementation group: 'org.springframework.cloud',name: 'spring-cloud-starter-function-web',version: '3.0.10.RELEASE'
/* Test */
testImplementation group: 'org.springframework.boot',name: 'spring-boot-starter-test',version: '2.3.4.RELEASE',{ exclude group: 'junit',module: 'junit' }
testImplementation group: 'org.junit.jupiter',name: 'junit-jupiter-api',version: '5.7.0'
testRuntimeOnly group: 'org.junit.jupiter',name: 'junit-jupiter-engine',version: '5.7.0'
/* Azure Service Bus */
compile group: 'com.microsoft.azure',name: 'azure-servicebus',version: '3.4.0'
//implementation group: 'com.azure',name: 'azure-messaging-servicebus',version: '7.0.0-beta.6'
/* Jackson */
implementation group: 'com.fasterxml.jackson.datatype',name: 'jackson-datatype-jsr310',version: '2.11.3'
/* Bean Validation */
compile group: 'org.hibernate',name: 'hibernate-validator',version: '6.1.6.Final'
compile group: 'org.glassfish',name: 'javax.el',version: '3.0.0'
/* Database */
compile group: 'org.springframework.data',name: 'spring-data-jpa',version: '2.3.4.RELEASE'
compile group: 'org.springframework.boot',name: 'spring-boot-starter-jdbc',version: '2.3.4.RELEASE'
compile group: 'javax.persistence',name: 'javax.persistence-api',version: '2.2'
compile group: 'org.hibernate',name: 'hibernate-entitymanager',version: '5.4.22.Final'
compile group: 'org.postgresql',name: 'postgresql',version: '42.2.18'
/* HTTP Client */
implementation group: 'com.mashape.unirest',name: 'unirest-java',version: '1.4.9'
}
我想使用Springfox 3为我的HttpTrigger函数生成Open API json。可能吗?怎么样?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。