![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring cloud
devilex
这个作者很懒,什么都没留下…
展开
-
cal error at line 1, column 98. Encountered: \“\\\“\“ (34), after : \“\\\“\“
此问题出现在mybatis ,执行sql所造成的错误是因为SELECT count(tu.id) as count_number,tu.username,REPLACE(REPLACE(SUBSTRING_INDEX(city,'/',1),'市',''),'省','') as city //(city,'/',1),'市',''),'省','') 替换省市区的应该是用点引号括起来,但是我却用了双引号,所以引起的报错 from tb_user as tu LEFT JOIN tb_r原创 2022-04-19 14:19:48 · 727 阅读 · 0 评论 -
@RequestParam和@RequestBody的区别
@RequestParam@RequestBodyfrom-data(可接受需要,vue需要转from-data类型)Xfrom-urlencoded(可接受需要,vue需要转urlencoded类型)XXJSON类型XXML类型还其他类型:@RequestHeader@RequestPart@RequestScopeRequestParam使用这个不能接受前端传过来的键值对参数后面转成urlencoded,但是因为spring 包参数过长后面...原创 2022-01-05 16:31:21 · 404 阅读 · 0 评论 -
使用java 包 生成20位随机字符串
//导入包import org.apache.commons.lang3.RandomStringUtils;//方法调用String fakevin=RandomStringUtils.randomAlphanumeric(20);原创 2021-12-03 09:06:24 · 1715 阅读 · 0 评论 -
spring cloud 获取header的参数
@PostMapping(value = "/erpnews/noticelist") @ResponseBody public Object noticelist(@RequestParam("page") Integer page, @RequestParam("size") Integer size, @RequestHeader("userId") Integer u.原创 2021-11-04 11:08:58 · 851 阅读 · 0 评论 -
JPA 批量插入记录数据
JPA批量添加原文出现相同标识原文执行隔离工作时出错原文·········· @Transactional(rollbackFor = Exception.class) @PostMapping(value = "addtestdata") public RetResult addtestdata(@RequestParam("userId") Integer userId, @RequestPara翻译 2021-11-03 18:58:31 · 1110 阅读 · 0 评论 -
Not a managed type: class com.example.commonspojo.entity,公共实体类剥离,然后引入报错的问题及解决办法
Not a managed type: class com.example.commonspojo.entity,公共实体类剥离,然后引入报错的问题及解决办法公共实体类我们现在在我们引用实体类去使用解决办法公共实体类我们在使用spring cloud 的时候会使用,把一些公共的实体剥离出来,减少代码冗余这里就是我定义的公共实体类我们在pom.xml 中引入<!-- 公共实体类--> <dependency> <g转载 2021-10-25 16:30:01 · 1269 阅读 · 0 评论 -
JoinColumn一对多,设置本文主键和字表主键,联合查询
默认生成使用jpa 自动生成一对多,查询出的是本默认id字段对应外键 @OneToMany @JoinColumn(name = "p_pinpai_id")// @JoinColumns({// @JoinColumn(name = "p_pinpai_id", referencedColumnName ="p_pinpai_id" ),// }) public List<ImsConfigChangshangEntity> g原创 2021-10-12 16:33:00 · 467 阅读 · 0 评论 -
idea不能自动补全yml配置文件的原因解决
idea文件->设置->文件类型->YAML->添加文件匹配->确定并应用原创 2021-09-26 16:38:43 · 644 阅读 · 0 评论 -
eureak与gateway配置路由
创建一个注册中心(模块 cloud)pom.xml<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven原创 2021-09-24 16:29:23 · 521 阅读 · 0 评论 -
spring config No spring.config.import property has been defined
在学习 分布式配置中心(Spring Cloud Config)(Finchley版本) 遇到的坑Description: No spring.config.import property has been defined Action: Add a spring.config.import=configserver: property to your configuration. If configuration is not required add spring.config.impo转载 2021-09-22 17:12:18 · 3514 阅读 · 0 评论