java 如何在具有数据库连接的 vaadin 框架中创建登录页面?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7120204/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 18:42:41  来源:igfitidea点击:

How to create login page in vaadin framework with db connectivity?

javavaadin

提问by Suresh S

Im have just started to work with vaadin framework. I have created a login page with vaadin's default login page. Can anyone tell me how to check the username and password with the database and move to next page on successful login. Im using psql and connected using hibernate.

我刚刚开始使用 vaadin 框架。我用 vaadin 的默认登录页面创建了一个登录页面。谁能告诉我如何使用数据库检查用户名和密码,并在成功登录后转到下一页。我使用 psql 并使用 hibernate 连接。

Regards Suresh S

问候苏雷什 S

回答by Suresh S

I have done the login page and session handling using threadlocal pattern in Vaadin framework and it is working fine. Refer Login FormSessions Threadlocal pattern

我已经在 Vaadin 框架中使用线程本地模式完成了登录页面和会话处理,并且工作正常。参考登录表单会话线程本地模式

回答by Mischa

Even though it uses JPA and the appfoundation framework, the Login Screen implementation of http://code.google.com/p/instant-webapp/might give you some inspiration on how this can be achieved.

尽管它使用 JPA 和 appfoundation 框架,但http://code.google.com/p/instant-webapp/的登录屏幕实现可能会给您一些关于如何实现这一点的灵感。