From d9b9c30aa210db763f8f86ccfd917aba8188df1a Mon Sep 17 00:00:00 2001 From: eugenp Date: Tue, 24 Dec 2013 15:11:18 +0200 Subject: [PATCH] general cleanup and initial new project --- core-java/.classpath | 36 +++++ ...e.wst.jsdt.core.javascriptValidator.launch | 7 + core-java/.gitignore | 13 ++ core-java/.project | 36 +++++ core-java/.settings/.jsdtscope | 5 + .../.settings/org.eclipse.jdt.core.prefs | 95 ++++++++++++ core-java/.settings/org.eclipse.jdt.ui.prefs | 55 +++++++ .../.settings/org.eclipse.m2e.core.prefs | 4 + core-java/.settings/org.eclipse.m2e.wtp.prefs | 2 + .../org.eclipse.wst.common.component | 8 + ....eclipse.wst.common.project.facet.core.xml | 4 + ...rg.eclipse.wst.jsdt.ui.superType.container | 1 + .../org.eclipse.wst.jsdt.ui.superType.name | 1 + .../org.eclipse.wst.validation.prefs | 14 ++ .../org.eclipse.wst.ws.service.policy.prefs | 2 + core-java/.springBeans | 14 ++ core-java/README.md | 6 + core-java/pom.xml | 139 ++++++++++++++++++ core-java/src/main/resources/logback.xml | 16 ++ .../src/main/webapp/WEB-INF/api-servlet.xml | 6 + core-java/src/main/webapp/WEB-INF/web.xml | 42 ++++++ .../org/baeldung/java/CoreJavaUnitTest.java | 7 + core-java/src/test/resources/.gitignore | 13 ++ .../baeldung/jackson}/dtos/MyDto.java | 2 +- .../jackson}/dtos/MyDtoFieldNameChanged.java | 2 +- .../jackson}/dtos/MyDtoIgnoreField.java | 2 +- .../jackson}/dtos/MyDtoIgnoreFieldByName.java | 2 +- .../jackson}/dtos/MyDtoIgnoreNull.java | 2 +- .../jackson}/dtos/MyDtoIgnoreType.java | 2 +- .../jackson}/dtos/MyDtoIgnoreUnkown.java | 2 +- .../jackson}/dtos/MyDtoIncludeNonDefault.java | 2 +- .../jackson}/dtos/MyDtoNoAccessors.java | 2 +- .../MyDtoNoAccessorsAndFieldVisibility.java | 2 +- .../jackson}/dtos/MyDtoWithFilter.java | 2 +- .../jackson}/dtos/MyMixInForString.java | 2 +- ...ksonCollectionDeserializationUnitTest.java | 2 +- .../test/JacksonDeserializationUnitTest.java | 4 +- .../JacksonSerializationIgnoreUnitTest.java | 14 +- .../test/JacksonSerializationUnitTest.java | 8 +- 39 files changed, 552 insertions(+), 26 deletions(-) create mode 100644 core-java/.classpath create mode 100644 core-java/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch create mode 100644 core-java/.gitignore create mode 100644 core-java/.project create mode 100644 core-java/.settings/.jsdtscope create mode 100644 core-java/.settings/org.eclipse.jdt.core.prefs create mode 100644 core-java/.settings/org.eclipse.jdt.ui.prefs create mode 100644 core-java/.settings/org.eclipse.m2e.core.prefs create mode 100644 core-java/.settings/org.eclipse.m2e.wtp.prefs create mode 100644 core-java/.settings/org.eclipse.wst.common.component create mode 100644 core-java/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 core-java/.settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 core-java/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 core-java/.settings/org.eclipse.wst.validation.prefs create mode 100644 core-java/.settings/org.eclipse.wst.ws.service.policy.prefs create mode 100644 core-java/.springBeans create mode 100644 core-java/README.md create mode 100644 core-java/pom.xml create mode 100644 core-java/src/main/resources/logback.xml create mode 100644 core-java/src/main/webapp/WEB-INF/api-servlet.xml create mode 100644 core-java/src/main/webapp/WEB-INF/web.xml create mode 100644 core-java/src/test/java/org/baeldung/java/CoreJavaUnitTest.java create mode 100644 core-java/src/test/resources/.gitignore rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDto.java (96%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoFieldNameChanged.java (96%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoIgnoreField.java (95%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoIgnoreFieldByName.java (95%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoIgnoreNull.java (96%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoIgnoreType.java (96%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoIgnoreUnkown.java (96%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoIncludeNonDefault.java (96%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoNoAccessors.java (92%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoNoAccessorsAndFieldVisibility.java (94%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyDtoWithFilter.java (96%) rename jackson/src/test/java/{ => org/baeldung/jackson}/dtos/MyMixInForString.java (76%) diff --git a/core-java/.classpath b/core-java/.classpath new file mode 100644 index 0000000000..0720e4851b --- /dev/null +++ b/core-java/.classpath @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core-java/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/core-java/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch new file mode 100644 index 0000000000..627021fb96 --- /dev/null +++ b/core-java/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch @@ -0,0 +1,7 @@ + + + + + + + diff --git a/core-java/.gitignore b/core-java/.gitignore new file mode 100644 index 0000000000..83c05e60c8 --- /dev/null +++ b/core-java/.gitignore @@ -0,0 +1,13 @@ +*.class + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* + +# Packaged files # +*.jar +*.war +*.ear \ No newline at end of file diff --git a/core-java/.project b/core-java/.project new file mode 100644 index 0000000000..12bfa7d869 --- /dev/null +++ b/core-java/.project @@ -0,0 +1,36 @@ + + + core-java + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + + diff --git a/core-java/.settings/.jsdtscope b/core-java/.settings/.jsdtscope new file mode 100644 index 0000000000..7b3f0c8b9f --- /dev/null +++ b/core-java/.settings/.jsdtscope @@ -0,0 +1,5 @@ + + + + + diff --git a/core-java/.settings/org.eclipse.jdt.core.prefs b/core-java/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..723e5b1245 --- /dev/null +++ b/core-java/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,95 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=error +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=error +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/core-java/.settings/org.eclipse.jdt.ui.prefs b/core-java/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..471e9b0d81 --- /dev/null +++ b/core-java/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,55 @@ +#Sat Jan 21 23:04:06 EET 2012 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=true +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=true +sp_cleanup.correct_indentation=true +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=true +sp_cleanup.make_private_fields_final=false +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=false +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=true +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=true +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=true +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/core-java/.settings/org.eclipse.m2e.core.prefs b/core-java/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..f897a7f1cb --- /dev/null +++ b/core-java/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/core-java/.settings/org.eclipse.m2e.wtp.prefs b/core-java/.settings/org.eclipse.m2e.wtp.prefs new file mode 100644 index 0000000000..ef86089622 --- /dev/null +++ b/core-java/.settings/org.eclipse.m2e.wtp.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false diff --git a/core-java/.settings/org.eclipse.wst.common.component b/core-java/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..e98377cb0f --- /dev/null +++ b/core-java/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/core-java/.settings/org.eclipse.wst.common.project.facet.core.xml b/core-java/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..bc0009a455 --- /dev/null +++ b/core-java/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,4 @@ + + + + diff --git a/core-java/.settings/org.eclipse.wst.jsdt.ui.superType.container b/core-java/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000000..3bd5d0a480 --- /dev/null +++ b/core-java/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/core-java/.settings/org.eclipse.wst.jsdt.ui.superType.name b/core-java/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000000..05bd71b6ec --- /dev/null +++ b/core-java/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/core-java/.settings/org.eclipse.wst.validation.prefs b/core-java/.settings/org.eclipse.wst.validation.prefs new file mode 100644 index 0000000000..cacf5451ae --- /dev/null +++ b/core-java/.settings/org.eclipse.wst.validation.prefs @@ -0,0 +1,14 @@ +DELEGATES_PREFERENCE=delegateValidatorList +USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator; +USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator; +USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.303.v201202090300 +eclipse.preferences.version=1 +override=true +suspend=false +vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01 +vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01 +vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01 +vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01 +vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01 +vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02 +vf.version=3 diff --git a/core-java/.settings/org.eclipse.wst.ws.service.policy.prefs b/core-java/.settings/org.eclipse.wst.ws.service.policy.prefs new file mode 100644 index 0000000000..9cfcabe16f --- /dev/null +++ b/core-java/.settings/org.eclipse.wst.ws.service.policy.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.wst.ws.service.policy.projectEnabled=false diff --git a/core-java/.springBeans b/core-java/.springBeans new file mode 100644 index 0000000000..a79097f40d --- /dev/null +++ b/core-java/.springBeans @@ -0,0 +1,14 @@ + + + 1 + + + + + + + src/main/webapp/WEB-INF/api-servlet.xml + + + + diff --git a/core-java/README.md b/core-java/README.md new file mode 100644 index 0000000000..a78f99a416 --- /dev/null +++ b/core-java/README.md @@ -0,0 +1,6 @@ +========= + +## Core Java Cookbooks and Examples + +### Relevant Articles: +// - [Jackson Ignore Properties on Marshalling](http://www.baeldung.com/jackson-ignore-properties-on-serialization) diff --git a/core-java/pom.xml b/core-java/pom.xml new file mode 100644 index 0000000000..348e1b8ef2 --- /dev/null +++ b/core-java/pom.xml @@ -0,0 +1,139 @@ + + 4.0.0 + org.baeldung + spring-rest + 0.1-SNAPSHOT + + spring-rest + + + + + + + com.google.guava + guava + 15.0 + + + + org.apache.commons + commons-collections4 + 4.0 + + + + + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + + + + junit + junit-dep + ${junit.version} + test + + + + org.hamcrest + hamcrest-core + ${org.hamcrest.version} + test + + + org.hamcrest + hamcrest-library + ${org.hamcrest.version} + test + + + + org.mockito + mockito-core + ${mockito.version} + test + + + + + + jackson + + + src/main/resources + true + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + 1.7 + 1.7 + + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + + + + + + + 4.0.0.RELEASE + 3.2.0.RELEASE + + + 4.3.0.Final + 5.1.27 + + + 2.3.0 + + + 1.7.5 + 1.0.11 + + + 5.0.1.Final + + + 15.0 + 3.1 + + + 1.3 + 4.11 + 1.9.5 + + 4.3 + 4.3.1 + + 2.1.0 + + + 3.1 + 2.4 + 2.16 + 2.6 + 1.4.5 + + + + \ No newline at end of file diff --git a/core-java/src/main/resources/logback.xml b/core-java/src/main/resources/logback.xml new file mode 100644 index 0000000000..62d0ea5037 --- /dev/null +++ b/core-java/src/main/resources/logback.xml @@ -0,0 +1,16 @@ + + + + + web - %date [%thread] %-5level %logger{36} - %message%n + + + + + + + + + + + \ No newline at end of file diff --git a/core-java/src/main/webapp/WEB-INF/api-servlet.xml b/core-java/src/main/webapp/WEB-INF/api-servlet.xml new file mode 100644 index 0000000000..5463820874 --- /dev/null +++ b/core-java/src/main/webapp/WEB-INF/api-servlet.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/core-java/src/main/webapp/WEB-INF/web.xml b/core-java/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..48d4b8fe61 --- /dev/null +++ b/core-java/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,42 @@ + + + + Spring MVC Application + + + + contextClass + + org.springframework.web.context.support.AnnotationConfigWebApplicationContext + + + + contextConfigLocation + org.baeldung.config + + + + org.springframework.web.context.ContextLoaderListener + + + + + api + org.springframework.web.servlet.DispatcherServlet + 1 + + + api + / + + + + + + + \ No newline at end of file diff --git a/core-java/src/test/java/org/baeldung/java/CoreJavaUnitTest.java b/core-java/src/test/java/org/baeldung/java/CoreJavaUnitTest.java new file mode 100644 index 0000000000..89e8554cd3 --- /dev/null +++ b/core-java/src/test/java/org/baeldung/java/CoreJavaUnitTest.java @@ -0,0 +1,7 @@ +package org.baeldung.java; + +public class CoreJavaUnitTest { + + // tests - + +} diff --git a/core-java/src/test/resources/.gitignore b/core-java/src/test/resources/.gitignore new file mode 100644 index 0000000000..83c05e60c8 --- /dev/null +++ b/core-java/src/test/resources/.gitignore @@ -0,0 +1,13 @@ +*.class + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* + +# Packaged files # +*.jar +*.war +*.ear \ No newline at end of file diff --git a/jackson/src/test/java/dtos/MyDto.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDto.java similarity index 96% rename from jackson/src/test/java/dtos/MyDto.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDto.java index bf140f93d8..d9bfe6f8f6 100644 --- a/jackson/src/test/java/dtos/MyDto.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDto.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; public class MyDto { diff --git a/jackson/src/test/java/dtos/MyDtoFieldNameChanged.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoFieldNameChanged.java similarity index 96% rename from jackson/src/test/java/dtos/MyDtoFieldNameChanged.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoFieldNameChanged.java index f9537e5ad0..9c4086a965 100644 --- a/jackson/src/test/java/dtos/MyDtoFieldNameChanged.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoFieldNameChanged.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/jackson/src/test/java/dtos/MyDtoIgnoreField.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreField.java similarity index 95% rename from jackson/src/test/java/dtos/MyDtoIgnoreField.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreField.java index 34cccc630c..78d493ae60 100644 --- a/jackson/src/test/java/dtos/MyDtoIgnoreField.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreField.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/jackson/src/test/java/dtos/MyDtoIgnoreFieldByName.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreFieldByName.java similarity index 95% rename from jackson/src/test/java/dtos/MyDtoIgnoreFieldByName.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreFieldByName.java index affb9330d1..7902214571 100644 --- a/jackson/src/test/java/dtos/MyDtoIgnoreFieldByName.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreFieldByName.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/dtos/MyDtoIgnoreNull.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreNull.java similarity index 96% rename from jackson/src/test/java/dtos/MyDtoIgnoreNull.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreNull.java index 33ec587711..239df13187 100644 --- a/jackson/src/test/java/dtos/MyDtoIgnoreNull.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreNull.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; diff --git a/jackson/src/test/java/dtos/MyDtoIgnoreType.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreType.java similarity index 96% rename from jackson/src/test/java/dtos/MyDtoIgnoreType.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreType.java index 08ca86766a..fc77ec6d02 100644 --- a/jackson/src/test/java/dtos/MyDtoIgnoreType.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreType.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/dtos/MyDtoIgnoreUnkown.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreUnkown.java similarity index 96% rename from jackson/src/test/java/dtos/MyDtoIgnoreUnkown.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreUnkown.java index d1f9960c83..57ae6e86ba 100644 --- a/jackson/src/test/java/dtos/MyDtoIgnoreUnkown.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIgnoreUnkown.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/jackson/src/test/java/dtos/MyDtoIncludeNonDefault.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java similarity index 96% rename from jackson/src/test/java/dtos/MyDtoIncludeNonDefault.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java index 1d54943894..b99d793363 100644 --- a/jackson/src/test/java/dtos/MyDtoIncludeNonDefault.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoIncludeNonDefault.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; diff --git a/jackson/src/test/java/dtos/MyDtoNoAccessors.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessors.java similarity index 92% rename from jackson/src/test/java/dtos/MyDtoNoAccessors.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessors.java index 4b3b9799b3..6e88f5a2db 100644 --- a/jackson/src/test/java/dtos/MyDtoNoAccessors.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessors.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; public class MyDtoNoAccessors { diff --git a/jackson/src/test/java/dtos/MyDtoNoAccessorsAndFieldVisibility.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java similarity index 94% rename from jackson/src/test/java/dtos/MyDtoNoAccessorsAndFieldVisibility.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java index 74fdbae58f..1723a71230 100644 --- a/jackson/src/test/java/dtos/MyDtoNoAccessorsAndFieldVisibility.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoNoAccessorsAndFieldVisibility.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; diff --git a/jackson/src/test/java/dtos/MyDtoWithFilter.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoWithFilter.java similarity index 96% rename from jackson/src/test/java/dtos/MyDtoWithFilter.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoWithFilter.java index fe40c86728..03d7edf985 100644 --- a/jackson/src/test/java/dtos/MyDtoWithFilter.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyDtoWithFilter.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonFilter; diff --git a/jackson/src/test/java/dtos/MyMixInForString.java b/jackson/src/test/java/org/baeldung/jackson/dtos/MyMixInForString.java similarity index 76% rename from jackson/src/test/java/dtos/MyMixInForString.java rename to jackson/src/test/java/org/baeldung/jackson/dtos/MyMixInForString.java index 0c93b44d79..3d5228139e 100644 --- a/jackson/src/test/java/dtos/MyMixInForString.java +++ b/jackson/src/test/java/org/baeldung/jackson/dtos/MyMixInForString.java @@ -1,4 +1,4 @@ -package dtos; +package org.baeldung.jackson.dtos; import com.fasterxml.jackson.annotation.JsonIgnoreType; diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java b/jackson/src/test/java/org/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java index 6a0c846696..e2b3b35d72 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java +++ b/jackson/src/test/java/org/baeldung/jackson/test/JacksonCollectionDeserializationUnitTest.java @@ -7,6 +7,7 @@ import java.io.IOException; import java.util.LinkedHashMap; import java.util.List; +import org.baeldung.jackson.dtos.MyDto; import org.junit.Test; import com.fasterxml.jackson.core.JsonParseException; @@ -16,7 +17,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.type.CollectionType; import com.google.common.collect.Lists; -import dtos.MyDto; public class JacksonCollectionDeserializationUnitTest { diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDeserializationUnitTest.java b/jackson/src/test/java/org/baeldung/jackson/test/JacksonDeserializationUnitTest.java index 44de65e09e..858c83acbe 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonDeserializationUnitTest.java +++ b/jackson/src/test/java/org/baeldung/jackson/test/JacksonDeserializationUnitTest.java @@ -6,6 +6,8 @@ import static org.junit.Assert.assertThat; import java.io.IOException; +import org.baeldung.jackson.dtos.MyDto; +import org.baeldung.jackson.dtos.MyDtoIgnoreUnkown; import org.junit.Test; import com.fasterxml.jackson.core.JsonFactory; @@ -17,8 +19,6 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; -import dtos.MyDto; -import dtos.MyDtoIgnoreUnkown; public class JacksonDeserializationUnitTest { diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java b/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java index ec692f5bcd..81881fb699 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java +++ b/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationIgnoreUnitTest.java @@ -6,6 +6,13 @@ import static org.junit.Assert.assertThat; import java.io.IOException; +import org.baeldung.jackson.dtos.MyDto; +import org.baeldung.jackson.dtos.MyDtoIgnoreField; +import org.baeldung.jackson.dtos.MyDtoIgnoreFieldByName; +import org.baeldung.jackson.dtos.MyDtoIgnoreNull; +import org.baeldung.jackson.dtos.MyDtoIncludeNonDefault; +import org.baeldung.jackson.dtos.MyDtoWithFilter; +import org.baeldung.jackson.dtos.MyMixInForString; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonInclude.Include; @@ -21,13 +28,6 @@ import com.fasterxml.jackson.databind.ser.PropertyWriter; import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter; import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider; -import dtos.MyDto; -import dtos.MyDtoIgnoreField; -import dtos.MyDtoIgnoreFieldByName; -import dtos.MyDtoIgnoreNull; -import dtos.MyDtoIncludeNonDefault; -import dtos.MyDtoWithFilter; -import dtos.MyMixInForString; public class JacksonSerializationIgnoreUnitTest { diff --git a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationUnitTest.java b/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationUnitTest.java index 3ead818426..2c1b9e78fa 100644 --- a/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationUnitTest.java +++ b/jackson/src/test/java/org/baeldung/jackson/test/JacksonSerializationUnitTest.java @@ -8,6 +8,10 @@ import static org.junit.Assert.assertThat; import java.io.IOException; import java.util.List; +import org.baeldung.jackson.dtos.MyDto; +import org.baeldung.jackson.dtos.MyDtoFieldNameChanged; +import org.baeldung.jackson.dtos.MyDtoNoAccessors; +import org.baeldung.jackson.dtos.MyDtoNoAccessorsAndFieldVisibility; import org.junit.Test; import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; @@ -17,10 +21,6 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Lists; -import dtos.MyDto; -import dtos.MyDtoFieldNameChanged; -import dtos.MyDtoNoAccessors; -import dtos.MyDtoNoAccessorsAndFieldVisibility; public class JacksonSerializationUnitTest {