首页>代码>Spring Security通过内存配置的用户账号实现登录验证的实例>/inmemory/src/main/java/com/memorynotfound/spring/security/web/HomeController.java
package com.memorynotfound.spring.security.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HomeController {
// @Autowired
// private InMemoryUserDetailsManager userManager;
@GetMapping("/")
public String greeting() {
return "Spring Security In-memory Authentication Example";
}
}
最近下载更多

最近浏览