- Timestamp:
- 10/18/22 00:50:33 (2 years ago)
- Branches:
- master
- Children:
- 763289e
- Parents:
- 401a211
- Location:
- src/main
- Files:
-
- 10 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/SchedlrApplication.java
r401a211 r204464d 3 3 import org.springframework.boot.SpringApplication; 4 4 import org.springframework.boot.autoconfigure.SpringBootApplication; 5 import org.springframework.data.jpa.repository.config.EnableJpaAuditing; 5 6 6 7 @SpringBootApplication 8 @EnableJpaAuditing 7 9 public class SchedlrApplication { 8 10 -
src/main/java/edu/gjoko/schedlr/config/AppSecurityConfig.java
r401a211 r204464d 47 47 .authorizeRequests() 48 48 .antMatchers("/login*").permitAll() 49 .antMatchers("/register_customer").permitAll() 50 .antMatchers("/register_business").permitAll() 49 51 .antMatchers("/css/**").permitAll() 50 52 .antMatchers("/anonymous*").anonymous() -
src/main/java/edu/gjoko/schedlr/config/MvcConfig.java
r401a211 r204464d 11 11 public void addViewControllers(ViewControllerRegistry registry) { 12 12 registry.addViewController("/login").setViewName("login"); 13 registry.addViewController("/register /user").setViewName("register_user");14 registry.addViewController("/register /business").setViewName("register_business");13 registry.addViewController("/register_customer").setViewName("register_customer"); 14 registry.addViewController("/register_business").setViewName("register_business"); 15 15 registry.addViewController("/homepage").setViewName("homepage"); 16 16 } -
src/main/java/edu/gjoko/schedlr/entity/Business.java
r401a211 r204464d 35 35 private LocalDateTime closingTime; 36 36 37 @ OneToOne(cascade = CascadeType.ALL)38 @JoinColumn(name = "owner_id", referencedColumnName = "id" )37 @ManyToOne 38 @JoinColumn(name = "owner_id", referencedColumnName = "id", nullable = false) 39 39 private Stakeholder owner; 40 40 -
src/main/java/edu/gjoko/schedlr/entity/Service.java
r401a211 r204464d 5 5 import lombok.NoArgsConstructor; 6 6 import lombok.Setter; 7 import org.springframework.data.annotation.CreatedDate; 8 import org.springframework.data.annotation.LastModifiedDate; 9 import org.springframework.data.jpa.domain.support.AuditingEntityListener; 7 10 8 11 import javax.persistence.*; 12 import java.sql.Timestamp; 13 import java.time.LocalDateTime; 9 14 10 15 @Entity 16 @EntityListeners(AuditingEntityListener.class) 11 17 @Table(name = "service") 12 18 @Getter … … 32 38 @JoinColumn(name = "business_id") 33 39 private Business business; 40 41 @Column(name = "created") 42 @CreatedDate 43 private LocalDateTime created; 44 45 @Column(name = "modified") 46 @LastModifiedDate 47 private LocalDateTime modified; 34 48 } -
src/main/java/edu/gjoko/schedlr/entity/Stakeholder.java
r401a211 r204464d 5 5 import lombok.NoArgsConstructor; 6 6 import lombok.Setter; 7 import org.springframework.data.annotation.CreatedDate; 8 import org.springframework.data.annotation.LastModifiedDate; 9 import org.springframework.data.jpa.domain.support.AuditingEntityListener; 7 10 8 11 import javax.persistence.*; … … 10 13 11 14 @Entity 15 @EntityListeners(AuditingEntityListener.class) 12 16 @Table(name = "stakeholder") 13 17 @Getter … … 41 45 42 46 @Column(name = "created") 47 @CreatedDate 43 48 private LocalDateTime created; 44 49 45 50 @Column(name = "modified") 51 @LastModifiedDate 46 52 private LocalDateTime modified; 47 53 }
Note:
See TracChangeset
for help on using the changeset viewer.