我有一個正在運行的springmvc,在IBM Liberty配置文件上運行彈簧安全Web應用程序。我使用java配置來設置所有(並沒有web.xml)。如何將彈簧安全配置與IBM Liberty配置文件basicRegistry聯繫起來
擴展類WebSecurityConfigurerAdapter,我設置了用戶的簡單列表如下:
@Autowired
public void configureGlobalSecurity(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().withUser("bill").password("123456").roles("USER");
}
我不希望在我的代碼的用戶信息,所以我想給用戶註冊表移動到server.xml的IBM Liberty概要文件服務器。
<basicRegistry>
<user name="bill" password="123456"/>
</basicRegistry>
我該如何配置?
額外的信息我使用一個多模塊maven項目,耳朵和戰爭模塊。所以在server.xml中最後一行是
<enterpriseApplication id="hellospringEAR" location="hellospringEAR-00.00.0001-SNAPSHOT.ear" name="hellospringEAR"/>
任何提示或建議,非常感謝。
選中此[文章](HTTP://計算器.com/a/9847324/3701228),它描述瞭如何配置Java EE與Spring安全的集成(談論站點管理員,但是主體是相同的,你希望服務器的用戶)。 – Gas