spring-restdocs is not recognizing apply() -


i trying generate rest api documentation based on spring-restdocs

in following code getting compile time error @ apply()

the method apply(restdocumentationmockmvcconfigurer) undefined type defaultmockmvcbuilder

@contextconfiguration(locations = { "classpath:/testapplicationrestservice.xml" }) @runwith(springjunit4classrunner.class) @webappconfiguration public class customercontrollertest {      @rule     public final restdocumentation restdocumentation = new restdocumentation(             "build/generated-snippets");      @autowired     private webapplicationcontext context;     private mockmvc mockmvc;      @before     public void setup() {          this.mockmvc = mockmvcbuilders.webappcontextsetup(this.context)                 .apply(documentationconfiguration(this.restdocumentation))                 .build();     }  } 

spring rest docs requires spring franework 4.1 or later. apply method new in spring framework 4.1. compile failure means have earlier version on classpath. should update pom.xml or build.gradle ensure you're using required version.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -