Controller
## 事务 @Transaction 回滚

## springboot开启事务
```
<dependency><!--POM.XML-->
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>5.1.9.RELEASE</version>
</dependency>
```

@EnableTransactionManagement


## springboot 接口{}接收 单个参数url
[接口{}接收](https://www.cnblogs.com/anywherego/p/9600871.html)
## @RequestParam注解使用

## springboot 响应乱码问题
```
@Controller
@RequestMapping(value = "/t1", produces = "application/json; charset=utf-8") //乱码问题
@ResponseBody
public class T1Controller {
public List<String> l=new ArrayList();
@GetMapping(value = "/get/{s}")
@WtlMethodExecutionTime(name = "name--123")
public List<String> getChinaArea(@PathVariable(value = "s") String s) {
l.add(s);
return l ;
}
```
## 参数校验
@NotBlank(message="工程图片不能为空")
private String constructionMediaIds;
@NotNull (message="工程造价不能为空")
private BigDecimal constructionPrice;


```
@NotNull(message = "id不能为空",groups = {Edit.class,Edit.class})
@NotBlank(groups = Add.class, message = "登录账号不能为空")
@Validated({Add.class,update.class})