if i dont misunderstand about your question, you want to connect the second 
method in your this control.
ingore the syntax error. your Controller has a requestmapping with 
/example, if there has a method haven't setting a requestmapping value, the 
way you want to access the second method is /example. the method of 
RequestMethod.get is not a must. you can delete it if you dont want to 
restrict the connection. 

qckat於 2016年8月31日星期三 UTC+8下午8時27分47秒寫道:
>
> I'm considering the following situation:
>
> There is an angular REST service defined like this:
>
> app.factory('example', function ($resource) {
>     return $resource('example/:id', {}, {
>         'doSomething': {method :'POST', url: 'example/doSomething/:id'},
>     });
> });
>
>
> It's connecting with some spring Controller, let's say defined like this:
>
> @Controller
> @RequestMapping("/example")
> public class Controller {
>
>
> //first method
> @RequestMapping("/doSomething"){
> ...
> }
>
>
> //second method
> @RequestMapping(method = RequestMethod.GET){
> ...
> }
>
>
> }
>
> Would it be possible for Angular to connect with second method in 
> controller, if the default 'get' operation is not explicitly defined (there 
> is only doSomething), or the body of function must contain
> 'get':{method :'GET'} ?
>
> Thank you in advance
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to