|
In the initial use of STRUTS + HIBERNATE architecture, I used the data table class automatically generated by MECCLIPSE, where the DATE type data was initialized to JAVA.UTIL.DATE type. After I took out an instance using the FINDBYID method, it returned the DATE field corresponding to the instance. The value is JAVA.UTIL.DATE type, which is displayed in the form of "1990-11-11 00: 00: 00.0" on the interface, but this format does not conform to the database DATE type specification. An error will be reported when writing the database. The DATE type has no subsequent time, only the date, and simple processing can truncate strings, but I think this architecture should not solve this problem, otherwise it will become more complicated.
How do you solve this problem in general? |
|