spring-guides / gs-spring-boot

Building an Application with Spring Boot :: Learn how to build an application with minimal configuration.
https://spring.io/guides/gs/spring-boot/
Apache License 2.0
890 stars 4.51k forks source link

Not ready for non-English users #7

Closed paulvi closed 9 years ago

paulvi commented 10 years ago

Thank you for great work on guides.

Most of guides build do not have source encoding set:

for maven

<properties>
    <!-- use UTF-8 for everything -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

and for gradle

[ compileJava, compileTestJava ]*.options*.encoding = 'UTF-8'

http://www.romseysoftware.co.uk/2012/03/12/gradle-and-utf-8/

dsyer commented 10 years ago

Actually all the guides that use the spring-boot-starter-parent already have this set. So this one for sure must have?

paulvi commented 10 years ago

Well, I can't comment now. I have not tried spring-boot version since then.

gregturn commented 10 years ago

@rwinch Do you know anyway to create something that would embed this encoding? For example, would a tweak to the spring-boot-gradle-plugin be possible to introduce this? /cc @philwebb

rwinch commented 10 years ago

Yes you should be able to set the encoding in the Spring Boot Gradle plugin. I haven't really looked at the source of the Spring Boot plugin so I'm not sure exactly how it would be integrated (i.e. I don't know what assumptions the plugin makes which may make setting the property easier/harder). I'm guessing @philwebb would be able to do this fairly quickly since I think he wrote much of the plugin.

gregturn commented 10 years ago

I would prefer something more comprehensive than editing each individual build.gradle file, you know?

dsyer commented 9 years ago

It looks to me like that change was merged in 1.1.x somewhere, so this is now working in Maven and Gradle.