自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(63)
  • 资源 (1)
  • 问答 (3)
  • 收藏
  • 关注

原创 项目jdk版本正确情况下报错:The te java.time.ZonedDateTime cannot be resolved.

项目使用jdk版本为11,很久没有打开的代码突然就报错了,网上搜到都是更新jdk版本,但我当前项目版本已是最新,最后通过重新build才解决该问题。

2024-04-30 10:49:24 82

原创 openlayers添加gif图

)&:hover {

2024-04-28 08:59:06 120

原创 ant-design <a-tooltip>换行显示

span title="卸油步骤标准说明">unloadGasJobStep.stepDesc内容为中包含,即可自动换行。

2024-01-30 13:01:50 466

原创 使用eclipse使用mvn install打包springboot项目时报错

报错:java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test在pom.xml文件中添加<build> ...

2020-05-07 15:38:35 285

原创 springboot动态调用实现类

//定义规则的多种类型/** * 数据规则处理类型枚举 */public enum RuleType { MYRULEBYID1, MYRULEBYID2}//接口import java.util.List;import java.util.Map;public interface DataRuleParse { /** * 获取...

2019-05-23 19:55:15 4399

原创 JAVA:POJO&&JSON相互转换

使用com.alibaba.fastjson.JSON 中JSON.toJSONString(Object object)方法import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import gds.application.taskmanager.dto.TaskMasterDTO;imp...

2019-05-17 14:28:56 559

原创 sptingboot---项目启动时自动执行方法

在SpringBoot中,有两种接口方式实现启动执行,分别是ApplicationRunner和CommandLineRunner,除了可接受参数不同,其他的大同小异CommandLineRunner :import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boo...

2019-05-17 14:02:06 452

原创 将eclipse项目传到码云

 右键--&gt;Team--&gt;Share Project 右键--&gt;Team--&gt;Commit ,将项目提交到本地仓库 全选的内容挪到staged changes页面,填写提交信息 点击commit提交,完成后右键--&gt;Team--&gt;Remote--&gt;push推到码云上     点击完成即可...

2018-11-30 16:31:25 243

原创 SpringCloud(7)--feign

新建feign-consumer项目添加依赖&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocati...

2018-11-30 14:57:49 164

原创 执行jar包命令

 修改application中的一些配置(比如端口)java -jar eureka-server-1-0.0.1-SNAPSHOT.jar --server.port=8020 --spring.application.name=ribbon2eureka-server-1-0.0.1-SNAPSHOT.jar  jar包名称--server.port=8020 --spring...

2018-11-30 09:21:57 3797

原创 SpringCloud(6)--Turbine 和Hystrix Dashboard(集群监控)

新建turbine项目,引入相关依赖&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="h

2018-11-29 17:13:53 235

原创 SpringCloud(5)--Hystrix Dashboard(单个服务实例监控)

新建项目hystrix-dashboard,添加Hystrix Dashboard依赖pom.xml文件&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-...

2018-11-29 10:46:56 265

原创 关闭端口命令

2018-11-29 10:16:01 6393

原创 SpringCloud(4)--Hystrix

没有加入容错保护之前,如果关闭8081端口,访问http://localhost:9000/ribbon-consumer有时会报错 在eureka-ribbon-consumer项目中添加Hystrix依赖 &lt;!-- 添加hystrix依赖 --&gt;        &lt;dependency&gt;            &lt;groupId&gt;org.spr...

2018-11-28 15:55:26 179

原创 SpringCloud(3)--Eureka(服务发现与消费、负载均衡ribbon)

启动  eureka-server-1(服务提供者)的服务,以不同端口来启动先修改application.xml文件,将注册中心改为8080提供的eureka.client.serviceUrl.defaultZone=http://localhost:8080/eureka/ java -jar eureka-server-1-0.0.1-SNAPSHOT.jar --serv...

2018-11-28 13:34:49 322

原创 SpringCloud(2)--Eureka(高可用模式)

Eureka Server的高可用实际上就是将自己作为服务向其他服务中心注册自己,这样就可以形成一组相互注册的服务注册中心,一世爱你服务清单的互相同步,达到高可用的效果。双节点的服务注册中心集群在原来的服务中心得项目中新建两个propertiesapplication-peer1.properties,作为peer1服务中心的配置,将serviceUrl指向peer2server...

2018-11-28 10:59:19 179

原创 新建maven module报错: The parent project must have a packaging type of POM

将父项目的pom.xml文件中把&lt;packaging&gt;&lt;/packaging&gt;里的jar改成pom  

2018-11-27 17:07:55 365

原创 SpringCloud(1)--Eureka(单节点模式)

服务注册中心 eureka-server服务在pom.xml添加eureka依赖 ,要注意与Springboot版本之间的对应关系&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/...

2018-11-27 16:50:04 364

原创 报错: org.springframework.boot.builder.SpringApplicationBuilder.<init>([Ljava/lang/Object;)V

springboot中引入eureka报错: java.lang.NoSuchMethodError: org.springframework.boot.builder.SpringApplicationBuilder.&lt;init&gt;([Ljava/lang/Object;)V这是由于springboot版本与eureka版本兼容的问题;Spring Cloud版本:...

2018-11-27 16:42:29 10768

原创 eclipse中搭建springboot学习(14)---监控与管理

pom.xml中添加依赖         &lt;!--监控依赖  --&gt;         &lt;dependency&gt;            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;            &lt;artifactId&gt;spring-boot-starter-actuator&l...

2018-11-27 15:04:10 175

原创 浏览器(火狐、谷歌)下载中文时中文名称不显示的问题处理

           var fileName = java.net.URLEncoder.encode(result.zipFileName, "UTF-8");            var agent = request.getHeader("User-Agent");            if (agent.indexOf("Firefox")&gt;-1) {         ...

2018-11-27 09:52:44 820

原创 路径中存在中文时处理

前端jsString name=encodeURI("");后台String name=decodeURI("");

2018-11-27 09:51:33 2287

原创 Spring Cloud学习技术MindMaster思维导图

2018-11-22 14:49:51 655

原创 eclipse中搭建springboot学习(14)---国际化

首先编写国际化文件,默认情况下,国际化资源文件的基础名为messages,且存放在classpath根路径下,即messages.properties、messages_zh_CN.properties、messages_en_US.properties等等,这样就无需在配置文件中设置spring.messages.basename=...了,但是如果基础名不为messages或者不在classp...

2018-11-22 13:48:12 897

原创 git撤销某一次的提交

输入git log查看提交的日志 ,找到需要撤销的并复制下来$ git logcommit 6fe9a852655388a99ff0c2740b4e4b56118d87f8Author:Date:   Tue Nov 20 16:42:05 2018 +0800    解决应用名称有中文时生成秘钥报错的问题commit e8219d5603e13326e520466ba1351...

2018-11-21 11:04:54 1570

原创 eclipse中打包Springboot项目

进入到项目路径下,执行mvn package,就会将springboot项目打成jar包打包好的jar会生成到项目的target目录下 运行 java -jar jar包名称即可 

2018-11-16 09:29:19 3253

原创 git合并分支时如何解决冲突

合并时有冲突 $ git merge --no-ff modifyGRerror: Merging is not possible because you have unmerged files.hint: Fix them up in the work tree, and then use 'git add/rm &lt;file&gt;'hint: as appropriate t...

2018-11-15 15:10:42 2417

原创 npm升级的命令

npm install npm -g

2018-11-09 09:51:01 1289

原创 判断一个字符串中数字还是字母(java)

public class Test {    public static void main(String[] args) {        String str = "wq8123fvvbvrt78931321";        String[] strs = str.split("");        StringBuilder numStr = new StringBuilder(...

2018-11-07 16:56:46 5282

原创 springboot报错:Use of @OneToMany or @ManyToMany targeting an unmapped class:

Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.example.demo1105.dto.RoleDTO.userList[com.example.demo1105.dto.UserDTO]    at org.hibe...

2018-11-07 13:31:19 2338 1

转载 @JoinTable注解

 属性 是否必须 说明 name 否 指定该连接表的表名 JoinColumns 否 该属性值可接受多个@JoinColumn,用于配置连接表中外键列的信息,这些外键列参照当前实体对应表的主键列 inverseJoinColumns 否 该属性值可接受多个@JoinColumn,用于配置连接表中外键列的信息,这些外键列参照当前实体的...

2018-11-07 09:18:42 10764 2

原创 eclipse中搭建springboot学习(13)---定时任务

启动类package com.example;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.boot.web.servlet.ServletC...

2018-11-01 09:11:44 358

原创 eclipse中搭建springboot学习(12)---多数据源

pom.xml添加依赖 &lt;dependency&gt;             &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;             &lt;artifactId&gt;                 spring-boot-configuration-processor            ...

2018-10-30 10:34:44 323

原创 springboot 多数据源报错jdbcUrl is required with driverClassName

将spring.datasource.primary.url改成spring.datasource.primary.jdbc-url

2018-10-30 09:33:42 181

原创 springboot报错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded data

报错 Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:C...

2018-10-30 09:06:02 262

原创 eclipse中搭建springboot学习(11)---JPA使用4(分页查询)

StudentScoreService添加方法/**     * 分页查询 无查询条件     *      * @param page     * @param size     * @return     */    public Page&lt;StudentDTO&gt; findStudent(Integer page, Integer size) {       ...

2018-10-26 13:11:43 335

原创 eclipse中搭建springboot学习(10)---JPA使用4(多张表 ManyToOne)

新增SchoolDTOpackage com.example.demo1025.dto;import java.io.Serializable;import java.util.List;import javax.persistence.CascadeType;import javax.persistence.Entity;import javax.persistence.Ge...

2018-10-25 14:14:51 234

原创 eclipse中搭建springboot学习(9)---JPA使用3(多张表 OneToOne)

StudentDTOpackage com.example.demo1025.dto;import java.io.Serializable;import javax.persistence.CascadeType;import javax.persistence.Column;import javax.persistence.Entity;import javax.persi...

2018-10-25 10:48:16 244

原创 springboot JPA报错 object references an unsaved transient instance - transient instance before ...

org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing : com.example.demo1025.dto.StudentDTO.score -&gt; com.exam...

2018-10-25 10:39:34 1043

原创 springboot JPA报错 person is not mapped [delete from person where age= ?1]

注意的是这时候person是数据库中的表名称,而这里需要写DTO对应的名称错误写法 delete from person where age= ?1正确写法 delete from PersonDTO where age= ?1 ...

2018-10-19 15:28:19 1742

npm下载安装

在Windows上安装时务必选择全部组件,勾选Add to Path

2018-11-05

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除