更新实体类对象
This commit is contained in:
parent
8a3bb74af5
commit
965d8830d8
|
@ -8,7 +8,7 @@ import java.util.stream.Collectors;
|
|||
import javax.validation.Valid;
|
||||
|
||||
import com.ossez.spring.security.models.ERole;
|
||||
import com.ossez.spring.security.models.Role;
|
||||
import com.ossez.spring.security.models.entity.Role;
|
||||
import com.ossez.spring.security.payload.request.LoginRequest;
|
||||
import com.ossez.spring.security.payload.request.SignupRequest;
|
||||
import com.ossez.spring.security.payload.response.JwtResponse;
|
||||
|
@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ossez.spring.security.models.User;
|
||||
import com.ossez.spring.security.models.entity.User;
|
||||
import com.ossez.spring.security.repository.RoleRepository;
|
||||
import com.ossez.spring.security.repository.UserRepository;
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
package com.ossez.spring.security.models;
|
||||
package com.ossez.spring.security.models.entity;
|
||||
|
||||
import com.ossez.spring.security.models.ERole;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ossez.spring.security.models;
|
||||
package com.ossez.spring.security.models.entity;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
|
@ -3,7 +3,7 @@ package com.ossez.spring.security.repository;
|
|||
import java.util.Optional;
|
||||
|
||||
import com.ossez.spring.security.models.ERole;
|
||||
import com.ossez.spring.security.models.Role;
|
||||
import com.ossez.spring.security.models.entity.Role;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Optional;
|
|||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ossez.spring.security.models.User;
|
||||
import com.ossez.spring.security.models.entity.User;
|
||||
|
||||
@Repository
|
||||
public interface UserRepository extends JpaRepository<User, Long> {
|
||||
|
|
|
@ -9,7 +9,7 @@ import org.springframework.security.core.GrantedAuthority;
|
|||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import com.ossez.spring.security.models.User;
|
||||
import com.ossez.spring.security.models.entity.User;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
public class UserDetailsImpl implements UserDetails {
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.ossez.spring.security.models.User;
|
||||
import com.ossez.spring.security.models.entity.User;
|
||||
import com.ossez.spring.security.repository.UserRepository;
|
||||
|
||||
@Service
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
DROP ALL OBJECTS;
|
||||
|
||||
CREATE SCHEMA IF NOT EXISTS iOssez;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS iOssez.users
|
||||
(
|
||||
id INT NOT NULL,
|
||||
user_name varchar(11) NOT NULL,
|
||||
user_password varchar(2) NOT NULL,
|
||||
user_email varchar(2) NOT NULL,
|
||||
is_email_verified INT NOT NULL
|
||||
);
|
Loading…
Reference in New Issue