United States United States IVF birth process

United States United States IVF birth process █ Micro Signal: 138-0226-9370█ █ surrogate pack package gender █ successful surrogacy package of health ██████████████ United States United States IVF birth in hospital

1. RequestParam comment

Action: The Eucalyptus request to the controller name specified in the parameter copy.

Attribute value: name of the parameter in the request

          required: if the request parameter must provide this parameter, the default value is true, must be provided.

          defaultValue: defaults

FIG follows Case 1.1

1.3 may request http: // localhost:? 8080 / annotation / request / param / add uname = Wangwu & uage = 21 tests.

 

2. RequestBody comment

Effect: for acquiring content request body (get not Method)

Properties required: Must have a request body, the default value is true.

FIG follows Case 2.1

2.2 may request http: // localhost:? 8080 / annotation / request / body / add uname = Wangwu & uage = 21 test

 

3. PathVariable comment

Action: binding url has placeholder for example:. URL has / delete / {id}, {id} is the placeholder

Property value: specified URL placeholder name.

E.g:

User requests http: // localhost: 8080 / annotation / pathVariable / user / 1 GET to submit queries represent user id = 1

User requests http: // localhost: 8080 / annotation / pathVariable / user / 1 to DELETE submission means to delete user id = 1

3.1 Case as shown below

Note: When this request will complain, mainly because JSP can only get recognition and post. However, the request will reach the normal background, jsp has been eliminated in the future.

4. RequestHeader comment

Action: Gets the value of the request header

Attribute value: request header name

         required: 是否是必须头信息

         defaultValue:默认值

4.1  案例如下图

5.  CookieValue注解

作用:  用户获取hidingcookie的名称的值

属性  value:请求头的名称

         required:是否是必须头信息

         defaultValue:默认值

5.1  案例如下图

6.  ModelAttribute注解

作用: 表示出现在方法上会在控制器方法执行前先执行

出现在参数上:获取指定的数据给参数值

应用场景: 当提交表单数据不是完成的实体数据时,保证没有提交的字段使用数据库原来的数据

6.1  修饰的方法有返回值 如下图

6.2  修饰的方法没有返回值

7.  model的使用

SpringMVC会把Model(模型信息)中的的数据放入到request域对象中,页面可以通过EL表达式来取request域中的数据。我们可以先写一个案例,在后台使用Model的addAttribute方法,页面使用EL表达式取数据。如下图

8.  SessionAttributes注解

作用:  用于多次执行控制器方法间的参数共享

属性   value:  指定存入属性的名称

 8.1  案列如下图

 

Guess you like

Origin www.cnblogs.com/pingandasha/p/11004396.html