随笔分类 - Springboot
摘要:package com.wbb.cache; import com.wbb.util.ApplicationContextUtils; import org.apache.ibatis.cache.Cache; import org.springframework.data.redis.core.R
阅读全文
摘要:springboot基于注解的切面开发方式,不用within和execution表达式方式 首先自定义一个注解 @Retention(RetentionPolicy.RUNTIME) //运行时生效 @Target(ElementType.METHOD) //作用在方法上 public @inter
阅读全文
摘要:1、定义对象 package com.wbb.entity; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Compo
阅读全文
摘要:package com.wbb.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.sprin
阅读全文
摘要:1:@Api:用在类上,对类进行描述 @Api(tags = "用户controller") 2:@ApiOperation:用在方法上,对方法描述 @ApiOperation(value = "这是用户的查询方法") 3:@ApiImplicitParams 对于参数的描述,若传入参数是对象,则不
阅读全文
摘要:1:创建springboot工程 2:引入pom.xml <!--swagger--> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</v
阅读全文
摘要:使用spring-initializr构建初始项目 空项目创建完成之后。完善目录结构,新增some文件如下 1:配置application.properties server.port=8080 server.servlet.context-path=/springboot-mybatis #数据库
阅读全文

浙公网安备 33010602011771号