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

nacos 2.3.0 用自定义数据库插件扩展,登录时提示找不到用户 #33

Open
yangm opened this issue Jan 27, 2024 · 2 comments

Comments

@yangm
Copy link

yangm commented Jan 27, 2024

使用如下配置,在登录时提示找不到用户,org.springframework.security.core.userdetails.UsernameNotFoundException: User nacos not found:
spring.sql.init.platform=dm
db.num=1
db.url.0=jdbc:dm://127.0.0.1:5236/NACOS?schema=NACOS&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
db.user.0=SYSDBA
db.password.0=123456
db.pool.config.driverClassName=dm.jdbc.driver.DmDriver

调式发现 nacos-default-auth-plugin 模块下出现出错,没有对应分页实现,如果把spring.sql.init.platform=mysql就是好的,请问这块如何扩展
/**
* Get handler adapter.
*
* @param dataSourceType data source type.
* @return
*/
protected PageHandlerAdapter getHandlerAdapter(String dataSourceType) {
List handlerAdapters = PageHandlerAdapterFactory.getInstance().getHandlerAdapters();
for (PageHandlerAdapter adapter : handlerAdapters) {
if (adapter.supports(dataSourceType)) {
return adapter;
}

    }
    
    return PageHandlerAdapterFactory.getInstance().getHandlerAdapterMap()
            .get(DefaultPageHandlerAdapter.class.getName());
}
@yetao-git
Copy link

用别的数据库时候也是,nacos账户登录日志显示:
UsernameNotFoundException: User nacos not found

请问如何解决的

@ICE-GB
Copy link

ICE-GB commented Mar 14, 2024

alibaba/nacos#11489

应该是因为这个吧

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

3 participants