From 932d3643de4f05c14c11840937b1f1cc559777d3 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Mon, 2 Oct 2023 02:47:04 +0300 Subject: [PATCH] Init repo by mocking Spring Security --- .gitignore | 34 +----------------- .vscode/launch.json | 14 ++++++++ .vscode/settings.json | 3 ++ HELP.md | 22 ++++++++++++ target/classes/application.yml | 6 ++++ .../marinesco/MarinescoApplication.class | Bin 0 -> 1329 bytes .../ru/redrise/marinesco/RootController.class | Bin 0 -> 581 bytes .../classes/ru/redrise/marinesco/User.class | Bin 0 -> 4202 bytes .../marinesco/data/UserRepository.class | Bin 0 -> 533 bytes .../security/RegistrationController.class | Bin 0 -> 1689 bytes .../marinesco/security/RegistrationForm.class | Bin 0 -> 3708 bytes .../marinesco/security/SecurityConfig.class | Bin 0 -> 7169 bytes target/classes/templates/login.html | 12 +++++++ target/classes/templates/registration.html | 22 ++++++++++++ target/classes/templates/root.html | 12 +++++++ .../marinesco/MarinescoApplicationTests.class | Bin 0 -> 554 bytes 16 files changed, 92 insertions(+), 33 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 HELP.md create mode 100644 target/classes/application.yml create mode 100644 target/classes/ru/redrise/marinesco/MarinescoApplication.class create mode 100644 target/classes/ru/redrise/marinesco/RootController.class create mode 100644 target/classes/ru/redrise/marinesco/User.class create mode 100644 target/classes/ru/redrise/marinesco/data/UserRepository.class create mode 100644 target/classes/ru/redrise/marinesco/security/RegistrationController.class create mode 100644 target/classes/ru/redrise/marinesco/security/RegistrationForm.class create mode 100644 target/classes/ru/redrise/marinesco/security/SecurityConfig.class create mode 100644 target/classes/templates/login.html create mode 100644 target/classes/templates/registration.html create mode 100644 target/classes/templates/root.html create mode 100644 target/test-classes/ru/redrise/marinesco/MarinescoApplicationTests.class diff --git a/.gitignore b/.gitignore index 549e00a..8d929bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ +postgres/docker-compose.yml diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..5d12f52 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + "configurations": [ + { + "type": "java", + "name": "Spring Boot-MarinescoApplication", + "request": "launch", + "cwd": "${workspaceFolder}", + "mainClass": "ru.redrise.marinesco.MarinescoApplication", + "projectName": "marinesco", + "args": "", + "envFile": "${workspaceFolder}/.env" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e0f15db --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/HELP.md b/HELP.md new file mode 100644 index 0000000..5726d02 --- /dev/null +++ b/HELP.md @@ -0,0 +1,22 @@ +# Getting Started + +### Reference Documentation +For further reference, please consider the following sections: + +* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) +* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.1.4/maven-plugin/reference/html/) +* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.1.4/maven-plugin/reference/html/#build-image) +* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/3.1.4/reference/htmlsingle/index.html#using.devtools) +* [Validation](https://docs.spring.io/spring-boot/docs/3.1.4/reference/htmlsingle/index.html#io.validation) +* [Spring Web Services](https://docs.spring.io/spring-boot/docs/3.1.4/reference/htmlsingle/index.html#io.webservices) +* [Thymeleaf](https://docs.spring.io/spring-boot/docs/3.1.4/reference/htmlsingle/index.html#web.servlet.spring-mvc.template-engines) +* [Spring Data JDBC](https://docs.spring.io/spring-boot/docs/3.1.4/reference/htmlsingle/index.html#data.sql.jdbc) + +### Guides +The following guides illustrate how to use some features concretely: + +* [Validation](https://spring.io/guides/gs/validating-form-input/) +* [Producing a SOAP web service](https://spring.io/guides/gs/producing-web-service/) +* [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/) +* [Using Spring Data JDBC](https://github.com/spring-projects/spring-data-examples/tree/master/jdbc/basics) + diff --git a/target/classes/application.yml b/target/classes/application.yml new file mode 100644 index 0000000..acc3de2 --- /dev/null +++ b/target/classes/application.yml @@ -0,0 +1,6 @@ +spring: + thymeleaf: + cache: false + datasource: + generate-unique-name: false + name: tacocloud \ No newline at end of file diff --git a/target/classes/ru/redrise/marinesco/MarinescoApplication.class b/target/classes/ru/redrise/marinesco/MarinescoApplication.class new file mode 100644 index 0000000000000000000000000000000000000000..68006df8f47e359c097b746574d5628b1c7b2631 GIT binary patch literal 1329 zcmb_cO>Yx15PeQRHVuKcDFn)QfkKi>_{JqrK_elA5w3?H|a%dYEU}(kA4|h@!(iBZhLK&3itPK2M|>N7C{@ z$9pQ|B967q!1%88d*h&!`BNhe!~A0vE4#@s(`fb?W;=QyE11E#Dm;`K7Q6JgSLx7~ z=B@A}$x!R+Ktz3dt6S&JS-YKgxbx11uMAZ;UYt; zh^Vi%E5GEw% zD+S0@xSq88dhkZL`dDe`U`-4LeI+Lj!RRQ;oV`ZjBmQ2@-%++@s1j=qDRX7qq{8w@ zhbpe%Htu*>V|YHkT%Z*v%gD~PKBMxHCM8s9oX?yKI8XEH(E(h*BCQs%gk?JAf*+A}!Q~oj zeL-#aB)&pBF47}}6O1yhV3qt=>6>G;0EJ(}^&IXgSr=B`sNML4Tc_Zb39gpG)sN2Q bPofB{<33^K!0QB3!h>vVph?#8X#qb0cYt~R literal 0 HcmV?d00001 diff --git a/target/classes/ru/redrise/marinesco/RootController.class b/target/classes/ru/redrise/marinesco/RootController.class new file mode 100644 index 0000000000000000000000000000000000000000..4bd5b3f3a7e1c1854d52d00fcc388ac8bd30862d GIT binary patch literal 581 zcma)3O-}+b6rA!Q2nY!H!O<8K)Mzi>P!mI%MmuYQK-wHK z4AqgC2p$MM;FtbL_8h~)q0-77Go)MFU4~4@^ko5QES8YP0z<_kxr;dTrM(e;AQ@_& z>4~6AJ_-JMnQ=oEF>HDNSfx!iLlcrzqqXhLSGsnz`hcd*t5`b~%C3qOS)6EXoN&r$ zayame9q?$JQ17e=<Wq4J=Nb8@*|2a28d7$RO7q=w%)8F!BoDsQasqo>ZP>njv!SLP z#|^B2CVdSj39nmTV3nJ)jUOnds>*XUstxyCx~d%IS%IpByAzi40~v3&AECkh*4j-) z4SjljZHbEFxWkxe7)Ts?HIQJ5;il#Lj2E3cRI~kN!)iz9!<#CYZUtK|V`wXJVq`Qj z&+IW}yda*;xHV$Rm)PpUX33z<|fwe(f$83MPT6IanMc0{qvuU%6G^9sHuhVLBjXTt3>4fdi z5TnRitKlb=^0q(g$o@oSNP{_k2RdmDYcJ${9vZ%6!bBgrLzon4#GS!i;FxOypENOu zp$NVl6Hn$Zm^d!;Lb}Uc7Ru7Ji4(Gv@uPzrOC~2g$LI!AvY<%S+Oj3(AF#-n4fT49 zj_pZjCmGiZw0+IQ9Imhks+Kb=Xqo(~i5Kw20@7G8F^elQw`AhWI49EAOq`FTRTE#q zId%(ocWK2t@WgJgr92IWq;FW-MlPHQ#lCQ|TbzfZrS3!o=vHS8=uY&97IxL_(a6ZI zxxUrFs@4~*W=y8smgR3rMTO*;6F;jaUW3I0FR#ok%+jMdM$c1zt3fWO!{g?MyC=&J zcMo9>@7gRExKXwX*oJGs=@d)InrO*H6R$HWccif{-O}((GNYaRBmW06y(Ui1Dq}sd5v1{^^o%>adH&DsgtLWJ zx8+sU6$N4OKi2S@q$@ExGI-5$Y7ONN&%18D)tr22@OCMN zSJ8g>gPUU*?AXMN)o85Rftoy$#rJb~SHp7>qY=9{rHwz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UKX;|Be?aM@mCAE8? zMG!+!wP?cCR8*5Pz{4gCXaXIiI@egBZC)dHZ;N2dKuS~tIagJ3QgYQqsWI7Bk#;w+ zgo}4`92paD;<(g}nHZ2d2G+!2D4jMjf+GUL zX>QEu2?DC)ugaclmwD~4cX3CcZ%~AQY7Xg22&gMUK)tymKwZ%lJff-PyF-#DUHiOm z<=1Ada#V4~s^zW9o)w4>3{Fd*=S@21%VuI*Kd97Tx+qZ9pg`x51^a8qE)?_8`WPvc?m26A zI&?PlZOY2~j=Le9UJ>}F(X|L25}vn8OGVr3pK+YEN;&&n@0t!?-YDBG;5Ql=s`cKW ziYRhcu{dAw?QExpyn#Ccxy=C>s21(G7&%l;x0I{tmU2V7$Hkz4IbAB*Zm!5ThwbTD z7dX5nO0E3X!A3gxd?;%%3=&>pFUDC?3S#nILMbNSB*C2{Cb)B!^WH&Z5^dZ!xw=Jk zjQ4%Nq5ay>&*&WHrTbUxih)AvG4}r$oPC+sK4O6`KBJpstA~HPsO!R^U@u^y9j|gl zKD>s0KIt%JRd4|=I7fJuk4^I~J0BPNZQcwFX;Sv87^crY~`hx;TdL1tuvecn@osqNMU2Wpj0wAuCdIo{|n1r!h^* zz*ppbpHc!}V?REil*A0}IDt;x_y-+2#J}=`GtPg5;@(h9Y$H~i`V5nz$S;O4DL6@k zWr3?Q8`971>RYY(snR>?XEY{qL7Mr(rAnsxb5iIeDtBeal<^>$2fDJWOr_B^d>{Jg zBV4>K_1TOfH&RNpW5@)DTjLou*kW#jLqd4L72&^}Q>-ZKMJVGBos?EUD^hA#CKA8>~dj4bzCZ5ni zJZ~uWMUfNoVcRVUc%(G^_j-m;x~Tg7sfQ8L9sPkvR0? literal 0 HcmV?d00001 diff --git a/target/classes/ru/redrise/marinesco/security/SecurityConfig.class b/target/classes/ru/redrise/marinesco/security/SecurityConfig.class new file mode 100644 index 0000000000000000000000000000000000000000..1e5644c6b4763dfb517c37d12beace3d1b340bcb GIT binary patch literal 7169 zcmcgxS$o{n8Get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qHTA<66M|I0eo4%3i+=8$38YZezS=NTf%6Gro zOLgJpBv19igO_o~T4MbXX*;UKI?#tZYtr@w((cCrw4tBl zHZC1pCwGpVB=9|hhgL8MEJItt`{err%SgS057&6_pk2VLG5(u{Mi?fH_YjQ3fh@ft zk*X{`IEs+~kRI&DD49qMJ6bpmPM|9(6C+7Dg2 zg7I0}?Ids+({FRVHSmIN?gnrA6WB?{yJ-2{5ny)V3}z@og8vOUi;t4mEO*nr{)=r2 zK1KP0dlQe%whnZEav5{!Wz4?=tJ_{iaTz{`%eWw&Fl4_i5Os(I zG`hsy5d-hTr|=|6f0}zk_mnfAfgn?+&oWbqigX!ep!;*nc)CV7^zPvZK?Tp@%iLNc zC}*DMOdGz!XA52kESu!$MgIOO|Gvh*{ak;EVtyAtzz>7bEBFb17L0z5U*XsIBSpA` iKXLC~?)@|VN{D-i$Lm + + + + Marinesco + + + +

Welcome to LOGIN PAGE

+ + + \ No newline at end of file diff --git a/target/classes/templates/registration.html b/target/classes/templates/registration.html new file mode 100644 index 0000000..b681b69 --- /dev/null +++ b/target/classes/templates/registration.html @@ -0,0 +1,22 @@ + + + + + Marinesco - registration form + + + +

Register

+
+ +
+ +
+ +
+ +
+
+ + + \ No newline at end of file diff --git a/target/classes/templates/root.html b/target/classes/templates/root.html new file mode 100644 index 0000000..4e85e2d --- /dev/null +++ b/target/classes/templates/root.html @@ -0,0 +1,12 @@ + + + + + Marinesco + + + +

Welcome to Marinesco

+ + + \ No newline at end of file diff --git a/target/test-classes/ru/redrise/marinesco/MarinescoApplicationTests.class b/target/test-classes/ru/redrise/marinesco/MarinescoApplicationTests.class new file mode 100644 index 0000000000000000000000000000000000000000..ef4b55ae7e610d13b915314a0dd1735ebdc5c81e GIT binary patch literal 554 zcmb7>yH3L}6o!ANrG>W8Qdp1>V&o##omjX?1&JwuM62#jYKlu@M~(x$784Q!55Pkq zjzd8RiGjiAp3ldB-riqc0UTq!j)0+O3vT7as$B9^Sfyni8-DQ>4YDjzv2e=hk<49Q zN0p&76Ze8ALQnZsG?TGos2wS-+zCTvXLrm{Ju?&8Km|)JETG2F4vBnOq>;2E5haqL z8=6=oW4g%a^J3NAs+^%8{%@;8hE{B}laDSmVnT$C>q0w~%CX87;Rjk9SH6OJo1w8& zJ}YQpvYB$ya*-+SA4sIe&=fY7=gM!n^`{a&F9O3s3ClB5ZhB)yDj$r!6rJL2*A zT6|beoKn5K2HPO5=sy4f9ny&MIz^m3^Oe14EIyU(23g+*4K&HNJ_pDzQwFS1H$a;r gKh+`cLHl(4H|#g0`2#|_m5>0dG#a4$jadUe03`y382|tP literal 0 HcmV?d00001