Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIJSONBoot Mysql无法自定义的数据库配置 #332

Closed
ChinaAstephen opened this issue Nov 2, 2021 · 6 comments
Closed

APIJSONBoot Mysql无法自定义的数据库配置 #332

ChinaAstephen opened this issue Nov 2, 2021 · 6 comments

Comments

@ChinaAstephen
Copy link

环境信息

  • 系统: Windows 10
  • JDK: 1.8.0_17
  • 数据库: MySQL 8.0.25
  • APIJSON: 2.9.1

问题描述

@JSONField(serialize = true)  // 不在日志打印 账号/密码 等敏感信息,用了 UnitAuto 则一定要加
@Override
public String getDBAccount() {
	if (isMySQL()) {
		Log.i(TAG,"-------------------获取账号_________________________");
		return "Astephen";
	}
	return null;
}

错误信息

!!!! 查询权限配置异常 !!!
Access denied for user 'root'@'localhost' (using password: YES)

@ChinaAstephen
Copy link
Author

微信图片_20211102140553
微信图片_202111021405531

@ChinaAstephen
Copy link
Author

DemoSqlConfig 里面的我填写的数据库信息不起作用,打印日志也没有输出走的还是APIJSONSQLConfig里面的内容,能看下是什么问题么?其他几个例子都完美运行了,就这个boot运行有问题!

@TommyLemon
Copy link
Collaborator

APIJSON 版本 2.9.1 也太老旧了,换最新的 4.8.0 试试,另外注意 apijson-framework, apijson-column, APIJSON-Demo 等的版本也要对应。

这是 4.8.0
https://github.com/APIJSON/APIJSON-Demo/releases/tag/4.8.0

这是最新版,目前等价于 4.8.0
https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Java-Server

@ChinaAstephen
Copy link
Author

APIJSON 版本 2.9.1 也太老旧了,换最新的 4.8.0 试试,另外注意 apijson-framework, apijson-column, APIJSON-Demo 等的版本也要对应。

这是 4.8.0 https://github.com/APIJSON/APIJSON-Demo/releases/tag/4.8.0

这是最新版,目前等价于 4.8.0 https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Java-Server

@ChinaAstephen
Copy link
Author

image
我刚换了包,最新的4.8.0 另外lib目录下的jar包我也删了,从maven拉下来的最新代码

@TommyLemon
Copy link
Collaborator

TommyLemon commented Nov 2, 2021

image 我刚换了包,最新的4.8.0 另外lib目录下的jar包我也删了,从maven拉下来的最新代码

apijson-column 版本应该是 1.1.3,是改了,还是拉的代码不是最新的?
https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSONBoot/pom.xml
image

不能只换依赖库,Demo 也要拉最新的,旧版 Demo 不一定兼容新版依赖库

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants