From e23d9ce1ef292b0f1a19e9f6075327989a0e1b24 Mon Sep 17 00:00:00 2001 From: eugenp Date: Sun, 12 May 2013 11:15:16 +0300 Subject: [PATCH] cleanup work, initial work on new project --- .../.settings/.jsdtscope | 12 -- .../.settings/org.eclipse.jdt.core.prefs | 12 -- spring-beandefinitionstoreexception/README.md | 3 - spring-beandefinitionstoreexception/pom.xml | 139 ------------- .../src/main/resources/webSecurityConfig.xml | 36 ---- .../src/main/webapp/WEB-INF/mvc-servlet.xml | 5 - .../.classpath | 2 +- ...e.wst.jsdt.core.javascriptValidator.launch | 7 + .../.gitignore | 0 .../.project | 3 +- .../.settings/.jsdtscope | 5 + .../.settings/org.eclipse.jdt.core.prefs | 95 +++++++++ .../.settings/org.eclipse.jdt.ui.prefs | 0 .../.settings/org.eclipse.m2e.core.prefs | 0 .../.settings/org.eclipse.m2e.wtp.prefs | 0 .../org.eclipse.wst.common.component | 6 +- ....eclipse.wst.common.project.facet.core.xml | 1 - ...rg.eclipse.wst.jsdt.ui.superType.container | 0 .../org.eclipse.wst.jsdt.ui.superType.name | 0 .../org.eclipse.wst.validation.prefs | 0 .../org.eclipse.wst.ws.service.policy.prefs | 0 .../.springBeans | 0 spring-security-basic-auth/README.md | 3 + spring-security-basic-auth/pom.xml | 192 ++++++++++++++++++ .../spring/web/config/ClientWebConfig.java | 36 ++-- .../spring/web/config/SecSecurityConfig.java | 14 ++ .../src/main/resources/logback.xml | 0 .../src/main/resources/webSecurityConfig.xml | 29 +++ .../src/main/webapp/WEB-INF/mvc-servlet.xml | 6 + .../src/main/webapp/WEB-INF/view/homepage.jsp | 0 .../src/main/webapp/WEB-INF/view/login.jsp | 26 +++ .../src/main/webapp/WEB-INF/web.xml | 10 + .../src/test/resources/.gitignore | 0 33 files changed, 410 insertions(+), 232 deletions(-) delete mode 100644 spring-beandefinitionstoreexception/.settings/.jsdtscope delete mode 100644 spring-beandefinitionstoreexception/.settings/org.eclipse.jdt.core.prefs delete mode 100644 spring-beandefinitionstoreexception/README.md delete mode 100644 spring-beandefinitionstoreexception/pom.xml delete mode 100644 spring-beandefinitionstoreexception/src/main/resources/webSecurityConfig.xml delete mode 100644 spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.classpath (93%) create mode 100644 spring-security-basic-auth/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.gitignore (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.project (94%) create mode 100644 spring-security-basic-auth/.settings/.jsdtscope create mode 100644 spring-security-basic-auth/.settings/org.eclipse.jdt.core.prefs rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.jdt.ui.prefs (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.m2e.core.prefs (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.m2e.wtp.prefs (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.wst.common.component (65%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.wst.common.project.facet.core.xml (76%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.wst.jsdt.ui.superType.container (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.wst.jsdt.ui.superType.name (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.wst.validation.prefs (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.settings/org.eclipse.wst.ws.service.policy.prefs (100%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/.springBeans (100%) create mode 100644 spring-security-basic-auth/README.md create mode 100644 spring-security-basic-auth/pom.xml rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java (54%) create mode 100644 spring-security-basic-auth/src/main/java/org/baeldung/spring/web/config/SecSecurityConfig.java rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/src/main/resources/logback.xml (100%) create mode 100644 spring-security-basic-auth/src/main/resources/webSecurityConfig.xml create mode 100644 spring-security-basic-auth/src/main/webapp/WEB-INF/mvc-servlet.xml rename spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/view/sample.jsp => spring-security-basic-auth/src/main/webapp/WEB-INF/view/homepage.jsp (100%) create mode 100644 spring-security-basic-auth/src/main/webapp/WEB-INF/view/login.jsp rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/src/main/webapp/WEB-INF/web.xml (80%) rename {spring-beandefinitionstoreexception => spring-security-basic-auth}/src/test/resources/.gitignore (100%) diff --git a/spring-beandefinitionstoreexception/.settings/.jsdtscope b/spring-beandefinitionstoreexception/.settings/.jsdtscope deleted file mode 100644 index b46b9207a8..0000000000 --- a/spring-beandefinitionstoreexception/.settings/.jsdtscope +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.jdt.core.prefs b/spring-beandefinitionstoreexception/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 62492222ad..0000000000 --- a/spring-beandefinitionstoreexception/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -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.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/spring-beandefinitionstoreexception/README.md b/spring-beandefinitionstoreexception/README.md deleted file mode 100644 index 12eb079c88..0000000000 --- a/spring-beandefinitionstoreexception/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Hibernate 4 with Spring -========= - diff --git a/spring-beandefinitionstoreexception/pom.xml b/spring-beandefinitionstoreexception/pom.xml deleted file mode 100644 index b5f593a1f1..0000000000 --- a/spring-beandefinitionstoreexception/pom.xml +++ /dev/null @@ -1,139 +0,0 @@ - - 4.0.0 - org.baeldung - spring-beandefinitionstoreexception - 0.1-SNAPSHOT - - spring-beandefinitionstoreexception - war - - - - - - - org.springframework - spring-web - ${org.springframework.version} - - - org.springframework - spring-webmvc - ${org.springframework.version} - - - - org.springframework - spring-context - ${org.springframework.version} - - - - - - com.google.guava - guava - 14.0.1 - - - - - - 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 - - - - - - spring-beandefinitionstoreexception - - - src/main/resources - true - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - - true - - jetty8x - embedded - - - - - - - 8082 - - - - - - - - - - - - 3.2.2.RELEASE - - - 1.7.5 - 1.0.11 - - - 1.3 - 4.11 - 1.9.5 - - 4.2.4 - 4.2.4 - - 1.8.0 - 1.8.9 - - - - \ No newline at end of file diff --git a/spring-beandefinitionstoreexception/src/main/resources/webSecurityConfig.xml b/spring-beandefinitionstoreexception/src/main/resources/webSecurityConfig.xml deleted file mode 100644 index 5569cc6950..0000000000 --- a/spring-beandefinitionstoreexception/src/main/resources/webSecurityConfig.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml deleted file mode 100644 index 0e0ded0a71..0000000000 --- a/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/mvc-servlet.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/spring-beandefinitionstoreexception/.classpath b/spring-security-basic-auth/.classpath similarity index 93% rename from spring-beandefinitionstoreexception/.classpath rename to spring-security-basic-auth/.classpath index 593395a46e..5dea193677 100644 --- a/spring-beandefinitionstoreexception/.classpath +++ b/spring-security-basic-auth/.classpath @@ -16,7 +16,7 @@ - + diff --git a/spring-security-basic-auth/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/spring-security-basic-auth/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch new file mode 100644 index 0000000000..627021fb96 --- /dev/null +++ b/spring-security-basic-auth/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch @@ -0,0 +1,7 @@ + + + + + + + diff --git a/spring-beandefinitionstoreexception/.gitignore b/spring-security-basic-auth/.gitignore similarity index 100% rename from spring-beandefinitionstoreexception/.gitignore rename to spring-security-basic-auth/.gitignore diff --git a/spring-beandefinitionstoreexception/.project b/spring-security-basic-auth/.project similarity index 94% rename from spring-beandefinitionstoreexception/.project rename to spring-security-basic-auth/.project index bb38a25754..49eecbd6a3 100644 --- a/spring-beandefinitionstoreexception/.project +++ b/spring-security-basic-auth/.project @@ -1,6 +1,6 @@ - spring-beandefinitionstoreexception + spring-security-login @@ -54,7 +54,6 @@ org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature org.zeroturnaround.eclipse.jrebelNature diff --git a/spring-security-basic-auth/.settings/.jsdtscope b/spring-security-basic-auth/.settings/.jsdtscope new file mode 100644 index 0000000000..7b3f0c8b9f --- /dev/null +++ b/spring-security-basic-auth/.settings/.jsdtscope @@ -0,0 +1,5 @@ + + + + + diff --git a/spring-security-basic-auth/.settings/org.eclipse.jdt.core.prefs b/spring-security-basic-auth/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..723e5b1245 --- /dev/null +++ b/spring-security-basic-auth/.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/spring-beandefinitionstoreexception/.settings/org.eclipse.jdt.ui.prefs b/spring-security-basic-auth/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.jdt.ui.prefs rename to spring-security-basic-auth/.settings/org.eclipse.jdt.ui.prefs diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.m2e.core.prefs b/spring-security-basic-auth/.settings/org.eclipse.m2e.core.prefs similarity index 100% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.m2e.core.prefs rename to spring-security-basic-auth/.settings/org.eclipse.m2e.core.prefs diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.m2e.wtp.prefs b/spring-security-basic-auth/.settings/org.eclipse.m2e.wtp.prefs similarity index 100% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.m2e.wtp.prefs rename to spring-security-basic-auth/.settings/org.eclipse.m2e.wtp.prefs diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.common.component b/spring-security-basic-auth/.settings/org.eclipse.wst.common.component similarity index 65% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.wst.common.component rename to spring-security-basic-auth/.settings/org.eclipse.wst.common.component index bb5464963e..c42e29f80e 100644 --- a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.common.component +++ b/spring-security-basic-auth/.settings/org.eclipse.wst.common.component @@ -1,10 +1,10 @@ - + - - + + diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-security-basic-auth/.settings/org.eclipse.wst.common.project.facet.core.xml similarity index 76% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.wst.common.project.facet.core.xml rename to spring-security-basic-auth/.settings/org.eclipse.wst.common.project.facet.core.xml index a67649dfa5..b46bc511b9 100644 --- a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/spring-security-basic-auth/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,6 +1,5 @@ - diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-security-basic-auth/.settings/org.eclipse.wst.jsdt.ui.superType.container similarity index 100% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.wst.jsdt.ui.superType.container rename to spring-security-basic-auth/.settings/org.eclipse.wst.jsdt.ui.superType.container diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-security-basic-auth/.settings/org.eclipse.wst.jsdt.ui.superType.name similarity index 100% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.wst.jsdt.ui.superType.name rename to spring-security-basic-auth/.settings/org.eclipse.wst.jsdt.ui.superType.name diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.validation.prefs b/spring-security-basic-auth/.settings/org.eclipse.wst.validation.prefs similarity index 100% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.wst.validation.prefs rename to spring-security-basic-auth/.settings/org.eclipse.wst.validation.prefs diff --git a/spring-beandefinitionstoreexception/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-security-basic-auth/.settings/org.eclipse.wst.ws.service.policy.prefs similarity index 100% rename from spring-beandefinitionstoreexception/.settings/org.eclipse.wst.ws.service.policy.prefs rename to spring-security-basic-auth/.settings/org.eclipse.wst.ws.service.policy.prefs diff --git a/spring-beandefinitionstoreexception/.springBeans b/spring-security-basic-auth/.springBeans similarity index 100% rename from spring-beandefinitionstoreexception/.springBeans rename to spring-security-basic-auth/.springBeans diff --git a/spring-security-basic-auth/README.md b/spring-security-basic-auth/README.md new file mode 100644 index 0000000000..7cc97242ec --- /dev/null +++ b/spring-security-basic-auth/README.md @@ -0,0 +1,3 @@ +Spring Security Login +========= + diff --git a/spring-security-basic-auth/pom.xml b/spring-security-basic-auth/pom.xml new file mode 100644 index 0000000000..d8cecabcdb --- /dev/null +++ b/spring-security-basic-auth/pom.xml @@ -0,0 +1,192 @@ + + 4.0.0 + org.baeldung + spring-security-login + 0.1-SNAPSHOT + + spring-security-login + war + + + + + + + org.springframework.security + spring-security-web + ${org.springframework.security.version} + + + org.springframework.security + spring-security-config + ${org.springframework.security.version} + + + + + + org.springframework + spring-core + ${org.springframework.version} + + + org.springframework + spring-context + ${org.springframework.version} + + + org.springframework + spring-jdbc + ${org.springframework.version} + + + org.springframework + spring-beans + ${org.springframework.version} + + + org.springframework + spring-aop + ${org.springframework.version} + + + org.springframework + spring-tx + ${org.springframework.version} + + + org.springframework + spring-expression + ${org.springframework.version} + + + + org.springframework + spring-web + ${org.springframework.version} + + + org.springframework + spring-webmvc + ${org.springframework.version} + + + + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + + javax.servlet + jstl + 1.2 + runtime + + + + + + 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 + + + + + + spring-security-login + + + src/main/resources + true + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + + + + + + + + org.codehaus.cargo + cargo-maven2-plugin + + true + + jetty8x + embedded + + + + + + + 8082 + + + + + + + + + + + + 3.2.2.RELEASE + 3.1.4.RELEASE + + + 1.7.5 + 1.0.11 + + + 1.3 + 4.11 + 1.9.5 + + 4.2.4 + 4.2.4 + + 1.8.0 + 1.8.9 + + + + \ No newline at end of file diff --git a/spring-beandefinitionstoreexception/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java b/spring-security-basic-auth/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java similarity index 54% rename from spring-beandefinitionstoreexception/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java rename to spring-security-basic-auth/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java index ba82fef101..4aadc3a48c 100644 --- a/spring-beandefinitionstoreexception/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java +++ b/spring-security-basic-auth/src/main/java/org/baeldung/spring/web/config/ClientWebConfig.java @@ -11,30 +11,30 @@ import org.springframework.web.servlet.view.JstlView; @EnableWebMvc @Configuration -// @ImportResource("beans.xml") public class ClientWebConfig extends WebMvcConfigurerAdapter { - public ClientWebConfig() { - super(); - } + public ClientWebConfig() { + super(); + } - // API + // API - @Override - public void addViewControllers(final ViewControllerRegistry registry) { - super.addViewControllers(registry); + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + super.addViewControllers(registry); - registry.addViewController("/sample.html"); - } + registry.addViewController("/login.html"); + registry.addViewController("/homepage.html"); + } - @Bean - public ViewResolver viewResolver() { - final InternalResourceViewResolver bean = new InternalResourceViewResolver(); + @Bean + public ViewResolver viewResolver() { + final InternalResourceViewResolver bean = new InternalResourceViewResolver(); - bean.setViewClass(JstlView.class); - bean.setPrefix("/WEB-INF/view/"); - bean.setSuffix(".jsp"); + bean.setViewClass(JstlView.class); + bean.setPrefix("/WEB-INF/view/"); + bean.setSuffix(".jsp"); - return bean; - } + return bean; + } } \ No newline at end of file diff --git a/spring-security-basic-auth/src/main/java/org/baeldung/spring/web/config/SecSecurityConfig.java b/spring-security-basic-auth/src/main/java/org/baeldung/spring/web/config/SecSecurityConfig.java new file mode 100644 index 0000000000..65a571c715 --- /dev/null +++ b/spring-security-basic-auth/src/main/java/org/baeldung/spring/web/config/SecSecurityConfig.java @@ -0,0 +1,14 @@ +package org.baeldung.spring.web.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ImportResource; + +@Configuration +@ImportResource({ "classpath:webSecurityConfig.xml" }) +public class SecSecurityConfig { + + public SecSecurityConfig() { + super(); + } + +} diff --git a/spring-beandefinitionstoreexception/src/main/resources/logback.xml b/spring-security-basic-auth/src/main/resources/logback.xml similarity index 100% rename from spring-beandefinitionstoreexception/src/main/resources/logback.xml rename to spring-security-basic-auth/src/main/resources/logback.xml diff --git a/spring-security-basic-auth/src/main/resources/webSecurityConfig.xml b/spring-security-basic-auth/src/main/resources/webSecurityConfig.xml new file mode 100644 index 0000000000..6394c92699 --- /dev/null +++ b/spring-security-basic-auth/src/main/resources/webSecurityConfig.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/spring-security-basic-auth/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-security-basic-auth/src/main/webapp/WEB-INF/mvc-servlet.xml new file mode 100644 index 0000000000..5463820874 --- /dev/null +++ b/spring-security-basic-auth/src/main/webapp/WEB-INF/mvc-servlet.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/view/sample.jsp b/spring-security-basic-auth/src/main/webapp/WEB-INF/view/homepage.jsp similarity index 100% rename from spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/view/sample.jsp rename to spring-security-basic-auth/src/main/webapp/WEB-INF/view/homepage.jsp diff --git a/spring-security-basic-auth/src/main/webapp/WEB-INF/view/login.jsp b/spring-security-basic-auth/src/main/webapp/WEB-INF/view/login.jsp new file mode 100644 index 0000000000..013ceccb4e --- /dev/null +++ b/spring-security-basic-auth/src/main/webapp/WEB-INF/view/login.jsp @@ -0,0 +1,26 @@ + + + + +

Login

+ +
+ + + + + + + + + + + + + +
User:
Password:
+ +
+ + + \ No newline at end of file diff --git a/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/web.xml b/spring-security-basic-auth/src/main/webapp/WEB-INF/web.xml similarity index 80% rename from spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/web.xml rename to spring-security-basic-auth/src/main/webapp/WEB-INF/web.xml index ba2bb591ed..23e0e8c1d7 100644 --- a/spring-beandefinitionstoreexception/src/main/webapp/WEB-INF/web.xml +++ b/spring-security-basic-auth/src/main/webapp/WEB-INF/web.xml @@ -35,6 +35,16 @@ / + + + springSecurityFilterChain + org.springframework.web.filter.DelegatingFilterProxy + + + springSecurityFilterChain + /* + + index.html diff --git a/spring-beandefinitionstoreexception/src/test/resources/.gitignore b/spring-security-basic-auth/src/test/resources/.gitignore similarity index 100% rename from spring-beandefinitionstoreexception/src/test/resources/.gitignore rename to spring-security-basic-auth/src/test/resources/.gitignore