Springboot
qq_40447533
这个作者很懒,什么都没留下…
展开
-
接口自动化之springboot+mybatis连接数据库发生一个get请求
1.首先在maven里面添加相应的dependies,如: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <vers...原创 2021-07-26 16:37:36 · 156 阅读 · 0 评论 -
JPA实现条件查询
1.实现条件查询,在repository的类需要继承JpaSpecificationExecutor类 如 package testplatform.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.r原创 2021-01-06 21:54:42 · 1100 阅读 · 0 评论 -
驼峰转下划线
在配置文件路加上这一行,实现驼峰转下划线 jackson: # 设置属性命名策略,对应jackson下PropertyNamingStrategy中的常量值,SNAKE_CASE-返回的json驼峰式转下划线,json body下划线传到后端自动转驼峰式 property-naming-strategy: SNAKE_CASE ...原创 2021-01-06 21:47:58 · 205 阅读 · 0 评论 -
AOP的统一拦截器的学习
AOP的基本注解: @Aspect:作用是把当前类标识为一个切面供容器读取 @Pointcut:Pointcut是植入Advice的触发条件。每个Pointcut的定义包括2部分,一是表达式,二是方法签名。方法签名必须是 public及void型。可以将Pointcut中的方法看作是一个被Advice引用的助记符,因为表达式不直观,因此我们可以通过方法签名的方式为 此表达式命名。因此Pointcu...原创 2020-02-22 19:10:27 · 146 阅读 · 0 评论 -
spring boot Configuration Annotation Proessor not found in classpath
直接加入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> <...原创 2019-12-01 11:12:27 · 83 阅读 · 0 评论 -
SpringBoot和Mybatis的java.lang.annotation.AnnotationFormatError: Invalid default错误
最新在学习SpringBoot时遇到一个问题 2018-12-07 13:23:34.610 INFO 11824 --- [ main] com.shiro_springBoot.Application : Starting Application on DESKTOP-2H0RMVP with PID 11824 (D:\eclipseworksp...原创 2019-01-08 10:18:14 · 2606 阅读 · 2 评论 -
springboot之带参数的get请求
1.了解get方法有2中注解,@RequestMapping和@GetMapping, 第一种: //第一种用@RequestMapping注解指定method为get,value代表路径形参,HTTPServletResponse代表响应 @RequestMapping(value = "/getCookies", method = RequestMethod.GET) publ...原创 2019-01-02 20:46:17 · 4130 阅读 · 0 评论 -
SpringBoot的注解 @ComponentScan 作用
扫SpringBoot在写启动类的时候如果不使用@ComponentScan指明对象扫描范围,默认指扫描当前启动类所在的包里的对象,如果当前启动类没有包,则在启动时会报错:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package错误。 因为启动类不能直接放在main/jav...原创 2019-01-01 20:56:32 · 793 阅读 · 0 评论 -
接口自动化之spring的demo
1.maven工程下的dependency(注:如果你已经有父model,那就把parent的那些放在父model上,升级成爷爷辈) <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-par...原创 2019-01-01 20:01:36 · 265 阅读 · 0 评论 -
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb
这个错误是应为最新的mysql的驱动名称变了,把数据库驱动名称改为: com.mysql.cj.jdbc.Driver 2019-01-05 19:34:09.005 [main] INFO com.course.Application - Starting Application on AFOIG-801172222 with PID 13828 (C:\Users\Administ...原创 2019-01-05 19:37:35 · 585 阅读 · 0 评论 -
异常:java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents more
异常错误:java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone co...原创 2019-01-05 19:31:31 · 4379 阅读 · 5 评论 -
swagger生成接口文档
1:认识Swagger Swagger 是一个规范和完整的框架,用于生成、描述、调用和可视化 RESTful 风格的 Web 服务。总体目标是使客户端和文件系统作为服务器以同样的速度来更新。文件的方法,参数和模型紧密集成到服务器端的代码,允许API来始终保持同步。 作用: ...转载 2019-01-03 22:52:24 · 4362 阅读 · 0 评论