Spring 5.0 Projects
上QQ阅读APP看书,第一时间看更新

Defining the RESTful API controller for country language resource

For the CountryLanguage resource we need the following APIs:

  • Get languages for a country
  • Add a language for a country
  • Delete a language from the country

The code for this controller can be found in the CountryLanguageAPIController class and the tests for the API controller can be found in the CountryLanguageAPIControllerTest class, which is available in the source code of this book.