Index: src/main/java/com/example/moviezone/MovieZoneApplication.java
===================================================================
--- src/main/java/com/example/moviezone/MovieZoneApplication.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/MovieZoneApplication.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -3,6 +3,12 @@
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.thymeleaf.extras.springsecurity5.dialect.SpringSecurityDialect;
 
-@SpringBootApplication
+
+@SpringBootApplication()
 public class MovieZoneApplication {
 
@@ -10,4 +16,12 @@
         SpringApplication.run(MovieZoneApplication.class, args);
     }
+    @Bean
+    PasswordEncoder passwordEncoder() {
+        return new BCryptPasswordEncoder(10);
+    }
+    @Bean
+    public SpringSecurityDialect securityDialect() {
+        return new SpringSecurityDialect();
+    }
 
 }
Index: src/main/java/com/example/moviezone/config/WebSecurityConfig.java
===================================================================
--- src/main/java/com/example/moviezone/config/WebSecurityConfig.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/config/WebSecurityConfig.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -30,5 +30,5 @@
         http.csrf().disable()
                 .authorizeRequests()
-                .antMatchers("/", "/home", "/assets/**", "/register", "/products", "/api/**").permitAll()
+                .antMatchers("/", "/home", "/assets/**", "/register", "/api/**").permitAll()
                 .antMatchers("/admin/**").hasRole("ADMIN")
                 .anyRequest()
@@ -42,5 +42,4 @@
                 .logout()
                 .logoutUrl("/logout")
-                .clearAuthentication(true)
                 .invalidateHttpSession(true)
                 .deleteCookies("JSESSIONID")
Index: src/main/java/com/example/moviezone/model/Film.java
===================================================================
--- src/main/java/com/example/moviezone/model/Film.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Film.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -24,5 +24,5 @@
     String genre;
     String age_category;
-
+    String url;
     String director;
     LocalDate start_date;
Index: src/main/java/com/example/moviezone/model/Projection.java
===================================================================
--- src/main/java/com/example/moviezone/model/Projection.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Projection.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -24,8 +24,11 @@
     LocalDate date_time_end;
     @ManyToOne
+    @JoinColumn(name = "id_film")
     Film film;
     @ManyToOne
+    @JoinColumn(name = "id_event")
     Event event;
     @ManyToOne
+    @JoinColumn(name = "id_discount")
     Discount discount;
 
Index: src/main/java/com/example/moviezone/model/Projection_Room.java
===================================================================
--- src/main/java/com/example/moviezone/model/Projection_Room.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Projection_Room.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -20,4 +20,5 @@
     Integer projection_room_number;
     @ManyToOne
+    @JoinColumn(name = "id_cinema")
     Cinema cinema;
 
Index: src/main/java/com/example/moviezone/model/Salary.java
===================================================================
--- src/main/java/com/example/moviezone/model/Salary.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Salary.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -24,4 +24,5 @@
 
     @ManyToOne
+    @JoinColumn(name = "id_worker")
     Worker worker;
 }
Index: src/main/java/com/example/moviezone/model/Seat.java
===================================================================
--- src/main/java/com/example/moviezone/model/Seat.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Seat.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -18,6 +18,8 @@
     Integer seat_number;
     @ManyToOne
+    @JoinColumn(name = "id_room")
     Projection_Room projection_room;
     @ManyToOne
+    @JoinColumn(name = "id_category")
     Category category;
 
Index: src/main/java/com/example/moviezone/model/Ticket.java
===================================================================
--- src/main/java/com/example/moviezone/model/Ticket.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Ticket.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -6,4 +6,5 @@
 import lombok.ToString;
 
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 
@@ -20,7 +21,8 @@
 
     Integer price;
-    LocalDateTime date_reserved;
+    LocalDate date_reserved;
 
     @ManyToOne
+    @JoinColumn(name = "id_customer")
     Customer customer;
 
Index: src/main/java/com/example/moviezone/model/User.java
===================================================================
--- src/main/java/com/example/moviezone/model/User.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/User.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -9,4 +9,5 @@
 
 import javax.management.relation.Role;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.Collection;
@@ -29,15 +30,8 @@
     String contact_number;
     String username;
-    LocalDateTime date_created;
+    LocalDate date_created;
 
-    private boolean isAccountNonExpired = true;
-    private boolean isAccountNonLocked = true;
-    private boolean isCredentialsNonExpired = true;
-    private boolean isEnabled = true;
 
-    @Enumerated(value = EnumType.STRING)
-    private Role role;
-
-    public User(Integer id_user, String password, String first_name, String last_name, String address, String contact_number, String username, LocalDateTime date_created, Role role) {
+    public User(Integer id_user, String password, String first_name, String last_name, String address, String contact_number, String username, LocalDate date_created) {
         this.id_user = id_user;
         this.password = password;
@@ -48,5 +42,4 @@
         this.username = username;
         this.date_created = date_created;
-        this.role = role;
     }
 
@@ -63,20 +56,20 @@
     @Override
     public boolean isAccountNonExpired() {
-        return isAccountNonExpired;
+        return true;
     }
 
     @Override
     public boolean isAccountNonLocked() {
-        return isAccountNonLocked;
+        return true;
     }
 
     @Override
     public boolean isCredentialsNonExpired() {
-        return isCredentialsNonExpired;
+        return true;
     }
 
     @Override
     public boolean isEnabled() {
-        return isEnabled;
+        return true;
     }
 
Index: src/main/java/com/example/moviezone/model/Work_Hours_Weekly.java
===================================================================
--- src/main/java/com/example/moviezone/model/Work_Hours_Weekly.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Work_Hours_Weekly.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -30,4 +30,5 @@
 
     @ManyToOne
+    @JoinColumn(name = "id_worker")
     Worker worker;
 }
Index: src/main/java/com/example/moviezone/model/Worker.java
===================================================================
--- src/main/java/com/example/moviezone/model/Worker.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/Worker.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -23,5 +23,6 @@
     String work_hours_to;
 
-    @ManyToOne()
+    @ManyToOne
+    @JoinColumn(name = "id_cinema")
     Cinema cinema;
     @Override
Index: src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEvent.java
===================================================================
--- src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEvent.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/model/manytomany/CustomerIsInterestedInEvent.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -13,5 +13,5 @@
 @RequiredArgsConstructor
 @Table(name = "`customer_is_interested_in_event`")
-@IdClass(CinemaPlaysFilmId.class)
+@IdClass(CustomerIsInterestedInEventId.class)
 public class CustomerIsInterestedInEvent {
     @Id
Index: src/main/java/com/example/moviezone/repository/CategoryRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CategoryRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/CategoryRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -5,5 +5,5 @@
 import org.springframework.stereotype.Repository;
 
-
+@Repository
 public interface CategoryRepository extends JpaRepository<Category,Integer>{
 }
Index: src/main/java/com/example/moviezone/repository/CinemaOrganizesEventRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CinemaOrganizesEventRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/CinemaOrganizesEventRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -4,5 +4,7 @@
 import com.example.moviezone.model.manytomany.CinemaOrganizesEventId;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface CinemaOrganizesEventRepository extends JpaRepository<CinemaOrganizesEvent, CinemaOrganizesEventId> {
 }
Index: src/main/java/com/example/moviezone/repository/CinemaPlaysFilmRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CinemaPlaysFilmRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/CinemaPlaysFilmRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -4,5 +4,7 @@
 import com.example.moviezone.model.manytomany.CinemaPlaysFilmId;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface CinemaPlaysFilmRepository extends JpaRepository<CinemaPlaysFilm, CinemaPlaysFilmId> {
 }
Index: src/main/java/com/example/moviezone/repository/CinemaRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CinemaRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/CinemaRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -3,7 +3,8 @@
 import com.example.moviezone.model.Cinema;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
 
-
+@Repository
 public interface CinemaRepository extends JpaRepository<Cinema,Integer> {
 }
Index: src/main/java/com/example/moviezone/repository/CustomerIsInterestedInEventRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CustomerIsInterestedInEventRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/CustomerIsInterestedInEventRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -4,5 +4,7 @@
 import com.example.moviezone.model.manytomany.CustomerIsInterestedInEventId;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface CustomerIsInterestedInEventRepository extends JpaRepository<CustomerIsInterestedInEvent, CustomerIsInterestedInEventId> {
 }
Index: src/main/java/com/example/moviezone/repository/CustomerRatesFilmRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CustomerRatesFilmRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/CustomerRatesFilmRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -4,5 +4,7 @@
 import com.example.moviezone.model.manytomany.CustomerRatesFilmId;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface CustomerRatesFilmRepository extends JpaRepository<CustomerRatesFilm, CustomerRatesFilmId> {
 }
Index: src/main/java/com/example/moviezone/repository/CustomerRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/CustomerRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/CustomerRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -3,5 +3,7 @@
 import com.example.moviezone.model.Customer;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface CustomerRepository extends JpaRepository<Customer,Integer> {
 }
Index: src/main/java/com/example/moviezone/repository/SeatRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/SeatRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/SeatRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -3,5 +3,7 @@
 import com.example.moviezone.model.Seat;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface SeatRepository extends JpaRepository<Seat,Integer> {
 }
Index: src/main/java/com/example/moviezone/repository/TicketRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/TicketRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/TicketRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -4,7 +4,8 @@
 import com.example.moviezone.model.Ticket;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
 import java.util.List;
-
+@Repository
 public interface TicketRepository extends JpaRepository<Ticket,Integer> {
     List<Ticket> findAllByCustomer(Customer customer);
Index: src/main/java/com/example/moviezone/repository/UserRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/UserRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/UserRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -4,7 +4,8 @@
 import com.example.moviezone.model.User;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
 import java.util.List;
-
+@Repository
 public interface UserRepository extends JpaRepository<User,Integer> {
     User findByUsername(String username);
Index: src/main/java/com/example/moviezone/repository/Work_Hours_WeeklyRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/Work_Hours_WeeklyRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/Work_Hours_WeeklyRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -4,5 +4,7 @@
 import com.example.moviezone.model.Work_Hours_Weekly;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface Work_Hours_WeeklyRepository extends JpaRepository<Work_Hours_Weekly,Integer> {
 }
Index: src/main/java/com/example/moviezone/repository/WorkerRepository.java
===================================================================
--- src/main/java/com/example/moviezone/repository/WorkerRepository.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/repository/WorkerRepository.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -3,5 +3,7 @@
 import com.example.moviezone.model.Worker;
 import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
 
+@Repository
 public interface WorkerRepository extends JpaRepository<Worker,Integer> {
 }
Index: src/main/java/com/example/moviezone/service/CustomerService.java
===================================================================
--- src/main/java/com/example/moviezone/service/CustomerService.java	(revision ac25203caa000c6e0e4fa9a176488015ede9a227)
+++ src/main/java/com/example/moviezone/service/CustomerService.java	(revision eb226b2e3140fe1a668383678034f66db359157b)
@@ -2,7 +2,8 @@
 
 import com.example.moviezone.model.Customer;
+import org.springframework.stereotype.Repository;
 
 import java.util.List;
-
+@Repository
 public interface CustomerService {
     List<Customer> findAllCustomers();
