-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1918dc
commit 40c6961
Showing
8 changed files
with
97 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
spring.jpa.hibernate.ddl-auto: update | ||
spring.datasource.driverClassName=org.postgresql.Driver | ||
spring.datasource.url: jdbc:postgresql://localhost:5432/hotelsdb | ||
spring.datasource.url: jdbc:postgresql://192.168.59.103:5432/hotelsdb | ||
spring.datasource.username=postgres | ||
spring.datasource.password=p0stgr3s | ||
spring.thymeleaf.cache=false | ||
spring.jpa.properties.hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect | ||
spring.jpa.properties.hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect | ||
http.mappers.json-pretty-print=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/resources/templates/mappings/partialsMappings.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/sitelayout"> | ||
<head> | ||
<title th:text="#{app.name}">List of Mappings</title> | ||
<link rel="stylesheet" th:href="@{/webjars/bootstrap/3.1.1/css/bootstrap.min.css}" | ||
href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"/> | ||
<link rel="stylesheet" th:href="@{/webjars/bootstrap/3.1.1/css/bootstrap-theme.css}" | ||
href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.css"/> | ||
<link rel="stylesheet" th:href="@{/css/application.css}" href="../../static/css/application.css"/> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-xs-12"> | ||
<h1 class="well well-small">Mappings</h1> | ||
</div> | ||
</div> | ||
<div th:fragment="content"> | ||
<div class="row"> | ||
<div class="col-xs-12"> | ||
<table class="table table-bordered table-striped"> | ||
<thead> | ||
<tr> | ||
<th width="50%">Path</th> | ||
<th width="10%">Bean</th> | ||
<th width="40%">Method</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="(k, v) in mappings"> | ||
<td>{{k}}</td> | ||
<td>{{v.bean}}</td> | ||
<td>{{v.method}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import org.junit.Test; | ||
import org.springframework.web.util.UriComponentsBuilder; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class UriCompTest { | ||
|
||
@Test | ||
public void testUriComps() { | ||
Map<String, String> map = new HashMap<String, String>(); | ||
map.put("one", "test1"); | ||
map.put("two", "test2"); | ||
|
||
System.out.println(UriComponentsBuilder.fromPath("/test/{one}/{two}").buildAndExpand(map).toUriString()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters