spring可以支持共享会员的多个应用程序吗? [英] can spring support multi applications sharing membership?

查看:117
本文介绍了spring可以支持共享会员的多个应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

spring框架是否支持共享通用用户群的多个应用程序?

Does the spring framework support multi applications sharing a common user base?

例如2个独立的Web应用程序以某种方式挂接到单个数据库中,以获取与用户相关的信息(用户名,密码,甚至角色)

e.g. 2 separate web applications somehow hook into a single database to get user related information (username, password, and maybe even roles)

想法就是这样,类似于 asp.net成员身份

The idea is this, something similiar to asp.net membership

它的工作原理是这样,您可以有10个网站,所有网站都从同一数据源提取其成员资格API.安全性(角色)和站点映射都通过此成员资格API执行.

it works like this, you can have 10 websites, all pulling their membership API from the same datasource. Security (roles) and site mappings are all peformed via this membership API.

通常,您发布应用程序后会发生什么.然后,您发布另一个应用程序,然后客户询问您是否可以合并用户等.asp.net成员资格从一开始就解决了这个问题.

Usually what happens is you release a application. Then you release another application, and then your clients ask if you can merge the users etc. The asp.net membership solves this problem from the get-go.

更新

我并不是要求单点登录,因为您只需登录一次即可访问任何网站.但是,您拥有可以在所有站点上使用的相同登录凭据.

I am not asking for single-sign on in the sense that you can go to any website by just logging in once. But rather you have the same login credentials that can be used on all sites.

推荐答案

单个数据库可以由多个应用程序(包括Spring应用程序)访问.只需通常通过数据源为每个应用程序提供对该数据库的访问权限(是的,Java应用程序可以使用多个数据源).

A single database can be accessed by multiple applications, including Spring applications. Just provide access to this database to each applications, typically through a datasource (and yes, a Java application can use several datasources).

OP的意图实际上不清楚.根据一些评论,似乎该问题可能与SSO有关.在这种情况下,建议您查看 Spring Security ,或者CAS实现,例如 JA-SIG CAS

The intent of the OP is actually not clear. According to some comments, it seems that the question might be about SSO. In that case, I'd suggest to have a look at Spring Security, or a CAS implementation like JA-SIG CAS, or Spring Security with CAS.

PS:我并不是说要无礼,但是您应该学习如何聪明地问问题.例如,在这里,您应该公开目标,而不是寻求特定的解决方案(请参见描述目标,而不是步骤).首先,读者无法猜测您没有告诉他们什么,这非常令人沮丧(即使我很乐意为您提供帮助).其次,您将获得更好的答案(并避免双方感到沮丧).认真地读那篇论文,真的很值得.

PS: I don't mean to be rude but you should learn How To Ask Questions The Smart Way. For example here, you should expose your goal instead of asking for a specific solution (see Describe the goal, not the step). First, readers can't guess what you don't tell them and it is very frustrating (even if I'm happy to help). Second, you'll get much better answers (and avoid frustration on both sides). Seriously, read that paper, it's really worth it.

这篇关于spring可以支持共享会员的多个应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆