Revision 57671
Added by Konstantina Galouni over 4 years ago
TestController.java | ||
---|---|---|
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
@RequestMapping(value = "/test-error2", method = RequestMethod.GET) |
35 |
public String getParam(@RequestParam() String param) {
|
|
35 |
public String getParam(@RequestParam String param) { |
|
36 | 36 |
return param; |
37 | 37 |
} |
38 | 38 |
|
... | ... | |
41 | 41 |
String str = null; |
42 | 42 |
return str.substring(2); |
43 | 43 |
} |
44 |
|
|
45 | 44 |
} |
Also available in: Unified diff
1. Schema changes: Move each entity on its own collection - each entity keeps ids for its sub-entities.
2. New controllers for each entity: TopicController.java, CategoryController.java, SubCategoryController.java, IndicatorController.java.
3. New DAOs for each entity: TopicDAO.java, MongoDBTopicDAO.java, CategoryDAO.java, MongoDBCategoryDAO.java, SubCategoryDAO.java, MongoDBSubCategoryDAO.java.
4. New custom Exceptions: EntityNotFoundException.java, PathNotValidException.java.
5. ExceptionsHandler.java: Handle new EntityNotFoundException (id not in db) and PathNotValidException (id exists in db but not in path given).