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

html - Difficulties with background-image property -

bitbucket - How to automate building and deploying Jekyll site to webserver via FTP -

ios - Segue not passing data between ViewControllers -