我试图在春天将对象作为XML返回,就像本指南一样: http //spring.io/guides/gs/rest-service/
除了我希望对象以xml而不是JSON的形式返回.
谁知道我怎么能这样做?Spring是否有任何依赖可以轻松地为XML做到这一点?或者,我是否需要使用marshaller然后以其他方式返回xml文件?
每当我跑步
sudo gem install rails
Run Code Online (Sandbox Code Playgroud)
我得到以下输出:
ERROR: Loading command: install (LoadError)
cannot load such file -- openssl
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Run Code Online (Sandbox Code Playgroud)
RVM版本:rvm 1.18.14,Ruby是2.0.0p0