JSON and XML from Roo RESTful controllers

I have my Spring Roo project, and everything is fine, but the views are displayed using Tiles, and I would like them to be just passed JSON (possibly in XML) so that I can use them directly as webservices. Do you have any suggestions on how I should do this “Roo path”?

Greetings

Nick

+3
source share
5 answers

take a look at ContentNegotiatingViewResolver

There is a similar question on the Spring forums.

+1
source

This can help...

http://www.youtube.com/watch?v=TNE7NBLseRA - RESTful Spring Roo

" , - RESTful, Spring Roo. , . Roo JSON GET, PUT, POST DELETE Word.

+1

, . :

1- Spring Roo

2 - roo

3- Roo :

a-- project --topLevelPackage - projectName

b-- osgi start --url jdbc (:////home/binov1/workspaceLiferay/postgresql-9.4-1201.jdbc4.jar - jdbc)

c-- jpa setup --provider HIBERNATE - POSTGRES --hostName adresse --userName - --databaseName   

d-- - - .

e-- json all

f-- web mvc json setup

g-- web mvc json all

,

+1

JSON springsource.org .

JSON

json all 

json add

MVC roo:

web mvc json all 
0

Source: https://habr.com/ru/post/1732564/


All Articles