Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
todo-list-example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lauri
todo-list-example
Commits
df1bea05
Commit
df1bea05
authored
2 years ago
by
George Adrian Stoica
Browse files
Options
Downloads
Patches
Plain Diff
fix: makes the springboot endpoint equivalent to jetty
parent
db3d6db8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
todolist/springboot/restserver/src/main/java/todolist/springboot/restserver/TodoModelController.java
+5
-5
5 additions, 5 deletions
...a/todolist/springboot/restserver/TodoModelController.java
with
5 additions
and
5 deletions
todolist/springboot/restserver/src/main/java/todolist/springboot/restserver/TodoModelController.java
+
5
−
5
View file @
df1bea05
...
@@ -21,7 +21,7 @@ import todolist.core.TodoModel;
...
@@ -21,7 +21,7 @@ import todolist.core.TodoModel;
@RequestMapping
(
TodoModelController
.
TODO_MODEL_SERVICE_PATH
)
@RequestMapping
(
TodoModelController
.
TODO_MODEL_SERVICE_PATH
)
public
class
TodoModelController
{
public
class
TodoModelController
{
public
static
final
String
TODO_MODEL_SERVICE_PATH
=
"
springboot/
todo"
;
public
static
final
String
TODO_MODEL_SERVICE_PATH
=
"todo"
;
@Autowired
@Autowired
private
TodoModelService
todoModelService
;
private
TodoModelService
todoModelService
;
...
@@ -47,7 +47,7 @@ public class TodoModelController {
...
@@ -47,7 +47,7 @@ public class TodoModelController {
* @param name the name of the TodoList
* @param name the name of the TodoList
* @return the corresponding TodoList
* @return the corresponding TodoList
*/
*/
@GetMapping
(
path
=
"/{name}"
)
@GetMapping
(
path
=
"/
list/
{name}"
)
public
AbstractTodoList
getTodoList
(
@PathVariable
(
"name"
)
String
name
)
{
public
AbstractTodoList
getTodoList
(
@PathVariable
(
"name"
)
String
name
)
{
AbstractTodoList
todoList
=
getTodoModel
().
getTodoList
(
name
);
AbstractTodoList
todoList
=
getTodoModel
().
getTodoList
(
name
);
checkTodoList
(
todoList
,
name
);
checkTodoList
(
todoList
,
name
);
...
@@ -61,7 +61,7 @@ public class TodoModelController {
...
@@ -61,7 +61,7 @@ public class TodoModelController {
* @param todoList the todoList to add
* @param todoList the todoList to add
* @return true if it was added, false if it replaced
* @return true if it was added, false if it replaced
*/
*/
@PutMapping
(
path
=
"/{name}"
)
@PutMapping
(
path
=
"/
list/
{name}"
)
public
boolean
putTodoList
(
@PathVariable
(
"name"
)
String
name
,
public
boolean
putTodoList
(
@PathVariable
(
"name"
)
String
name
,
@RequestBody
AbstractTodoList
todoList
)
{
@RequestBody
AbstractTodoList
todoList
)
{
boolean
added
=
getTodoModel
().
putTodoList
(
todoList
)
==
null
;
boolean
added
=
getTodoModel
().
putTodoList
(
todoList
)
==
null
;
...
@@ -75,7 +75,7 @@ public class TodoModelController {
...
@@ -75,7 +75,7 @@ public class TodoModelController {
* @param name the name of the TodoList
* @param name the name of the TodoList
* @param newName the new name
* @param newName the new name
*/
*/
@PostMapping
(
path
=
"/{name}/rename"
)
@PostMapping
(
path
=
"/
list/
{name}/rename"
)
public
boolean
renameTodoList
(
@PathVariable
(
"name"
)
String
name
,
public
boolean
renameTodoList
(
@PathVariable
(
"name"
)
String
name
,
@RequestParam
(
"newName"
)
String
newName
)
{
@RequestParam
(
"newName"
)
String
newName
)
{
AbstractTodoList
todoList
=
getTodoModel
().
getTodoList
(
name
);
AbstractTodoList
todoList
=
getTodoModel
().
getTodoList
(
name
);
...
@@ -93,7 +93,7 @@ public class TodoModelController {
...
@@ -93,7 +93,7 @@ public class TodoModelController {
*
*
* @param name the name of the TodoList
* @param name the name of the TodoList
*/
*/
@DeleteMapping
(
path
=
"/{name}"
)
@DeleteMapping
(
path
=
"/
list/
{name}"
)
public
boolean
removeTodoList
(
@PathVariable
(
"name"
)
String
name
)
{
public
boolean
removeTodoList
(
@PathVariable
(
"name"
)
String
name
)
{
AbstractTodoList
todoList
=
getTodoModel
().
getTodoList
(
name
);
AbstractTodoList
todoList
=
getTodoModel
().
getTodoList
(
name
);
checkTodoList
(
todoList
,
name
);
checkTodoList
(
todoList
,
name
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment