Commit fd3da40a by aye

代码提交

parent b9da2c02
package com.jty.nrsc;
package com.jty.wsxt;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
......
package com.jty.nrsc.application;
package com.jty.wsxt.application;
import com.jty.nrsc.application.service.AuthRoleServer;
import com.jty.nrsc.application.service.AuthUserServer;
import com.jty.nrsc.application.service.NrscAuthorityServer;
import com.jty.nrsc.application.service.NrscTeacherService;
import com.jty.wsxt.application.service.AuthRoleServer;
import com.jty.wsxt.application.service.AuthUserServer;
import com.jty.wsxt.application.service.NrscAuthorityServer;
import com.jty.wsxt.application.service.NrscTeacherService;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
......
......@@ -7,6 +7,6 @@
* 对内 调用领域层(领域对象或领域服务)完成各种业务逻辑任务(task)。
* 这一层也很适合写一些任务处理,日志监控
**/
package com.jty.nrsc.application;
package com.jty.wsxt.application;
package com.jty.nrsc.application.service;
package com.jty.wsxt.application.service;
import org.springframework.security.core.GrantedAuthority;
......
package com.jty.nrsc.application.service;
package com.jty.wsxt.application.service;
import com.jty.nrsc.domain.model.auth.role.AuthRole;
import com.jty.wsxt.domain.model.auth.role.AuthRole;
import com.jty.nrsc.interfaces.dto.AuthRoleDto;
import org.springframework.data.domain.Page;
......
package com.jty.nrsc.application.service;
package com.jty.wsxt.application.service;
import com.jty.nrsc.domain.model.auth.history.AuthUserHistory;
import com.jty.wsxt.domain.model.auth.history.AuthUserHistory;
import com.jty.nrsc.interfaces.dto.AuthUserHistoryDto;
import com.jty.nrsc.interfaces.dto.OperatorDto;
import org.springframework.data.domain.Page;
......
package com.jty.nrsc.application.service;
package com.jty.wsxt.application.service;
import com.jty.nrsc.domain.model.auth.authority.nrsc.NrscAuthority;
import com.jty.wsxt.domain.model.auth.authority.nrsc.NrscAuthority;
import java.util.List;
......
package com.jty.nrsc.application.service;
package com.jty.wsxt.application.service;
import com.jty.nrsc.domain.model.auth.user.nrsc.NrscTeacher;
import com.jty.nrsc.interfaces.dto.ChangePasswordDto;
import com.jty.wsxt.domain.model.auth.user.nrsc.NrscTeacher;
import com.jty.nrsc.interfaces.dto.NrscTeacherDto;
import com.jty.nrsc.interfaces.dto.NrscTeacherSearchDto;
import com.jty.nrsc.interfaces.dto.OperatorDto;
......
package com.jty.nrsc.application.service.impl;
package com.jty.wsxt.application.service.impl;
import com.jty.nrsc.application.service.AuthAuthorityService;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.authority.AuthAuthority;
import com.jty.nrsc.domain.model.auth.role.AuthRole;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.wsxt.application.service.AuthAuthorityService;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.authority.AuthAuthority;
import com.jty.wsxt.domain.model.auth.role.AuthRole;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
......
package com.jty.nrsc.application.service.impl;
package com.jty.wsxt.application.service.impl;
import com.jty.nrsc.application.service.AuthRoleServer;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.authority.AuthAuthority;
import com.jty.nrsc.domain.model.auth.role.AuthRole;
import com.jty.wsxt.application.service.AuthRoleServer;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.authority.AuthAuthority;
import com.jty.wsxt.domain.model.auth.role.AuthRole;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
import com.jty.nrsc.interfaces.dto.AuthRoleDto;
......@@ -12,9 +12,6 @@ import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import java.util.Iterator;
import java.util.List;
/**
* AuthRoleServerImpl
*
......
package com.jty.nrsc.application.service.impl;
package com.jty.wsxt.application.service.impl;
import com.jty.nrsc.application.service.AuthUserServer;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.history.*;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.wsxt.application.service.AuthUserServer;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.history.*;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import com.jty.nrsc.infrastructure.DomainEventPublisher;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
......
package com.jty.nrsc.application.service.impl;
package com.jty.wsxt.application.service.impl;
import com.jty.nrsc.application.service.NrscAuthorityServer;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.authority.nrsc.NrscAuthority;
import com.jty.wsxt.application.service.NrscAuthorityServer;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.authority.nrsc.NrscAuthority;
import org.springframework.stereotype.Service;
import java.util.List;
......
package com.jty.nrsc.application.service.impl;
import com.jty.nrsc.application.ApplicationRegistry;
import com.jty.nrsc.application.service.NrscTeacherService;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.role.AuthRole;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.nrsc.domain.model.auth.user.nrsc.NrscTeacher;
import com.jty.nrsc.domain.model.stage.BasicStage;
import com.jty.nrsc.domain.model.subject.BasicSubject;
package com.jty.wsxt.application.service.impl;
import com.jty.wsxt.application.ApplicationRegistry;
import com.jty.wsxt.application.service.NrscTeacherService;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.role.AuthRole;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import com.jty.wsxt.domain.model.auth.user.nrsc.NrscTeacher;
import com.jty.wsxt.domain.model.stage.BasicStage;
import com.jty.wsxt.domain.model.subject.BasicSubject;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
import com.jty.nrsc.interfaces.dto.ChangePasswordDto;
import com.jty.nrsc.interfaces.dto.NrscTeacherDto;
import com.jty.nrsc.interfaces.dto.NrscTeacherSearchDto;
import com.jty.nrsc.interfaces.dto.OperatorDto;
......@@ -18,7 +17,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.hibernate.query.criteria.internal.OrderImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.security.crypto.password.PasswordEncoder;
......@@ -26,7 +24,6 @@ import org.springframework.stereotype.Service;
import javax.persistence.criteria.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
......
package com.jty.nrsc.domain;
package com.jty.wsxt.domain;
import com.jty.nrsc.domain.model.auth.authority.AuthAuthorityRepository;
import com.jty.nrsc.domain.model.auth.authority.nrsc.NrscAuthorityRepository;
import com.jty.nrsc.domain.model.auth.client.ClientRepository;
import com.jty.nrsc.domain.model.auth.history.AuthUserHistoryRepository;
import com.jty.nrsc.domain.model.auth.role.RoleRepository;
import com.jty.nrsc.domain.model.auth.user.UserRepository;
import com.jty.nrsc.domain.model.auth.user.nrsc.NrscTeacher;
import com.jty.nrsc.domain.model.auth.user.nrsc.NrscTeacherRepository;
import com.jty.nrsc.domain.model.stage.BasicStageRepository;
import com.jty.nrsc.domain.model.subject.BasicSubjectRepository;
import com.jty.wsxt.domain.model.auth.authority.AuthAuthorityRepository;
import com.jty.wsxt.domain.model.auth.authority.nrsc.NrscAuthorityRepository;
import com.jty.wsxt.domain.model.auth.client.ClientRepository;
import com.jty.wsxt.domain.model.auth.history.AuthUserHistoryRepository;
import com.jty.wsxt.domain.model.auth.role.RoleRepository;
import com.jty.wsxt.domain.model.auth.user.UserRepository;
import com.jty.wsxt.domain.model.auth.user.nrsc.NrscTeacherRepository;
import com.jty.wsxt.domain.model.stage.BasicStageRepository;
import com.jty.wsxt.domain.model.subject.BasicSubjectRepository;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
......
package com.jty.nrsc.domain.model.auth.authority;
package com.jty.wsxt.domain.model.auth.authority;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jty.nrsc.domain.model.auth.role.AuthRole;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.nrsc.domain.shared.IdentifiedValueObject;
import com.jty.wsxt.domain.model.auth.role.AuthRole;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
......
package com.jty.nrsc.domain.model.auth.authority;
package com.jty.wsxt.domain.model.auth.authority;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
package com.jty.nrsc.domain.model.auth.authority.nrsc;
package com.jty.wsxt.domain.model.auth.authority.nrsc;
import com.jty.nrsc.domain.model.auth.authority.AuthAuthority;
import com.jty.wsxt.domain.model.auth.authority.AuthAuthority;
import lombok.Data;
import javax.persistence.DiscriminatorValue;
......
package com.jty.nrsc.domain.model.auth.authority.nrsc;
package com.jty.wsxt.domain.model.auth.authority.nrsc;
import org.springframework.data.jpa.repository.JpaRepository;
......
package com.jty.nrsc.domain.model.auth.client;
package com.jty.wsxt.domain.model.auth.client;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import lombok.Data;
import javax.persistence.Entity;
......
package com.jty.nrsc.domain.model.auth.client;
package com.jty.wsxt.domain.model.auth.client;
import org.springframework.data.jpa.repository.JpaRepository;
......
package com.jty.nrsc.domain.model.auth.history;
package com.jty.wsxt.domain.model.auth.history;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import lombok.Data;
import javax.persistence.Embedded;
......
package com.jty.nrsc.domain.model.auth.history;
package com.jty.wsxt.domain.model.auth.history;
import org.springframework.data.jpa.repository.JpaRepository;
......
package com.jty.nrsc.domain.model.auth.history;
package com.jty.wsxt.domain.model.auth.history;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.user.DisableUserEvent;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.user.DisableUserEvent;
import com.jty.nrsc.infrastructure.DomainEventSubscriber;
/**
......
package com.jty.nrsc.domain.model.auth.history;
package com.jty.wsxt.domain.model.auth.history;
import com.jty.nrsc.domain.model.auth.user.DisableUserEvent;
import com.jty.nrsc.domain.model.auth.user.EnableUserEvent;
import com.jty.wsxt.domain.model.auth.user.EnableUserEvent;
import com.jty.nrsc.infrastructure.DomainEventSubscriber;
/**
......
package com.jty.nrsc.domain.model.auth.history;
package com.jty.wsxt.domain.model.auth.history;
import com.jty.nrsc.domain.shared.ValueObject;
import com.jty.wsxt.domain.shared.ValueObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......
package com.jty.nrsc.domain.model.auth.history;
package com.jty.wsxt.domain.model.auth.history;
import com.jty.nrsc.domain.shared.ValueObject;
import com.jty.wsxt.domain.shared.ValueObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......
package com.jty.nrsc.domain.model.auth.role;
package com.jty.wsxt.domain.model.auth.role;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.nrsc.domain.model.auth.authority.AuthAuthority;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.nrsc.domain.shared.IdentifiedValueObject;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import com.jty.wsxt.domain.model.auth.authority.AuthAuthority;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
import lombok.Data;
......
package com.jty.nrsc.domain.model.auth.role;
package com.jty.wsxt.domain.model.auth.role;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
import java.util.Optional;
/**
......
package com.jty.nrsc.domain.model.auth.user;
package com.jty.wsxt.domain.model.auth.user;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.role.AuthRole;
import com.jty.nrsc.domain.model.auth.history.ManagerId;
import com.jty.nrsc.domain.model.auth.history.OperatorId;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.role.AuthRole;
import com.jty.wsxt.domain.model.auth.history.ManagerId;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import com.jty.nrsc.infrastructure.DomainEventPublisher;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
......
package com.jty.nrsc.domain.model.auth.user;
package com.jty.wsxt.domain.model.auth.user;
import com.jty.nrsc.domain.model.auth.history.ManagerId;
import com.jty.nrsc.domain.model.auth.history.OperatorId;
import com.jty.wsxt.domain.model.auth.history.ManagerId;
import com.jty.nrsc.infrastructure.DomainEvent;
import com.jty.nrsc.interfaces.dto.OperatorDto;
import lombok.AllArgsConstructor;
......
package com.jty.nrsc.domain.model.auth.user;
package com.jty.wsxt.domain.model.auth.user;
import com.jty.nrsc.domain.model.auth.history.ManagerId;
import com.jty.nrsc.domain.model.auth.history.OperatorId;
import com.jty.wsxt.domain.model.auth.history.ManagerId;
import com.jty.nrsc.infrastructure.DomainEvent;
import com.jty.nrsc.interfaces.dto.OperatorDto;
import lombok.AllArgsConstructor;
......
package com.jty.nrsc.domain.model.auth.user;
package com.jty.wsxt.domain.model.auth.user;
import org.springframework.data.jpa.repository.JpaRepository;
......
package com.jty.nrsc.domain.model.auth.user.nrsc;
import com.jty.nrsc.domain.DomainRegistry;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.nrsc.domain.model.stage.BasicStage;
import com.jty.nrsc.domain.model.subject.BasicSubject;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.nrsc.infrastructure.constants.TableConstants;
package com.jty.wsxt.domain.model.auth.user.nrsc;
import com.jty.wsxt.domain.DomainRegistry;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import com.jty.wsxt.domain.model.stage.BasicStage;
import com.jty.wsxt.domain.model.subject.BasicSubject;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
import lombok.Data;
......
package com.jty.nrsc.domain.model.auth.user.nrsc;
package com.jty.wsxt.domain.model.auth.user.nrsc;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
......
package com.jty.nrsc.domain.model.stage;
package com.jty.wsxt.domain.model.stage;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
......
package com.jty.nrsc.domain.model.stage;
package com.jty.wsxt.domain.model.stage;
import org.springframework.data.jpa.repository.JpaRepository;
......
package com.jty.nrsc.domain.model.subject;
package com.jty.wsxt.domain.model.subject;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.nrsc.domain.shared.IdentifiedEntityObject;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import com.jty.wsxt.domain.shared.IdentifiedEntityObject;
import lombok.Data;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
......
package com.jty.nrsc.domain.model.subject;
package com.jty.wsxt.domain.model.subject;
import com.jty.nrsc.domain.model.stage.BasicStage;
import org.springframework.data.jpa.repository.JpaRepository;
/**
......
......@@ -11,4 +11,4 @@
* 工厂(Factories): 创建复杂对象,隐藏创建细节
* 仓储(Repository): 提供查找和持久化对象的方法
*/
package com.jty.nrsc.domain;
\ No newline at end of file
package com.jty.wsxt.domain;
\ No newline at end of file
package com.jty.nrsc.domain.shared;
package com.jty.wsxt.domain.shared;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
......
package com.jty.nrsc.domain.shared;
package com.jty.wsxt.domain.shared;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
......
package com.jty.nrsc.domain.shared;
package com.jty.wsxt.domain.shared;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j;
......
package com.jty.nrsc.infrastructure;
package com.jty.wsxt.infrastructure;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
......
package com.jty.nrsc.infrastructure;
package com.jty.wsxt.infrastructure;
/**
* 领域事件超级父类
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import javax.servlet.ServletRequest;
import java.io.BufferedReader;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import java.io.Serializable;
import java.time.LocalDateTime;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import com.jty.nrsc.infrastructure.code.image.ImageCodeGenerator;
import com.jty.nrsc.infrastructure.code.sms.DefaultSmsCodeSender;
import com.jty.nrsc.infrastructure.code.sms.SmsCodeSender;
import com.jty.nrsc.infrastructure.properties.SecurityProperties;
import com.jty.wsxt.infrastructure.code.image.ImageCodeGenerator;
import com.jty.wsxt.infrastructure.code.sms.DefaultSmsCodeSender;
import com.jty.wsxt.infrastructure.code.sms.SmsCodeSender;
import com.jty.wsxt.infrastructure.properties.SecurityProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import com.jty.nrsc.infrastructure.properties.SecurityConstants;
import com.jty.wsxt.infrastructure.properties.SecurityConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import com.jty.nrsc.infrastructure.support.ResultCode;
import com.jty.wsxt.infrastructure.support.ResultCode;
import org.springframework.security.core.AuthenticationException;
/**
......
/**
*
*/
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import com.jty.nrsc.infrastructure.properties.SecurityProperties;
import com.jty.wsxt.infrastructure.properties.SecurityProperties;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import org.springframework.web.context.request.ServletWebRequest;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import org.springframework.web.context.request.ServletWebRequest;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import org.springframework.web.context.request.ServletWebRequest;
......
/**
*
*/
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.jty.nrsc.infrastructure.code;
package com.jty.wsxt.infrastructure.code;
import com.jty.nrsc.infrastructure.properties.SecurityConstants;
import com.jty.wsxt.infrastructure.properties.SecurityConstants;
/**
* 验证码类型枚举
......
package com.jty.nrsc.infrastructure.code.image;
package com.jty.wsxt.infrastructure.code.image;
import com.jty.nrsc.infrastructure.code.ValidateCode;
import com.jty.wsxt.infrastructure.code.ValidateCode;
import lombok.Data;
import java.awt.image.BufferedImage;
......
package com.jty.nrsc.infrastructure.code.image;
package com.jty.wsxt.infrastructure.code.image;
import com.jty.nrsc.infrastructure.code.ValidateCodeGenerator;
import com.jty.nrsc.infrastructure.properties.SecurityProperties;
import com.jty.wsxt.infrastructure.code.ValidateCodeGenerator;
import com.jty.wsxt.infrastructure.properties.SecurityProperties;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.ServletRequestUtils;
......
/**
*
*/
package com.jty.nrsc.infrastructure.code.image;
package com.jty.wsxt.infrastructure.code.image;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jty.nrsc.infrastructure.code.impl.AbstractValidateCodeProcessor;
import com.jty.nrsc.infrastructure.support.Result;
import com.jty.wsxt.infrastructure.code.impl.AbstractValidateCodeProcessor;
import com.jty.wsxt.infrastructure.support.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.ServletWebRequest;
......
/**
*
*/
package com.jty.nrsc.infrastructure.code.impl;
package com.jty.wsxt.infrastructure.code.impl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jty.nrsc.infrastructure.code.*;
import com.jty.wsxt.infrastructure.code.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.ServletRequestBindingException;
......
package com.jty.nrsc.infrastructure.code.impl;
package com.jty.wsxt.infrastructure.code.impl;
import com.jty.nrsc.infrastructure.code.ValidateCode;
import com.jty.nrsc.infrastructure.code.ValidateCodeException;
import com.jty.nrsc.infrastructure.code.ValidateCodeRepository;
import com.jty.nrsc.infrastructure.code.ValidateCodeType;
import com.jty.wsxt.infrastructure.code.ValidateCode;
import com.jty.wsxt.infrastructure.code.ValidateCodeException;
import com.jty.wsxt.infrastructure.code.ValidateCodeRepository;
import com.jty.wsxt.infrastructure.code.ValidateCodeType;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
......
package com.jty.nrsc.infrastructure.code.sms;
package com.jty.wsxt.infrastructure.code.sms;
import com.aliyuncs.exceptions.ClientException;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
import com.jty.wsxt.infrastructure.support.BusinessException;
import com.jty.wsxt.infrastructure.support.ResultCode;
import lombok.extern.slf4j.Slf4j;
/**
......
package com.jty.nrsc.infrastructure.code.sms;
package com.jty.wsxt.infrastructure.code.sms;
import com.jty.nrsc.infrastructure.code.ValidateCode;
import com.jty.nrsc.infrastructure.code.ValidateCodeGenerator;
import com.jty.nrsc.infrastructure.properties.SecurityProperties;
import com.jty.wsxt.infrastructure.code.ValidateCode;
import com.jty.wsxt.infrastructure.code.ValidateCodeGenerator;
import com.jty.wsxt.infrastructure.properties.SecurityProperties;
import org.apache.commons.lang.RandomStringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
package com.jty.nrsc.infrastructure.code.sms;
package com.jty.wsxt.infrastructure.code.sms;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jty.nrsc.infrastructure.code.ValidateCode;
import com.jty.nrsc.infrastructure.code.impl.AbstractValidateCodeProcessor;
import com.jty.nrsc.infrastructure.properties.SecurityConstants;
import com.jty.nrsc.infrastructure.support.Result;
import com.jty.wsxt.infrastructure.code.ValidateCode;
import com.jty.wsxt.infrastructure.code.impl.AbstractValidateCodeProcessor;
import com.jty.wsxt.infrastructure.properties.SecurityConstants;
import com.jty.wsxt.infrastructure.support.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.ServletRequestUtils;
......
/**
*
*/
package com.jty.nrsc.infrastructure.code.sms;
package com.jty.wsxt.infrastructure.code.sms;
/**
* 短信验证码生成器
......
package com.jty.nrsc.infrastructure.code.sms;
package com.jty.wsxt.infrastructure.code.sms;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
......@@ -9,7 +9,7 @@ import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import com.jty.nrsc.infrastructure.constants.AlibabaConstants;
import com.jty.wsxt.infrastructure.constants.AlibabaConstants;
import java.text.SimpleDateFormat;
import java.util.Date;
......
package com.jty.nrsc.infrastructure.config;
package com.jty.wsxt.infrastructure.config;
import com.jty.nrsc.infrastructure.security.MyClientDetailService;
import com.jty.nrsc.infrastructure.security.MyUserDetailService;
import com.jty.wsxt.infrastructure.security.MyClientDetailService;
import com.jty.wsxt.infrastructure.security.MyUserDetailService;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
......
package com.jty.nrsc.infrastructure.config;
package com.jty.wsxt.infrastructure.config;
import feign.RequestInterceptor;
import feign.RequestTemplate;
......
package com.jty.nrsc.infrastructure.config;
package com.jty.wsxt.infrastructure.config;
import com.jty.nrsc.infrastructure.code.ValidateCodeSecurityConfig;
import com.jty.nrsc.infrastructure.security.CustomAuthenticationFilter;
import com.jty.nrsc.infrastructure.security.CustomTokenFilter;
import com.jty.nrsc.infrastructure.security.embed.EmbedAuthenticationConfig;
import com.jty.wsxt.infrastructure.code.ValidateCodeSecurityConfig;
import com.jty.wsxt.infrastructure.security.CustomAuthenticationFilter;
import com.jty.wsxt.infrastructure.security.CustomTokenFilter;
import com.jty.wsxt.infrastructure.security.embed.EmbedAuthenticationConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......
package com.jty.nrsc.infrastructure.config;
package com.jty.wsxt.infrastructure.config;
import com.jty.nrsc.infrastructure.properties.SecurityProperties;
import com.jty.nrsc.infrastructure.security.MyRedisTokenStore;
import com.jty.wsxt.infrastructure.properties.SecurityProperties;
import com.jty.wsxt.infrastructure.security.MyRedisTokenStore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
......
package com.jty.nrsc.infrastructure.config;
package com.jty.wsxt.infrastructure.config;
import com.jty.nrsc.infrastructure.security.embed.EmbedAuthenticationProvider;
import com.jty.wsxt.infrastructure.security.embed.EmbedAuthenticationProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......
......@@ -7,4 +7,4 @@
* 为用户界面层 提供组件配置
* 基础设施层还能够通过架构框架来支持四个层次间的交互模式。
*/
package com.jty.nrsc.infrastructure;
\ No newline at end of file
package com.jty.wsxt.infrastructure;
\ No newline at end of file
package com.jty.nrsc.infrastructure.properties;
package com.jty.wsxt.infrastructure.properties;
public interface SecurityConstants {
......
package com.jty.nrsc.infrastructure.properties;
package com.jty.wsxt.infrastructure.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import lombok.Getter;
import lombok.Setter;
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang.StringUtils;
......@@ -31,7 +31,7 @@ public class CustomAuthenticationFilter extends UsernamePasswordAuthenticationFi
ObjectMapper mapper = new ObjectMapper();
UsernamePasswordAuthenticationToken authRequest = null;
try (InputStream is = request.getInputStream()){
AuthenticationBean authenticationBean = mapper.readValue(is,AuthenticationBean.class);
AuthenticationBean authenticationBean = mapper.readValue(is, AuthenticationBean.class);
authRequest = new UsernamePasswordAuthenticationToken(
authenticationBean.getUsername(), authenticationBean.getPassword());
}catch (IOException e) {
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.jty.nrsc.infrastructure.support.Result;
import com.jty.nrsc.infrastructure.util.HeadUtils;
import com.jty.wsxt.infrastructure.support.Result;
import com.jty.wsxt.infrastructure.util.HeadUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import com.jty.nrsc.domain.model.auth.client.AuthClient;
import com.jty.nrsc.domain.model.auth.client.ClientRepository;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
import com.jty.wsxt.domain.model.auth.client.AuthClient;
import com.jty.wsxt.domain.model.auth.client.ClientRepository;
import com.jty.wsxt.infrastructure.support.BusinessException;
import com.jty.wsxt.infrastructure.support.ResultCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.oauth2.provider.ClientDetails;
import org.springframework.security.oauth2.provider.ClientDetailsService;
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory;
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import com.jty.nrsc.application.service.AuthAuthorityService;
import com.jty.nrsc.domain.model.auth.user.AuthUser;
import com.jty.nrsc.domain.model.auth.user.UserRepository;
import com.jty.nrsc.infrastructure.support.BusinessException;
import com.jty.nrsc.infrastructure.support.ResultCode;
import com.jty.wsxt.application.service.AuthAuthorityService;
import com.jty.wsxt.domain.model.auth.user.AuthUser;
import com.jty.wsxt.domain.model.auth.user.UserRepository;
import com.jty.wsxt.infrastructure.support.BusinessException;
import com.jty.wsxt.infrastructure.support.ResultCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
......
package com.jty.nrsc.infrastructure.security;
package com.jty.wsxt.infrastructure.security;
import com.jty.nrsc.infrastructure.support.Result;
import com.jty.nrsc.infrastructure.support.ResultCode;
import com.jty.nrsc.interfaces.dto.NrscTeacherDto;
import com.jty.wsxt.infrastructure.support.Result;
import com.jty.wsxt.infrastructure.support.ResultCode;
import com.jty.wsxt.interfaces.dto.NrscTeacherDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.http.HttpStatus;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment