mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-16 00:15:42 +00:00
ref[storage]: refactor convert
This commit is contained in:
1 parent
28600e7102
commit
f25a6d2467
11 files changed
+14
-18
No files matched your search
+1
-2
@@ -11,11 +11,10 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.JsonUtils;
|
import com.zfoo.protocol.util.JsonUtils;
|
||||||
import com.zfoo.protocol.util.StringUtils;
|
import com.zfoo.protocol.util.StringUtils;
|
||||||
import com.zfoo.storage.util.ConvertUtils;
|
|
||||||
import org.springframework.core.convert.TypeDescriptor;
|
import org.springframework.core.convert.TypeDescriptor;
|
||||||
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
||||||
|
|
||||||
+1
-2
@@ -10,10 +10,9 @@
|
|||||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
package com.zfoo.storage.util;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.StringUtils;
|
import com.zfoo.protocol.util.StringUtils;
|
||||||
import com.zfoo.storage.strategy.*;
|
|
||||||
import org.springframework.context.support.ConversionServiceFactoryBean;
|
import org.springframework.context.support.ConversionServiceFactoryBean;
|
||||||
import org.springframework.core.convert.TypeDescriptor;
|
import org.springframework.core.convert.TypeDescriptor;
|
||||||
|
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.JsonUtils;
|
import com.zfoo.protocol.util.JsonUtils;
|
||||||
import org.springframework.core.convert.TypeDescriptor;
|
import org.springframework.core.convert.TypeDescriptor;
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.JsonUtils;
|
import com.zfoo.protocol.util.JsonUtils;
|
||||||
import com.zfoo.protocol.util.ReflectionUtils;
|
import com.zfoo.protocol.util.ReflectionUtils;
|
||||||
+1
-2
@@ -11,11 +11,10 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.JsonUtils;
|
import com.zfoo.protocol.util.JsonUtils;
|
||||||
import com.zfoo.protocol.util.StringUtils;
|
import com.zfoo.protocol.util.StringUtils;
|
||||||
import com.zfoo.storage.util.ConvertUtils;
|
|
||||||
import org.springframework.core.convert.TypeDescriptor;
|
import org.springframework.core.convert.TypeDescriptor;
|
||||||
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
||||||
import org.springframework.lang.NonNull;
|
import org.springframework.lang.NonNull;
|
||||||
+1
-2
@@ -11,11 +11,10 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.JsonUtils;
|
import com.zfoo.protocol.util.JsonUtils;
|
||||||
import com.zfoo.protocol.util.StringUtils;
|
import com.zfoo.protocol.util.StringUtils;
|
||||||
import com.zfoo.storage.util.ConvertUtils;
|
|
||||||
import org.springframework.core.convert.TypeDescriptor;
|
import org.springframework.core.convert.TypeDescriptor;
|
||||||
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
import org.springframework.core.convert.converter.ConditionalGenericConverter;
|
||||||
import org.springframework.lang.NonNull;
|
import org.springframework.lang.NonNull;
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.ClassUtils;
|
import com.zfoo.protocol.util.ClassUtils;
|
||||||
import com.zfoo.protocol.util.StringUtils;
|
import com.zfoo.protocol.util.StringUtils;
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.StringUtils;
|
import com.zfoo.protocol.util.StringUtils;
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
* See the License for the specific language governing permissions and limitations under the License.
|
* See the License for the specific language governing permissions and limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.zfoo.storage.strategy;
|
package com.zfoo.storage.convert;
|
||||||
|
|
||||||
import com.zfoo.protocol.util.JsonUtils;
|
import com.zfoo.protocol.util.JsonUtils;
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
||||||
@@ -17,9 +17,9 @@ import com.zfoo.protocol.util.ReflectionUtils;
|
|||||||
import com.zfoo.protocol.util.StringUtils;
|
import com.zfoo.protocol.util.StringUtils;
|
||||||
import com.zfoo.storage.anno.AliasFieldName;
|
import com.zfoo.storage.anno.AliasFieldName;
|
||||||
import com.zfoo.storage.anno.Id;
|
import com.zfoo.storage.anno.Id;
|
||||||
|
import com.zfoo.storage.convert.ConvertUtils;
|
||||||
import com.zfoo.storage.interpreter.data.StorageData;
|
import com.zfoo.storage.interpreter.data.StorageData;
|
||||||
import com.zfoo.storage.interpreter.data.StorageEnum;
|
import com.zfoo.storage.interpreter.data.StorageEnum;
|
||||||
import com.zfoo.storage.util.ConvertUtils;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
package com.zfoo.storage.conversion;
|
package com.zfoo.storage.conversion;
|
||||||
|
|
||||||
import com.zfoo.storage.strategy.ArrayConverter;
|
import com.zfoo.storage.convert.ArrayConverter;
|
||||||
import com.zfoo.storage.strategy.JsonToMapConverter;
|
import com.zfoo.storage.convert.JsonToMapConverter;
|
||||||
import com.zfoo.storage.strategy.StringToClassConverter;
|
import com.zfoo.storage.convert.StringToClassConverter;
|
||||||
import com.zfoo.storage.strategy.StringToDateConverter;
|
import com.zfoo.storage.convert.StringToDateConverter;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.context.support.ConversionServiceFactoryBean;
|
import org.springframework.context.support.ConversionServiceFactoryBean;
|
||||||
|
|||||||
Reference in new issue
Block a user