Java.util.TimeZone getTimeZone (ZoneID ZoneID) problems caused by the new addition method

Source: Internet
Author: User

A TimeZone object was configured with spring in the recently accepted project:

<= "Timezone4job"  class= "Java.util.TimeZone " Factory-method= "getTimeZone">          <value= " gmt+8:00 "/></bean>

Used to be running in 1.7, nothing wrong. Today changed 1.8 of the sdk,spring began to error, found that the original in 1.8 new method getTimeZone (ZoneID zoneid), spring will try to convert gmt+8:00 to ZoneID, and the pit Dad is zoneid. The (String ZoneID) supports fewer formats and directly errors.

Modify the spring configuration as follows to resolve the problem.

<= "Timezone4job"  class= "Java.util.TimeZone " Factory-method= "getTimeZone">          <value= " gmt+8:00 "  type=" String "/></bean> 

Java.util.TimeZone getTimeZone (ZoneID ZoneID) problems caused by the new addition method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.