解决:[classpath:db/migration] (please add migrations or check your Flyway configuration)
摘要:在yml文件中(例如:application-dev.yml) spring: #spring启动时禁用flyway功能 flyway: enabled: false 这样在项目启动时就不会进行flyway的迁移了
阅读全文
解决:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
摘要:yml或者properties文件没有被扫描到,需要在pom文件中<build></build>添加如下.来保证文件都能正常被扫描到并且加载成功. <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> <resources> <resource> <director
阅读全文
解决:Data source rejected establishment of connection, message from server: "Too many connections"
摘要:SELECT @@MAX_CONNECTIONS AS 'Max Connections'; set GLOBAL max_connections=1000; http://blog.sina.com.cn/s/blog_1645e034e0102ydo5.html
阅读全文
BPwdEncoderUtils关键代码
摘要:package com.forezp.util; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; public class BPwdEncoderUtils { private static final
阅读全文
SwaggerConfig关键代码
摘要:package com.tszr.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import sprin
阅读全文
UserUtils关键代码
摘要:package com.tszr.util; import org.springframework.security.core.Authentication; import org.springframework.security.core.authority.SimpleGrantedAuthor
阅读全文
HttpUtils关键代码
摘要:package com.tszr.util; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequ
阅读全文
ResourceServerConfiguration关键代码
摘要:资源访问配置 package com.tszr.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired
阅读全文
JwtConfiguration关键代码
摘要:配置jwt权限、存取用户访问头信息 package com.tszr.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.ann
阅读全文
GlobalMethodSecurityConfiguration关键代码
摘要:开启方法方法的权限注解 package com.tszr.config; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotatio
阅读全文
RespDTO类
摘要:package com.tszr.dto; import java.io.Serializable; public class RespDTO<T> implements Serializable{ public int code = 0; public String error = ""; pub
阅读全文
通用错误码类
摘要:package com.tszr.exception; /** * 通用错误码 * */ public enum ErrorCode { OK(0, ""), FAIL(-1, "操作失败"), RPC_ERROR(-2,"远程调度失败"), USER_NOT_FOUND(1000,"用户不存在")
阅读全文
解决:Plugin 'org.apache.maven.plugins:maven-resources-plugin:' not found
摘要:加入下面的配置就可以了 <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> </dependen
阅读全文
解决:'openssl' 不是内部或外部命令
摘要:下载:Openssl http://slproweb.com/products/Win32OpenSSL.html 配置bin安装路径
阅读全文
生成JKS私钥和公钥信息
摘要:私钥 keytool -genkeypair -alias fzp-jwt -validity 3650 -keyalg RSA -dname "CN=jwt,OU=jtw,O=jtw,L=zuricn,S=zurich,C=CH" -keypass fzp123 -keystore fzp-jwt
阅读全文
解决:ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
摘要:在使用JAXBContent对类与xml进行转换时报错:java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory 说明ContextFactory相关类找不到,可在POM文件中添加依赖: <dependency> <gr
阅读全文
OAuth2权限验证SQL脚本
摘要:/* Navicat MySQL Data Transfer Source Server : ddddd Source Server Version : 50718 Source Host : localhost Source Database : spring-cloud-auth Target
阅读全文
idea同一个服务在不同端口同时启动怎么操作
摘要:添加-Dserver.port=8080 如果需要切换profile,从default→dev,则可以这样配:-Dserver.port=8080 -Dspring.profiles.active=dev,假设这里的dev为开发环境 不需要在application.yml中配置端口,在这配置就行 4
阅读全文
使用RabbitMQ传输链路数据给zipkin时启动zipkin的命令
摘要:java -jar zipkin.jar --zipkin.collector.rabbitmq.addressed=localhost注意doc要使用管理员身份
阅读全文