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
4a43d17f
Commit
4a43d17f
authored
May 06, 2020
by
Gabriele Civitarese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small refactoring
parent
484d8f65
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
Users.java
beans/Users.java
+5
-2
HelloWorld.java
services/HelloWorld.java
+4
-1
No files found.
beans/Users.java
View file @
4a43d17f
...
...
@@ -17,9 +17,10 @@ public class Users {
@XmlElement
(
name
=
"users"
)
private
List
<
User
>
userslist
;
private
static
Users
instance
;
p
ublic
Users
()
{
p
rivate
Users
()
{
userslist
=
new
ArrayList
<
User
>();
}
...
...
@@ -31,10 +32,12 @@ public class Users {
}
public
synchronized
List
<
User
>
getUserslist
()
{
return
new
ArrayList
<>(
userslist
);
}
public
void
setUserslist
(
List
<
User
>
userslist
)
{
public
synchronized
void
setUserslist
(
List
<
User
>
userslist
)
{
this
.
userslist
=
userslist
;
}
...
...
services/HelloWorld.java
View file @
4a43d17f
...
...
@@ -28,13 +28,16 @@ public class HelloWorld {
@GET
@Produces
(
"application/json"
)
public
String
helloWorld2
(){
return
"{\"message\": \"helloWorld\"}"
;
}
@Path
(
"
/
inner"
)
@Path
(
"inner"
)
@GET
@Produces
(
"text/plain"
)
public
String
innerHello
(){
return
"Inner Hello!"
;
}
...
...
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