java - How to Solve the error "package org.springframework.web.bind.annotation does not exist" -


jagadeesh-gs-macbook:contact jagadeeshgundlapalle$ gradle :help  welcome gradle 2.2.1.  run build, run gradle <task> ...  see list of available tasks, run gradle tasks  see list of command-line options, run gradle --help  build successful  total time: 16.4 secs jagadeesh-gs-macbook:contact jagadeeshgundlapalle$ gradle jar :compilejava /users/jagadeeshgundlapalle/documents/workspace3/contact/src/main/java/gurukul/contactlistcontroller.java:4: package org.springframework.web.bind.annotation not exist import org.springframework.web.bind.annotation.requestmapping;                                               ^ /users/jagadeeshgundlapalle/documents/workspace3/contact/src/main/java/gurukul/contactlistcontroller.java:5: package org.springframework.web.bind.annotation not exist import org.springframework.web.bind.annotation.requestparam;                                               ^ /users/jagadeeshgundlapalle/documents/workspace3/contact/src/main/java/gurukul/contactlistcontroller.java:6: package org.springframework.web.bind.annotation not exist import org.springframework.web.bind.annotation.restcontroller;                                               ^ /users/jagadeeshgundlapalle/documents/workspace3/contact/src/main/java/gurukul/contactlistcontroller.java:9: cannot find symbol symbol: class restcontroller @restcontroller  ^ /users/jagadeeshgundlapalle/documents/workspace3/contact/src/main/java/gurukul/contactlistcontroller.java:14: cannot find symbol symbol  : class requestmapping location: class gurukul.contactlistcontroller     @requestmapping("/getlist")      ^ 5 errors :compilejava failed  failure: build failed exception.  * went wrong: execution failed task ':compilejava'. > compilation failed; see compiler error output details.  * try: run --stacktrace option stack trace. run --info or --debug option more log output.  build failed  total time: 11.53 secs 

add spring-web.jar dependecies:

org.springframework:spring-web:<your spring version>.release 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -