Я пытаюсь внедрить Spring Web MVC с Swagger, но проблема в том, что я не мог получить модельную схему. У меня есть код с вопросом, которому дан удар. Я по следующей ссылке:Swagger implemetation Spring Web MVC не отображает модель Schema
http://raibledesigns.com/rd/entry/documenting_your_spring_api_with
проблема в том, что Форс UI показывали, но для запроса поста не показывали модель схемы.
pom.xml:
<dependency>
<groupId>com.mangofactory</groupId>
<artifactId>swagger-springmvc</artifactId>
<version>0.5.2</version>
</dependency>
Spring.xml:
<mvc:annotation-driven />
<context:component-scan base-package="com.ga" />
<mvc:default-servlet-handler />
<bean id="documentationConfig" class="com.mangofactory.swagger.configuration.DocumentationConfig" />
<context:property-placeholder location="classpath:spring/application.properties"
system-properties-mode="OVERRIDE" />
Заказчик Controller.java:
@Api(value="CustomerController",description="Customer Controller")
@RestController
public class CustomerController {
@ApiOperation(value="save",notes="These Method is used to Save all Customer Details with its Deployment ")
@RequestMapping(value = "/save", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Customer> saveCustomerDetails(@RequestBody Customer customer) throws CustomerException {
}
}
свойства Применение:
documentation.services.version=1.0
documentation.services.basePath=http://localhost:9090/XYZ