Changeset 044bd76


Ignore:
Timestamp:
01/30/23 23:34:33 (17 months ago)
Author:
Gjoko <goko_kostadinov@…>
Branches:
master
Children:
9280859
Parents:
763289e
Message:

Adding initial calendar version

Location:
src/main
Files:
7 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/edu/gjoko/schedlr/config/AppSecurityConfig.java

    r763289e r044bd76  
    5151                .antMatchers("/homepage").permitAll()
    5252                .antMatchers("/css/**").permitAll()
     53                .antMatchers("/js/**").permitAll()
    5354                .antMatchers("/anonymous*").anonymous()
    5455                .anyRequest()
  • src/main/java/edu/gjoko/schedlr/config/MvcConfig.java

    r763289e r044bd76  
    1515        registry.addViewController("/homepage").setViewName("homepage");
    1616    }
     17
     18
    1719}
  • src/main/java/edu/gjoko/schedlr/controllers/HomePageController.java

    r763289e r044bd76  
    55import org.springframework.web.bind.annotation.GetMapping;
    66import org.springframework.web.bind.annotation.PostMapping;
    7 import org.springframework.web.bind.annotation.RestController;
    87
    9 @RestController(value = "/homepage")
     8@Controller
    109public class HomePageController {
    1110
    12     @GetMapping
     11    @GetMapping(name = "/homepage")
    1312    public String getHomePageTemplate(Model model) {
    1413        return "homepage";
    1514    }
    1615
    17     @PostMapping
     16    @PostMapping(name = "/homepage")
    1817    public String postHomePageTemplate(Model model) {
    1918        return "homepage";
  • src/main/resources/application.properties

    r763289e r044bd76  
    33spring.datasource.password=postgres
    44
    5 spring.sql.init.mode=always
     5spring.sql.init.mode=never
    66
    7 spring.jpa.hibernate.ddl-auto=none
     7spring.jpa.hibernate.ddl-auto=validate
    88spring.jpa.show-sql=true
    99spring.jpa.properties.hibernate.format_sql=true
  • src/main/resources/data.sql

    r763289e r044bd76  
    11insert into stakeholder (id, created, email, first_name, last_name, modified, password, stakeholder_type, username)
    2 values (nextval('hibernate_sequence'), current_timestamp, 'admin@schedlr.com', 'admin', 'admin', current_timestamp, 'admin','ADMIN', 'admin');
     2values (nextval('hibernate_sequence'), current_timestamp, 'admin@schedlr.com', 'admin', 'admin', current_timestamp, '$2a$10$DJyjt.Vj/U8MEuYX1PXL9ukQSMwXHVdhre3POlTqpYzNxHB5gu/MW','ADMIN', 'admin');
    33
    44insert into stakeholder (id, created, email, first_name, last_name, modified, password, stakeholder_type, username)
    5 values (nextval('hibernate_sequence'), current_timestamp, 'user1@schedlr.com', 'gjoko', 'kostadinov', current_timestamp, 'user','CUSTOMER', 'user');
     5values (nextval('hibernate_sequence'), current_timestamp, 'user1@schedlr.com', 'gjoko', 'kostadinov', current_timestamp, '$2a$10$Zc28AcCpAgxB.e67UMF/2.FgchjH9QWB7z8nP0TdkrFneV4IHPXji','CUSTOMER', 'user');
  • src/main/resources/templates/homepage.html

    r763289e r044bd76  
    11<!DOCTYPE html>
    2 <html lang="en">
     2<html>
    33<head>
    4     <meta charset="UTF-8">
    5     <title>Homepage</title>
     4    <title>FullCalendar by Creative Tim </title>
     5
     6    <meta charset="utf-8"/>
     7    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
     8
     9
     10    <link href='css/fullcalendar.css' rel='stylesheet'/>
     11    <link href='css/fullcalendar.print.css' rel='stylesheet' media='print'/>
    612</head>
    713<body>
    8 
     14<div id='wrap'>
     15    <div id='calendar'></div>
     16    <div style='clear:both'></div>
     17</div>
     18<script src='js/jquery-1.10.2.js' type="text/javascript"></script>
     19<script src='js/jquery-ui.custom.min.js' type="text/javascript"></script>
     20<script src='js/fullcalendar.js' type="text/javascript"></script>
     21<script src="js/homepage.js" type="text/javascript"></script>
    922</body>
    1023</html>
Note: See TracChangeset for help on using the changeset viewer.