Comply to spring package structure

This commit is contained in:
Marcel Schwarz 2020-05-13 14:27:15 +02:00
parent 055abd95a4
commit bd89747020
14 changed files with 27 additions and 20 deletions

View File

@ -1,5 +1,7 @@
package de.hft.geotime.user; package de.hft.geotime.controllers;
import de.hft.geotime.entities.TimetrackUser;
import de.hft.geotime.repositories.TimetrackUserRepository;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication; import org.springframework.security.core.Authentication;

View File

@ -1,4 +1,4 @@
package de.hft.geotime.record; package de.hft.geotime.entities;
public enum RecordType { public enum RecordType {

View File

@ -1,4 +1,4 @@
package de.hft.geotime.role; package de.hft.geotime.entities;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;

View File

@ -1,6 +1,5 @@
package de.hft.geotime.record; package de.hft.geotime.entities;
import de.hft.geotime.timetrackaccount.TimetrackAccount;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;

View File

@ -1,6 +1,5 @@
package de.hft.geotime.timetrackaccount; package de.hft.geotime.entities;
import de.hft.geotime.user.TimetrackUser;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;

View File

@ -1,8 +1,8 @@
package de.hft.geotime.user; package de.hft.geotime.entities;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import de.hft.geotime.role.Role; import de.hft.geotime.entities.Role;
import de.hft.geotime.timetrackaccount.TimetrackAccount; import de.hft.geotime.entities.TimetrackAccount;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;

View File

@ -1,6 +1,7 @@
package de.hft.geotime.timetrackaccount; package de.hft.geotime.entities.projections;
import de.hft.geotime.user.TimetrackUser; import de.hft.geotime.entities.TimetrackAccount;
import de.hft.geotime.entities.TimetrackUser;
import org.springframework.data.rest.core.config.Projection; import org.springframework.data.rest.core.config.Projection;
@Projection(name = "withUser", types = TimetrackAccount.class) @Projection(name = "withUser", types = TimetrackAccount.class)

View File

@ -1,10 +1,11 @@
package de.hft.geotime.user; package de.hft.geotime.entities.projections;
import de.hft.geotime.entities.TimetrackUser;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.rest.core.config.Projection; import org.springframework.data.rest.core.config.Projection;
@Projection(name = "withRole", types = TimetrackUser.class) @Projection(name = "withRole", types = TimetrackUser.class)
public interface BasicUserProjection { public interface UserWithRoleProjection {
String getFirstname(); String getFirstname();

View File

@ -1,5 +1,6 @@
package de.hft.geotime.record; package de.hft.geotime.repositories;
import de.hft.geotime.entities.TimeRecord;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
public interface RecordRepository extends CrudRepository<TimeRecord, Long> { public interface RecordRepository extends CrudRepository<TimeRecord, Long> {

View File

@ -1,5 +1,6 @@
package de.hft.geotime.role; package de.hft.geotime.repositories;
import de.hft.geotime.entities.Role;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
public interface RoleRepository extends CrudRepository<Role, Long> { public interface RoleRepository extends CrudRepository<Role, Long> {

View File

@ -1,5 +1,6 @@
package de.hft.geotime.timetrackaccount; package de.hft.geotime.repositories;
import de.hft.geotime.entities.TimetrackAccount;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.data.rest.core.annotation.RepositoryRestResource;

View File

@ -1,5 +1,6 @@
package de.hft.geotime.user; package de.hft.geotime.repositories;
import de.hft.geotime.entities.TimetrackUser;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource; import org.springframework.data.rest.core.annotation.RestResource;

View File

@ -1,5 +1,7 @@
package de.hft.geotime.user; package de.hft.geotime.security;
import de.hft.geotime.entities.TimetrackUser;
import de.hft.geotime.repositories.TimetrackUserRepository;
import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UserDetailsService;

View File

@ -1,6 +1,5 @@
package de.hft.geotime.security; package de.hft.geotime.security;
import de.hft.geotime.user.UserDetailsServiceImpl;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;