SpringFramework_3004

Last modified by superadmin on 2018-01-12 20:19

Back to Item Set

<p/>
<!-- START TestItem -->
<p/>
<div class="TestItem">
<div class="TestItemQuestion">3004 Question:\

Which of the following code snippets prints into server console value "9" provided in the following URL path "/orders/4132972;version=9"?

</div>

Select 1 correct answer(s)!

<p/>
<ol class="MTestItemChoices" type='A'>
<li>

{code}
@RequestMapping(value = "/orders/{orderId};{version}", method = RequestMethod.GET)
public void getOrder(@PathVariable String orderId, @PathVariable int version) {
    System.out.println(version);
}
{code}

</li>
<li>

{code}
@RequestMapping(value = "/ orders /{orderId}", method = RequestMethod.GET)
public void getOrder (@PathVariable String orderId, @SubPathVariable int version) {
    System.out.println(version);
}
{code}

</li>
<li>

{code}
@RequestMapping(value = "/ orders /{orderId};{version}", method = RequestMethod.GET)
public void getOrder (@PathVariable String orderId, @MatrixVariable int version) {
    System.out.println(version);
}
{code}

</li>
<li>

{code}
@RequestMapping(value = "/ orders /{orderId}", method = RequestMethod.GET)
public void getOrder (@PathVariable String orderId, @MatrixVariable int version) {
    System.out.println(version);
}
{code}

</li>
</ol>
<p/>
<div class="TestItemSkill"><!--$skillid>Skill: $skilltitle</div>
<p/>
</div>
<!-- END MTestItem -->
<p/>
<p/>


{{/velocity}}

Tags:
Created by Alina Vasiljeva on 2013-01-08 18:25
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4 - Documentation