• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

$resource.save() AngularJS + Spring MVC

 
Ranch Hand
Posts: 499
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to use angularjs in my spring project. I tried saving data in my postgresql database using $resource.save but when I do this I get a warning

WARN http-nio-8080-exec-2 servlet.PageNotFound:1136 - No mapping found for HTTP request with URI [/api/test] in DispatcherServlet with name 'dispatcher'



Here are my codes

JS Services



JS Controller


Model


Java Controller



Java Service



Service Implementation



Repository



As mentioned in javascript controller, I have a module called User which works fine but this test doesn't work. User module was coded by some one else. I am using Java Configurations and not xml configurations. I am breaking my head over this issue over 3 days Please help me

Edit 1:
I am using
Spring 4.1.6
Tomcat 8.0
JDBCTemplate
Postgresql 9.4-1201-jdbc41
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It should be:

 
Partheban Udayakumar
Ranch Hand
Posts: 499
Spring AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jesus Angeles,

Thanks for you help. The actual issue was I had different names in factory($resource(appConfig.apiRootPath + 'roles/:id') and in repository(@RepositoryRestResource(path = "role", collectionResourceRel = "role")). So once you provide the correct name, it works as expected. Now the real issue is insertion of foreign key values. I will post it in a different topic.
 
You know it is dark times when the trees riot. I think this tiny ad is their leader:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic