![](https://img-blog.csdnimg.cn/20190918140037908.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
springBoot
文章平均质量分 54
springBoot
泗水六年
实践交流总结记忆。
展开
-
你是如何理解SpringBoot Starters的?
SpringBoot官方对我们平时开发过程中涉及到的场景(数据访问,Web开发)封装成一个个的启动器,我们只需要在项目中引入某个场景的启动器,则该场景相关的所有依赖都会被导入进来,而且会为我们进行自动配置。...原创 2022-07-24 23:21:16 · 220 阅读 · 0 评论 -
SpringBoot的优缺点
我理解的SpringBoot优点呢,有三个,第一个就是使用SpringBoot可以快速的构建出来一个可以独立运行Spring项目。第三个就是SpringBoot内嵌了很多Servlet容器,比如说tomcat/jetty,使得我们无需依赖外部的Servlet容器就可以运行我们的项目。接下来我也来说说我认为的SpringBoot的缺点吧,第一个就是SpringBoot的版本迭代很快,有些模块可能会有很大改动,如果对现有的SpringBoot版本进行升级,有可能会带来一些问题。...原创 2022-07-24 23:20:37 · 2045 阅读 · 0 评论 -
什么是SpringBoot?
我对SpringBoot的理解就是SpringBoot是一个用于快速构建项目和简化开发的框架,我认为SpringBoot最大的一个特点就是自动配置。SpringBoot官方对我们平时开发过程中涉及到的场景(数据访问,Web开发)封装成一个个的启动器,我们只需要在项目中引入某个场景的启动器,则该场景相关的所有依赖都会被导入进来,而且会为我们进行自动配置。...原创 2022-07-24 23:19:34 · 363 阅读 · 0 评论 -
报错,o.h.engine.jdbc.spi.SqlExceptionHelper : Unknown column ‘org0_.create_by‘ in ‘field list‘
1.问题2020-10-28 16:09:41.918 ERROR 8908 --- [io-13000-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Unknown column 'org0_.create_by' in 'field list'2020-10-28 16:09:55.154 ERROR 8908 --- [io-13000-exec-1] c.y.a.controller.v1.org.OrgController : o...原创 2021-10-29 20:34:47 · 878 阅读 · 0 评论 -
报错,sql语句中尽量不要使用*,只查询需要的字段出来
错误:sql语句中尽量不要使用*,只查询需要的字段出来。解决:select id,tran_code,tran_name,tran_date,tran_time,tran_amount,1 as count from app_cash_trans_log order by app_cash_trans_log.id desc limit 5select id,tran_code,tran_name,tran_date,tran_time,tran_amount,1 as count from ap原创 2021-10-29 20:18:34 · 840 阅读 · 0 评论 -
报错,ERROR 2572 --- [MessageBroker-2] o.h.engine.jdbc.spi.SqlExceptionHelper : Column ‘create_by‘
错误:idea:2020-12-23 17:11:18.611 ERROR 2572 --- [MessageBroker-2] o.h.engine.jdbc.spi.SqlExceptionHelper : Column 'create_by' not found.2020-12-23 17:11:18.619 ERROR 2572 --- [MessageBroker-2] c.y.a.controller.v1.trans.TransMonitor : 获取连续交易失败:[could ..原创 2021-10-29 20:16:38 · 294 阅读 · 0 评论 -
报错,> 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL
错误:idea:2020-12-23 15:26:13.885 ERROR 17972 --- [MessageBroker-2] o.h.engine.jdbc.spi.SqlExceptionHelper : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'count >.原创 2021-10-29 20:14:00 · 945 阅读 · 0 评论 -
报错,> 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
错误1:mysql:select * ,count(*)as count from app_cash_trans_log group by app_cash_trans_log.tran_code having count(*)>=(select pla_config.cfg_value from pla_config where pla_config.cfg_name='tranMaxContinuity') order by app_cash_trans_log.id desc limit 5原创 2021-10-29 20:10:43 · 2264 阅读 · 0 评论 -
报错, liquibase.exception.ValidationFailedException: Validation Failed
问题:2020-11-12 15:15:14.082 WARN 15972 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creat...原创 2021-10-29 18:18:54 · 1257 阅读 · 0 评论 -
getJPAQueryFactory与getJPAQuery使用
getJPAQueryFactory与getJPAQuery使用?JPAQueryFactoryJPAQuery//用这个例如: public QueryResults<CardParameterTemplate> getCardType(Pageable pageable, CardParameterTemplateQuery cardTypeQuery) { JPAQuery jpaQuery = cardTypeDao.getJPAQuery();原创 2021-05-14 15:19:26 · 748 阅读 · 0 评论 -
报错,o.h.engine.jdbc.spi.SqlExceptionHelper : Unknown column ‘template_name‘ in ‘field list‘
问题:Hibernate: insert into vm_card_parameter_template (template_name) values (?)2021-05-11 13:56:18.342 WARN 19100 --- [io-12000-exec-3] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 1054, SQLState: 42S222021-05-11 13:56:18.342 ERROR 19100 --- [..原创 2021-05-11 17:59:38 · 1453 阅读 · 1 评论 -
组装生成HashMap结构类型
问题:2021-05-07 16:40:02.003 INFO 25776 --- [io-12000-exec-1] c.y.cols.controller.CardTypeController :{FITVersion=00000001, RecordsSupported=[{MatchOffset=1, MatchTrack=3}, {MatchOffset=1, MatchTrack=3}, {MatchOffset=1, MatchTrack=3}, {MatchOffset=1, M...原创 2021-05-08 15:07:45 · 149 阅读 · 0 评论 -
报错,null [java.lang.IndexOutOfBoundsException,Index: 5, Size: 5]
问题:{ "success": false, "code": "S0000", "error": "null [java.lang.IndexOutOfBoundsException,Index: 5, Size: 5]", "serviceName": "cols-service", "paramErrors": null}原因:HashMap<String, Object> objectHashMap = new HashMap<>...原创 2021-05-08 15:02:14 · 760 阅读 · 0 评论 -
报错,null [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException,Failed to con
问题:{ "success": false, "code": "S0000", "error": "null [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException,Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is ...原创 2021-05-08 15:00:50 · 235 阅读 · 0 评论 -
springboot注解整理
注解整理1、实体类中:@Data@Entity@Table(name="vm_card_type")@GeneratedValue(strategy = GenerationType.AUTO,generator = "SEQ_vm_card_trans_log")@SequenceGenerator(name = "SEQ_vm_card_trans_log",sequenceName = "SEQ_vm_card_trans_log")@Id@Column(name = "id")例如:原创 2021-04-30 15:27:47 · 114 阅读 · 1 评论 -
报错,Exception: Required request body is missing: public org.springframework.ui.ModelMap cn.yihuazt.co
问题:2021-04-29 15:06:16.795 ERROR 30460 --- [io-12000-exec-1] c.y.w.c.GlobalControllerExceptionHandler : Exception: Required request body is missing: public org.springframework.ui.ModelMap cn.yihuazt.cols.controller.CardTypeController.deleteCardType(long)原原创 2021-04-29 18:38:47 · 803 阅读 · 0 评论 -
报错,ERROR 8324 --- [io-12000-exec-8] c.y.cols.controller.CardTypeController
问题:2021-04-29 14:45:50.871 ERROR 8324 --- [io-12000-exec-8] c.y.cols.controller.CardTypeController : 修改失败:Method Not Implemented!原因:CardType cardType1 = cardTypeService.findById(cardType.getId());findById方法是IBaseService的方法,没有被CardService实现。解决:@PutMap.原创 2021-04-29 18:38:06 · 640 阅读 · 0 评论 -
报错,could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exce
问题:Hibernate: insert into vm_card_type (type_name) values (?)2021-04-29 14:37:17.522 WARN 13112 --- [io-12000-exec-5] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 1048, SQLState: 230002021-04-29 14:37:17.522 ERROR 13112 --- [io-12000-exec-5] o..原创 2021-04-29 18:37:16 · 2214 阅读 · 0 评论 -
HttpJsonResult和ModelMap使用??
HttpJsonResult:用在select方法中ModelMap:用在insert,update,delete方法中例如:/** * 查询卡信息 * @param pageable * @param query * @return */@ApiPermission@RequestMapping(method = RequestMethod.GET)public HttpJsonResult<Card> searchParams(Pageable pageable,原创 2021-04-29 10:01:12 · 161 阅读 · 0 评论 -
报错,Error starting ApplicationContext. To display the conditions report re-run your application with
问题:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2021-04-28 10:19:01.135 ERROR 19308 --- [ main] o.s.boot.SpringApplication : Application run failedorg.springfra...原创 2021-04-29 09:25:28 · 1023 阅读 · 1 评论 -
报错,Field cardTypeService in cn.yihuazt.cols.controller.CardTypeController required a bean of type ‘c
问题:2021-04-27 19:48:09.528 ERROR 27192 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :***************************APPLICATION FAILED TO START***************************Description:Field cardTypeService in cn.yihuazt.cols.controlle...原创 2021-04-27 19:54:15 · 166 阅读 · 0 评论 -
报错, Exception: Missing URI template variable ‘id‘ for method parameter of type Long
问题:2021-03-24 17:31:05.391 ERROR 12756 --- [io-12000-exec-2] c.y.w.c.GlobalControllerExceptionHandler : Exception: Missing URI template variable 'id' for method parameter of type Long原因:id在接口中没有定义成参数,去掉@PathVariable解决:@DeleteMapping("/delete")@Ap原创 2021-03-26 16:37:52 · 948 阅读 · 0 评论 -
SpringBoot项目打成War包??
SpringBoot项目打成War包1. 首先在pom.xml里添加Tomcat依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> <...原创 2021-02-25 15:41:55 · 145 阅读 · 1 评论 -
idea2020.1使用Lombok注解,点击运行项目提示找不到get,set方法?
idea2020.1使用Lombok注解,点击运行项目提示找不到get,set方法?javabean:@Datapublic class ReponseData { private Map<String,String> head; private Map<String,Object> body;}问题解决(1)查看IDEA中是否正确安装了Lombok插件并开启了使用(2)普通项目没有默认开启注解生成器找到 File | Settings | Buil...原创 2021-02-19 11:09:17 · 795 阅读 · 0 评论 -
项目编译报错
1、问题Cannot resolve plugin org.springframework.boot:spring-boot-maven-plugin:2.2.6.RELEASECannot resolve plugin org.apache.maven.plugins:maven-resources-plugin:3.1.0Cannot resolve plugin org.apache.maven.plugins:maven-jar-plugin:3.1.22、原因:mav.原创 2021-01-02 12:41:15 · 547 阅读 · 0 评论 -
运行报错Error starting ApplicationContext
1、问题:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2020-05-04 00:17:07.847 ERROR 6192 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :***************************A...原创 2021-01-02 12:40:35 · 2927 阅读 · 0 评论 -
数据库连接失败报错com.mysql.cj.jdbc.exceptions.CommunicationsException
1、问题:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.at com.mysql.cj.jdbc.exceptions.SQLE原创 2021-01-02 12:38:22 · 8876 阅读 · 3 评论 -
项目运行报错java.sql.SQLSyntaxErrorException: Table ‘sell.hibernate_sequence‘ doesn‘t exist
1、问题:java.sql.SQLSyntaxErrorException: Table 'sell.hibernate_sequence' doesn't existat com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)at com.my原创 2021-01-02 12:37:40 · 978 阅读 · 1 评论 -
运行报错Error:(29, 41) java: 无法将类 com.imooc.dataobject.ProductCategory中的构造器 ProductCategory应用到给定类型
1、问题:Error:(29, 41) java: 无法将类 com.imooc.dataobject.ProductCategory中的构造器 ProductCategory应用到给定类型;需要: java.lang.String,java.lang.Integer找到: 没有参数原因: 实际参数列表和形式参数列表长度不同Error:(44, 41) java: 无法将类 com.imooc.dataobject.ProductCategory中的构造器 Produc...原创 2021-01-02 12:36:42 · 1407 阅读 · 0 评论 -
运行报错java.lang.Exception: No runnable methods
1、问题:java.lang.Exception: No runnable methodsat org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:.原创 2021-01-02 12:36:12 · 711 阅读 · 0 评论 -
代码中findOne方法找不到
1、问题:2、原因:springboot版本问题3、解决:降低springboot版本原创 2021-01-02 12:35:27 · 331 阅读 · 0 评论 -
查询商品列表报错This application has no explicit mapping for /error, so you are seeing this as a fallback
1、问题:Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Tue May 05 15:46:50 CST 2020There was an unexpected error (type=Not Found, status=404).No message available2、原因:server格式错.原创 2021-01-02 12:34:37 · 140 阅读 · 0 评论 -
win7下hosts文件位置
win7下hosts文件位置原创 2020-11-02 20:57:38 · 124 阅读 · 0 评论 -
异常捕获,返回错误码code给前端
异常捕获,返回错误码code给前端原创 2020-11-12 23:49:32 · 534 阅读 · 0 评论 -
端口被占用解决办法
1、端口8080被占用解决办法方法一:点击左下角“开始”,在搜索框中输入“cmd”回车;在命令行输入“netstat -ano”回车;找到需要关闭的端口对应的PID;打开“任务管理器”找到PID;选中,点击“结束进程”即可。方法二:查看被占用的端口号:netstat -ano | findstr 8080杀死占用的端口号taskkill /pid 1604 /f补充:查看pid 1604对应的应用:tasklist|findstr “160..原创 2020-11-02 20:58:58 · 2865 阅读 · 0 评论 -
修改模板文件后,Build Project(ctrl+F9)可以快速运行
修改模板文件后,Build Project(ctrl+F9)可以快速运行原创 2020-12-27 20:34:20 · 197 阅读 · 0 评论 -
success.ftlh与error.ftlh
success.ftlh与error.ftlh原创 2020-12-27 20:34:38 · 415 阅读 · 0 评论 -
订餐系统项目中OrderForm、OrderDTO、OrderMaster和ResultVO的区别
区别:OrderForm:前端传过来。OrderDTO:中间转换用,controller将OrderForm转为OrderDTO传给service,同时将service返回的结果转成ResultVO返回给前端。OrderMaster:对应数据库表,service将OrderDTO转成OrderMaster传给数据库。ResultVO:返回给前端的结果。...原创 2020-12-27 20:36:06 · 720 阅读 · 0 评论 -
查看本机ip
方式一:cmd->ipconfig方式二:原创 2020-11-02 20:59:21 · 114 阅读 · 0 评论 -
接口测试号申请
https://pay.weixin.qq.com/index.php/core/home/login?return_url=%2F微信支付->文档中心->API文档->开发文档(V2版)->JSAPI支付->API列表(统一下单)-获取openid->网页授权获取用户openid或公众号获取openid->微信网页开发(网页授权)或开始开发(接口测试号申请)...原创 2020-12-27 20:36:30 · 707 阅读 · 0 评论