{
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8080
3 |
4 | spring:
5 | mvc:
6 | view:
7 | prefix: /view/
8 | suffix: .jsp
9 | profiles:
10 | active: dev
11 | main:
12 | banner-mode: off
13 | datasource:
14 | driver-class-name: com.mysql.cj.jdbc.Driver
15 | url: jdbc:mysql://localhost:3306/books?serverTimezone=UTC
16 | username: root
17 | password: rootPassword
18 | jpa:
19 | hibernate:
20 | ddl-auto: update
21 | show-sql: false
22 | database: mysql
23 | database-platform: org.hibernate.dialect.MySQL5Dialect
24 | open-in-view: false
25 | generate-ddl: false
26 |
--------------------------------------------------------------------------------
/src/main/webapp/static/js/main.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mamadaliev/spring-boot-jsp-postgres/d84cbb7c8262c9cc5a0822ee434835bd2a42ffae/src/main/webapp/static/js/main.js
--------------------------------------------------------------------------------
/src/main/webapp/view/book.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 |
3 |
4 | Book
5 |
6 |
7 |
8 |
9 | Book id: ${book.id}
10 | Book name: ${book.name}
11 | Book author: ${book.author}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/main/webapp/view/books.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
3 |
4 |
5 | Books
6 |
7 |
8 |
9 |
10 | ${book.id}
11 | ${book.name}
12 | ${book.author}
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/main/webapp/view/home.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="text/html;charset=UTF-8"%>
2 |
3 |
4 | Home page
5 |
6 |
7 |
8 | Welcome to Home page!
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------