无论什么请求都被重定向到了/error
@xxxMapping没有被扫到
启动项提示已经加载了其他的依赖
通过依赖冲突检查排除重复依赖
javax.serlvet-api
Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
swagger 错误 版本过高
Web application could not be started as there was no org.springframework.boot.web.servlet.server.ServletWebServerFactory bean defined in the context.
缺少tomcat或tomcat冲突
required a single bean, but 2 were found,发现Service和其实现类均被注入到Spring容器
[springboot项目启动异常 - required a single bean, but 2 were found,发现Service和其实现类均被注入到Spring容器_mapper.class] required a single bean, but 2 were f_静水楼台x的博客-优快云博客](https://blog.youkuaiyun.com/xiyafei122/article/details/125740740)
Spring只会扫描Application所在包目录下的所有文件,如果需要的Bean不在此目录下,自然注入失败。
nacos启动报no DataSource set时,可以使用其他数据库连接工具唤醒对应的数据库
nacos配置读取顺序:bootstarp-应用名dev配置-扩展配置-共享配置
javac编译参数学习!!!
nacos配置了discovery地址但是报连接localhost失败
原因:pom引入了config但是配置项中没有对应配置导致
sql优化
放到from前的子查询不做二者的关联 单纯做和其他表的关联查询
api 部分和 核心部分模块 注意事项
api里用到的model应该和dao里用到的model一致
mybatis特殊字符
特殊字符 替代符号
& &
< <
> >
" "
' '
小于等于 a<=b a <= b a <![CDATA[<= ]]>b
大于等于 a>=b a >= b a <![CDATA[>= ]]>b
不等于 a!=ba <![CDATA[ <> ]]>b a <![CDATA[!= ]]>b
【多种解决方法】Parameter ‘xxx‘ not found. Available parameters are [xxx,xxx, param3, param1,param2]
-parameters
Field logService in com.zdsc.video.gateway.filter.ZApiAccessFilter required a single bean, but 2 were found:
由于二者都有扫描功能,扫到同一个类之后,导致增加了两个bean
@SpringBootApplication(scanBasePackages = {"com.zdsc.video", "com.zdsc.video.gateway.service"})
@MapperScan("com.zdsc.video.gateway.service")
BCrypt.class
equalsNoEarlyReturn(库中密码,输入后的加密密码)
权限认证部分
AuthUtil -> 权限验证工具类
git新建项目导入远程git中时,有文件冲突如何push
Nacos服务报错 : no DataSource set
Error creating bean with name ‘externalDumpService’: Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure : No DataSource set
解决方法:
1、allowPublicKeyRetrieval=true
2、 网上看到另外的解决 办法,修改default_authentication_plugin设置,在my.ini中增加[mysqld]default_authentication_plugin=mysql_native_password,然后mysql命令行执行ALTER USER ‘username’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;最后在url中添加时区参数serverTimezone=Asia/Shanghai