品牌模块整体API设计
服务端查问时序设计
@select注解嵌套sql语句:
//简单sql(例如嵌套了很多动静sql元素)不倡议已注解形式进行定义
//@Select("<script>select * from tb_brand <if test="name!=null and name!=''"> where name like concat ("%",#{name},"%")</if></script>")
private static final Logger log=//这里的实现在springboot中默认抉择的是logback LoggerFactory.getLogger(BrandServiceImpl.class);
Assertions.assertEquals(1, list.size());//断言测试(理论值和期望值不等则抛出异样)
//rest格调(一种软件架构编码格调)的url定义
其语法为:a/b/{c}/d/{e},在url能够定义变量,这个变量须要应用{}括起来rest格调能够更好实现跨平台@PathVariable 注解用于润饰办法参数,目标是通知spring mvc,参数的值来自url