While I have no knowledge of the Spring Framework, the way to figure out a per request Locale
object without session information is usually by looking at the Accept-Language
HTTP header. Which isn't a very good choice because it misleads people to think they'll acquire the user's whereabouts.
As the link above states, you probably want to give the user a way to override your first guess by storing a preference option, looking at the request IP (using a geocoding database like in this question) or something else. Where "storing a preference option" is the only thing that requires the notion of a "returning user". Most common choices are storing the Locale
object in the user's session. You can read about the (spring specific) list of options in the manual.
To answer the question: the static method Locale.getDefault()
will report the JVM "fallback" locale, which is usually derived from the system the JVM is running on (or as @a_horse_with_no_name points out, can be overriden with -Duser.locale
).