Skip to content

Conversation

@sgrillon14
Copy link
Contributor

@sgrillon14 sgrillon14 commented May 10, 2016

When you do a Web Service to Expose a svg (example: web service expose flags of the world)

in my RestControler I use this syntax:
@RequestMapping(value = "/{country}", method = RequestMethod.GET, produces = MediaType.IMAGE_SVG_VALUE)

instead of

@RequestMapping(value = "/{country}", method = RequestMethod.GET, produces = "image/svg+xml")

is more smart :)

When you do a Web Service to Expose a svg (example: web service expose flags of the world)

in my RestControler I use this syntax:
@RequestMapping(value = "/{country}", method = RequestMethod.GET, produces = MediaType.IMAGE_NVG_VALUE) 

instead of

@RequestMapping(value = "/{country}", method = RequestMethod.GET, produces = "image/svg+xml")

is more smart :)
@YanshuoShang
Copy link

yes,this is more smart

@pivotal-issuemaster
Copy link

@sgrillon14 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@sgrillon14
Copy link
Contributor Author

I had personal licence (I'm an individual contributor)

@pivotal-issuemaster
Copy link

@sgrillon14 Thank you for signing the Contributor License Agreement!

@sgrillon14
Copy link
Contributor Author

@snicoll, what do you think this PR? (is it simple change but more smart)

@snicoll
Copy link
Member

snicoll commented May 3, 2018

None, otherwise I would have added a comment already.

@bclozel
Copy link
Member

bclozel commented May 3, 2018

Thanks for this contribution, but I don't see this as a very common media type in Spring applications. There's no specific support for that in Spring Framework, so it's mainly about the convenience of having it in the MediaType enum already vs storing in a static attribute that media type.

Arguably, we already have a lot of those, but we should try to limit ourselves there or we're in danger of having an even larger enum.

@bclozel bclozel closed this May 3, 2018
@sgrillon14
Copy link
Contributor Author

OK, it's a shame for the SVG because this standard is more and more used (to generate SVG side Back-End, for example flags, APP6 military symbols, games (dominos, playing cards, ...) ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants