Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_mszczonow_3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
alx_mszczonow_3
Commits
f40ef742
Commit
f40ef742
authored
Jul 25, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time5 - początek
parent
cba8a466
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
TimeController.java
src/main/java/alx/TimeController.java
+6
-1
szablon5.html
src/main/resources/templates/szablon5.html
+13
-0
No files found.
src/main/java/alx/TimeController.java
View file @
f40ef742
...
@@ -28,7 +28,7 @@ public class TimeController {
...
@@ -28,7 +28,7 @@ public class TimeController {
}
}
private
static
final
DateTimeFormatter
FORMAT_DATY
=
DateTimeFormatter
private
static
final
DateTimeFormatter
FORMAT_DATY
=
DateTimeFormatter
.
ofPattern
(
"EEEE, dd.MM.
YYYY
, 'godzina' HH:mm:ss"
,
new
Locale
(
"pl"
,
"PL"
));
.
ofPattern
(
"EEEE, dd.MM.
yyyy
, 'godzina' HH:mm:ss"
,
new
Locale
(
"pl"
,
"PL"
));
// Aby powiedzieć wprost, jaki jest format (content-type) odpowiedzi zwracanej przez metdę, można uzyć parametru produces
// Aby powiedzieć wprost, jaki jest format (content-type) odpowiedzi zwracanej przez metdę, można uzyć parametru produces
@RequestMapping
(
path
=
"/time3"
,
produces
=
"text/plain"
)
@RequestMapping
(
path
=
"/time3"
,
produces
=
"text/plain"
)
...
@@ -52,5 +52,10 @@ public class TimeController {
...
@@ -52,5 +52,10 @@ public class TimeController {
dt
.
toLocalTime
(),
dt
.
toLocalDate
(),
dt
.
format
(
FORMAT_DATY
));
dt
.
toLocalTime
(),
dt
.
toLocalDate
(),
dt
.
format
(
FORMAT_DATY
));
}
}
@RequestMapping
(
"/time5"
)
public
String
time5
()
{
LocalDateTime
dateTime
=
LocalDateTime
.
now
();
return
"szablon5.html"
;
}
}
}
src/main/resources/templates/szablon5.html
0 → 100644
View file @
f40ef742
<!DOCTYPE html>
<html
lang=
"pl"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Która godzina
</title>
</head>
<body>
<h1>
Szablon 5
</h1>
<p>
Zaraz powiem, która godzina...
</p>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment