package com.macro.mall.portal.config;

import com.macro.mall.portal.service.UmsMemberService;
import com.macro.mall.security.config.SecurityConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * mall-security模块相关配置
 * Created by macro on 2019/11/5.
 */
@Configuration
public class MallSecurityConfig {

    @Autowired
    private UmsMemberService memberService;

    @Bean
    public UserDetailsService userDetailsService() {
        //获取登录用户信息
        return username -> memberService.loadUserByUsername(username);
    }
}

@@ -91,62 +91,8 @@
 ce;%0A
-import com.macro.mall.security.config.SecurityConfig;%0A
 impo
@@ -267,202 +267,8 @@
 on;%0A
-import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;%0Aimport org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;%0A
 impo

Update MallSecurityConfig.java