Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
javab_20230928
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
javab_20230928
Commits
1104af1d
Commit
1104af1d
authored
Nov 08, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTime - pierwsza wersja
parent
fb602487
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletions
+39
-1
RHello.java
PC35-RestSerwer/src/main/java/rest/RHello.java
+1
-1
RTime.java
PC35-RestSerwer/src/main/java/rest/RTime.java
+38
-0
No files found.
PC35-RestSerwer/src/main/java/rest/RHello.java
View file @
1104af1d
...
...
@@ -8,7 +8,7 @@ public class RHello {
@GET
public
String
hello
()
{
return
"Hello
REST
"
;
return
"Hello
<b>REST</b>
"
;
}
}
PC35-RestSerwer/src/main/java/rest/RTime.java
0 → 100644
View file @
1104af1d
package
rest
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.LocalTime
;
import
jakarta.ws.rs.GET
;
import
jakarta.ws.rs.Path
;
@Path
(
"/dt"
)
public
class
RTime
{
// działa pod adresem: /dt
@GET
public
String
getDateTime
()
{
return
LocalDateTime
.
now
().
toString
();
}
// działa pod adresem: /dt/date
@GET
@Path
(
"/date"
)
public
String
getDate
()
{
return
LocalDate
.
now
().
toString
();
}
@GET
@Path
(
"/time"
)
public
String
getTime
()
{
return
LocalTime
.
now
().
toString
();
}
@GET
@Path
(
"/time/second"
)
public
int
getSecond
()
{
return
LocalTime
.
now
().
getSecond
();
}
}
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