Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
example_rest
Project
Project
Details
Activity
Releases
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
Gabriele Civitarese
example_rest
Commits
484d8f65
Commit
484d8f65
authored
Apr 11, 2019
by
Gabriele Civitarese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aggiunto endpoint
parent
67b84e3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
HelloWorld.java
services/HelloWorld.java
+10
-0
No files found.
services/HelloWorld.java
View file @
484d8f65
...
...
@@ -2,6 +2,7 @@ package services;
import
javax.ws.rs.GET
;
import
javax.ws.rs.Path
;
import
javax.ws.rs.PathParam
;
import
javax.ws.rs.Produces
;
@Path
(
"/helloworld"
)
...
...
@@ -15,6 +16,15 @@ public class HelloWorld {
}
@GET
@Path
(
"{name}"
)
@Produces
(
"text/plain"
)
public
String
helloWorldName
(
@PathParam
(
"name"
)
String
name
){
return
"Hello, "
+
name
+
"!"
;
}
@GET
@Produces
(
"application/json"
)
public
String
helloWorld2
(){
...
...
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