2

Currently trying to implement angular js with spring mvc

Tried to implement the sample project springmvc-angularjs-master from the site-https://github.com/xvitcoder/spring-mvc-angularjs , not sure how to use the folder structure of this sample project into a spring project.

i read the thread - Spring MVC and Angularjs but still could not find the solution. Do i need to create new folder webapp under the src folder in the web application?

can someone help me how to convert this sample project into spring web application? i am not using maven and using simple web application with spring capabilites in myeclipse ide.

Current project folder structure:

SampleApp

-src

  --controller,bean folders

-webroot

 --webinf
     ---web.xml,springmvc.xml
     ---html folder(index.html,etc.,)
 --resources
     ---js
         ----app.js,services.js,controller.js and lib folder

1 Answer 1

2

You should be able to import the project as Maven project (Import > Maven > Existing MavenProject) and run it as is. All of the necessary mappings can be found in /src/main/webapp/WEB-INF/spring/webapp-config.xml

Once you have your head wrapped around that, you should be able to extract what you need.

I also noticed some of the @override annotations were throwing some errors. I just removed them.

Sign up to request clarification or add additional context in comments.

11 Comments

Thanks.followed the steps as mentioned but could not figure out the problem. so tried out a new approach -backend using spring mvc restful with jackson and front end with angular js seed project. created the restful application using the link - "mkyong.com/webservices/jax-rs/json-example-with-jersey-jackson" and it works by hitting the url as mentioned in demo, but on integrating with angular js it did not work. i dont know how to continue as i messed up the code. can you please give some links using angular js with spring mvc?
Sure. Give me a couple hours.
Are you using Spring Tool Suite?
i tried calling the request mapping from services.js of angular class... request itself not processing.. actually i need to create something like this as in the link "github.com/teunh/jfall2012", but request itself not going..
Try to get this example running: codetutr.com/2013/04/09/…
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.