├── src ├── main │ ├── resources │ │ ├── static │ │ │ ├── images │ │ │ │ └── dummy.file │ │ │ ├── vendor │ │ │ │ ├── ua-parser-0.7.33 │ │ │ │ │ └── js │ │ │ │ │ │ └── ua-parser.html │ │ │ │ ├── bootstrap3-dialog-1.35.3 │ │ │ │ │ ├── examples │ │ │ │ │ │ ├── remote.html │ │ │ │ │ │ ├── images │ │ │ │ │ │ │ └── pig.ico │ │ │ │ │ │ └── play │ │ │ │ │ │ │ ├── custom-dialog-id.html │ │ │ │ │ │ │ ├── tabindex.html │ │ │ │ │ │ │ ├── append-to-div.html │ │ │ │ │ │ │ ├── spinning-icon.html │ │ │ │ │ │ │ ├── reopen-dialog.html │ │ │ │ │ │ │ └── only-one-dialog.html │ │ │ │ │ ├── css │ │ │ │ │ │ └── bootstrap-dialog.min.css │ │ │ │ │ └── README.md │ │ │ │ ├── bootstrap-3.4.1 │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── bootstrap-icons.woff │ │ │ │ │ │ ├── bootstrap-icons.woff2 │ │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ │ └── js │ │ │ │ │ │ └── npm.js │ │ │ │ ├── iscroll-4.2.5 │ │ │ │ │ └── js │ │ │ │ │ │ └── ender.js │ │ │ │ ├── cryptojs-3.1.2 │ │ │ │ │ └── js │ │ │ │ │ │ ├── mode-ecb-min.js │ │ │ │ │ │ ├── mode-ecb.js │ │ │ │ │ │ └── sha256-min.js │ │ │ │ └── jquery-validation-1.15.0 │ │ │ │ │ └── localization │ │ │ │ │ ├── messages_ko.min.js │ │ │ │ │ └── messages_ko.js │ │ │ ├── font │ │ │ │ ├── NanumGothic.eot │ │ │ │ ├── NanumGothic.ttf │ │ │ │ ├── NanumGothic.woff │ │ │ │ ├── Roboto-Black.ttf │ │ │ │ ├── Roboto-Bold.ttf │ │ │ │ ├── Roboto-Light.ttf │ │ │ │ ├── Roboto-Thin.ttf │ │ │ │ ├── Roboto-Italic.ttf │ │ │ │ ├── Roboto-Medium.ttf │ │ │ │ ├── Roboto-Regular.ttf │ │ │ │ ├── Roboto-BoldItalic.ttf │ │ │ │ ├── Roboto-ThinItalic.ttf │ │ │ │ ├── Roboto-BlackItalic.ttf │ │ │ │ ├── Roboto-LightItalic.ttf │ │ │ │ ├── Roboto-MediumItalic.ttf │ │ │ │ ├── RobotoCondensed-Bold.ttf │ │ │ │ ├── RobotoCondensed-Italic.ttf │ │ │ │ ├── RobotoCondensed-Light.ttf │ │ │ │ ├── RobotoCondensed-Regular.ttf │ │ │ │ ├── RobotoCondensed-BoldItalic.ttf │ │ │ │ └── RobotoCondensed-LightItalic.ttf │ │ │ └── js │ │ │ │ └── ks.mini │ │ │ │ ├── ksm.base.js │ │ │ │ ├── ksm.crypto.js │ │ │ │ ├── ksm.plugins.shortcut.js │ │ │ │ └── ksm.message.js │ │ ├── transactions.properties │ │ ├── log4jdbc.log4j2.properties │ │ ├── templates │ │ │ ├── view │ │ │ │ ├── common │ │ │ │ │ └── fileupload │ │ │ │ │ │ ├── uploadStatus.html │ │ │ │ │ │ ├── upload.html │ │ │ │ │ │ └── from_file.html │ │ │ │ └── sample │ │ │ │ │ └── th │ │ │ │ │ ├── hello.html │ │ │ │ │ ├── switch.html │ │ │ │ │ ├── if.html │ │ │ │ │ ├── eq.html │ │ │ │ │ ├── string.html │ │ │ │ │ ├── list.html │ │ │ │ │ ├── url.html │ │ │ │ │ └── currencies.html │ │ │ └── layout │ │ │ │ └── fragments-fancysidebar │ │ │ │ └── footer.html │ │ ├── application-local.properties │ │ ├── application-prod.properties │ │ ├── application-dev.properties │ │ ├── messages │ │ │ ├── messages-site.properties │ │ │ └── messages-site_ko_KR.properties │ │ └── mybatis │ │ │ └── mapper │ │ │ └── sample │ │ │ └── CustomerMapper.xml │ └── java │ │ └── kyungseo │ │ └── poc │ │ └── simple │ │ └── web │ │ ├── site │ │ ├── admin │ │ │ ├── codemgr │ │ │ │ └── dummyfile │ │ │ └── usermgmt │ │ │ │ └── service │ │ │ │ └── AdmUserValidationService.java │ │ ├── common │ │ │ ├── web │ │ │ │ ├── dto │ │ │ │ │ └── dummy.file │ │ │ │ └── controller │ │ │ │ │ └── SwaggerRedirector.java │ │ │ ├── persistence │ │ │ │ ├── entity │ │ │ │ │ └── ds1 │ │ │ │ │ │ └── dummy.file │ │ │ │ ├── repository │ │ │ │ │ └── ds1 │ │ │ │ │ │ └── dummy.file │ │ │ │ └── mapper │ │ │ │ │ └── ds1 │ │ │ │ │ └── CommonMapper.java │ │ │ ├── model │ │ │ │ ├── Gender.java │ │ │ │ └── MemberRole.java │ │ │ ├── base │ │ │ │ └── persistence │ │ │ │ │ └── IOperations.java │ │ │ └── service │ │ │ │ ├── FileService.java │ │ │ │ └── CommonService.java │ │ └── sample │ │ │ ├── web │ │ │ └── dto │ │ │ │ └── request │ │ │ │ └── dummy.file │ │ │ ├── persistence │ │ │ ├── repository │ │ │ │ └── ds1 │ │ │ │ │ └── CustomerRepository.java │ │ │ ├── mapper │ │ │ │ └── ds1 │ │ │ │ │ └── CustomerMapper.java │ │ │ └── entity │ │ │ │ └── ds1 │ │ │ │ └── Customer.java │ │ │ └── model │ │ │ └── Customer.java │ │ ├── appcore │ │ ├── data │ │ │ ├── enums │ │ │ │ ├── DatabaseType.java │ │ │ │ └── ExcelColumnType.java │ │ │ └── mybatis │ │ │ │ └── handler │ │ │ │ └── EmptyToNullTypeHandler.java │ │ ├── dto │ │ │ ├── file │ │ │ │ ├── FileBucket.java │ │ │ │ ├── FileInfo.java │ │ │ │ └── MultiFileBucket.java │ │ │ └── Mail.java │ │ ├── geoip │ │ │ ├── City.java │ │ │ ├── Country.java │ │ │ ├── DatabaseReader.java │ │ │ ├── CityResponse.java │ │ │ └── CountryResponse.java │ │ ├── annotation │ │ │ ├── db │ │ │ │ ├── Slave.java │ │ │ │ ├── Mapper.java │ │ │ │ └── Master.java │ │ │ └── profile │ │ │ │ ├── Dev.java │ │ │ │ ├── Local.java │ │ │ │ └── Prod.java │ │ ├── converter │ │ │ ├── StringTrimConverter.java │ │ │ └── StringToDateConverter.java │ │ ├── validation │ │ │ ├── ValidationMarkers.java │ │ │ └── FileValidator.java │ │ ├── exception │ │ │ ├── ViolationException.java │ │ │ └── ResourceConflictException.java │ │ ├── formatter │ │ │ ├── LocalDateFormatter.java │ │ │ ├── LocalDateTimeFormatter.java │ │ │ └── NameFormatter.java │ │ ├── config │ │ │ └── AtomikosJtaPlatform.java │ │ └── util │ │ │ └── MessageSourceUtil.java │ │ └── security │ │ ├── components │ │ ├── ISecurityUserService.java │ │ └── ActiveUserStore.java │ │ ├── dto │ │ ├── response │ │ │ ├── UserIdentityAvailability.java │ │ │ └── UserProfile.java │ │ ├── request │ │ │ ├── DeviceInfo.java │ │ │ ├── TokenRefreshRequest.java │ │ │ ├── LogOutRequest.java │ │ │ └── LogInForm.java │ │ └── SessionScopeModel.java │ │ ├── web │ │ └── error │ │ │ ├── EmailAlreadyExistException.java │ │ │ ├── UnusualLocationException.java │ │ │ ├── TokenRefreshException.java │ │ │ ├── UserNotFoundException.java │ │ │ ├── ReCaptchaInvalidException.java │ │ │ ├── UserAlreadyExistException.java │ │ │ ├── InvalidOldPasswordException.java │ │ │ └── ReCaptchaUnavailableException.java │ │ ├── config │ │ ├── ServiceConfig.java │ │ ├── SpringTaskConfig.java │ │ └── ApplicationConfig.java │ │ ├── persistence │ │ └── repository │ │ │ └── ds1 │ │ │ ├── JwtRefreshTokenRepository.java │ │ │ ├── RoleRepository.java │ │ │ ├── PrivilegeRepository.java │ │ │ ├── UserLocationRepository.java │ │ │ ├── DeviceMetadataRepository.java │ │ │ ├── JwtUserDeviceRepository.java │ │ │ └── NewLocationTokenRepository.java │ │ ├── service │ │ └── CurrentUser.java │ │ └── captcha │ │ └── ICaptchaService.java └── test │ ├── resources │ └── logback-test.xml │ └── java │ └── kyungseo │ └── poc │ └── simple │ └── web │ ├── SimpleWebApplicationTests.java │ ├── config │ ├── TestTaskConfig.java │ └── ConfigTest.java │ └── security │ └── IntegrationSuite.java ├── docs ├── h2-console.png ├── home-admin.png ├── home-user.png ├── home-main-01.png ├── home-main-02.png ├── security-2fa.png ├── swagger-ui-01.png ├── user-mgmt-lnb.png ├── security-login.png ├── security-logout.png ├── user-mgmt-edit.png ├── user-mgmt-list.png ├── h2-console-login.png ├── project-structure.png ├── security-pw-reset-form.png ├── security-pw-reset-mail.png ├── security-pw-reset-succ.png ├── user-mgmt-edit-dialog.png ├── security-pw-reset-confirm.png ├── security-session-expired.png ├── user-mgmt-edit-validation.png ├── security-registration-form.png ├── security-registration-mail.png ├── security-registration-succ.png ├── security-pw-reset-confirm-succ.png └── security-registration-confirm.png └── .gitignore /src/main/resources/static/images/dummy.file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/admin/codemgr/dummyfile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/web/dto/dummy.file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/sample/web/dto/request/dummy.file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/transactions.properties: -------------------------------------------------------------------------------- 1 | com.atomikos.icatch.file=logs 2 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/persistence/entity/ds1/dummy.file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/persistence/repository/ds1/dummy.file: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/h2-console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/h2-console.png -------------------------------------------------------------------------------- /docs/home-admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/home-admin.png -------------------------------------------------------------------------------- /docs/home-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/home-user.png -------------------------------------------------------------------------------- /docs/home-main-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/home-main-01.png -------------------------------------------------------------------------------- /docs/home-main-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/home-main-02.png -------------------------------------------------------------------------------- /docs/security-2fa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-2fa.png -------------------------------------------------------------------------------- /docs/swagger-ui-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/swagger-ui-01.png -------------------------------------------------------------------------------- /docs/user-mgmt-lnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/user-mgmt-lnb.png -------------------------------------------------------------------------------- /docs/security-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-login.png -------------------------------------------------------------------------------- /docs/security-logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-logout.png -------------------------------------------------------------------------------- /docs/user-mgmt-edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/user-mgmt-edit.png -------------------------------------------------------------------------------- /docs/user-mgmt-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/user-mgmt-list.png -------------------------------------------------------------------------------- /docs/h2-console-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/h2-console-login.png -------------------------------------------------------------------------------- /docs/project-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/project-structure.png -------------------------------------------------------------------------------- /src/main/resources/static/vendor/ua-parser-0.7.33/js/ua-parser.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/remote.html: -------------------------------------------------------------------------------- 1 | Hello, this is a message from remote.html! -------------------------------------------------------------------------------- /docs/security-pw-reset-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-pw-reset-form.png -------------------------------------------------------------------------------- /docs/security-pw-reset-mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-pw-reset-mail.png -------------------------------------------------------------------------------- /docs/security-pw-reset-succ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-pw-reset-succ.png -------------------------------------------------------------------------------- /docs/user-mgmt-edit-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/user-mgmt-edit-dialog.png -------------------------------------------------------------------------------- /docs/security-pw-reset-confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-pw-reset-confirm.png -------------------------------------------------------------------------------- /docs/security-session-expired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-session-expired.png -------------------------------------------------------------------------------- /docs/user-mgmt-edit-validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/user-mgmt-edit-validation.png -------------------------------------------------------------------------------- /docs/security-registration-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-registration-form.png -------------------------------------------------------------------------------- /docs/security-registration-mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-registration-mail.png -------------------------------------------------------------------------------- /docs/security-registration-succ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-registration-succ.png -------------------------------------------------------------------------------- /docs/security-pw-reset-confirm-succ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-pw-reset-confirm-succ.png -------------------------------------------------------------------------------- /docs/security-registration-confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/docs/security-registration-confirm.png -------------------------------------------------------------------------------- /src/main/resources/static/font/NanumGothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/NanumGothic.eot -------------------------------------------------------------------------------- /src/main/resources/static/font/NanumGothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/NanumGothic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/NanumGothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/NanumGothic.woff -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-Black.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-Bold.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-Light.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-Thin.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-Italic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-Regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/RobotoCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/RobotoCondensed-Bold.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/RobotoCondensed-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/RobotoCondensed-Italic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/RobotoCondensed-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/RobotoCondensed-Light.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/RobotoCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/RobotoCondensed-Regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/RobotoCondensed-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/RobotoCondensed-BoldItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/static/font/RobotoCondensed-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/font/RobotoCondensed-LightItalic.ttf -------------------------------------------------------------------------------- /src/main/resources/log4jdbc.log4j2.properties: -------------------------------------------------------------------------------- 1 | log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator 2 | log4jdbc.drivers=org.mariadb.jdbc.Driver 3 | log4jdbc.dump.sql.maxlinelength=0 -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap-3.4.1/fonts/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/vendor/bootstrap-3.4.1/fonts/bootstrap-icons.woff -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap-3.4.1/fonts/bootstrap-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/vendor/bootstrap-3.4.1/fonts/bootstrap-icons.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/images/pig.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/images/pig.ico -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kyungseo/project-web-starter/HEAD/src/main/resources/static/vendor/bootstrap-3.4.1/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/vendor/iscroll-4.2.5/js/ender.js: -------------------------------------------------------------------------------- 1 | !function ($, iScroll) { 2 | $.ender({ 3 | iScroll: function (options) { 4 | return new iScroll(this[0], options) 5 | } 6 | }, true) 7 | }(ender, require('iscroll').iScroll) -------------------------------------------------------------------------------- /src/main/resources/templates/view/common/fileupload/uploadStatus.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Spring Boot - Upload Status

6 | 7 |
8 |

9 |

10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/common/fileupload/upload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Spring Boot file upload example

6 | 7 |
8 |

9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/cryptojs-3.1.2/js/mode-ecb-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | CryptoJS.mode.ECB=function(){var a=CryptoJS.lib.BlockCipherMode.extend();a.Encryptor=a.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}});a.Decryptor=a.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}});return a}(); 8 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap-3.4.1/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/resources/application-local.properties: -------------------------------------------------------------------------------- 1 | #http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties 2 | 3 | # ------------------------------------------------------------------- 4 | # [ Multipart ] 5 | # ------------------------------------------------------------------- 6 | 7 | spring.servlet.multipart.location=D:\\dev-home\\appfiles\\attatched_files 8 | 9 | # ------------------------------------------------------------------- 10 | # [ Logging ] 11 | # ------------------------------------------------------------------- 12 | 13 | #logging.level.root=debug 14 | logging.level.kyungseo.demo.security=debug 15 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/cryptojs-3.1.2/js/mode-ecb.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | /** 8 | * Electronic Codebook block mode. 9 | */ 10 | CryptoJS.mode.ECB = (function () { 11 | var ECB = CryptoJS.lib.BlockCipherMode.extend(); 12 | 13 | ECB.Encryptor = ECB.extend({ 14 | processBlock: function (words, offset) { 15 | this._cipher.encryptBlock(words, offset); 16 | } 17 | }); 18 | 19 | ECB.Decryptor = ECB.extend({ 20 | processBlock: function (words, offset) { 21 | this._cipher.decryptBlock(words, offset); 22 | } 23 | }); 24 | 25 | return ECB; 26 | }()); 27 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/admin/usermgmt/service/AdmUserValidationService.java: -------------------------------------------------------------------------------- 1 | package kyungseo.poc.simple.web.site.admin.usermgmt.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import kyungseo.poc.simple.web.site.admin.usermgmt.web.dto.AdmUserDTO; 6 | 7 | @Service 8 | public class AdmUserValidationService { 9 | 10 | // @Valid로 처리하지 못하는 Custom Validation 실행 11 | public String validateUser(AdmUserDTO user) { 12 | String message = ""; 13 | if (user.getCountry() != null && user.getPhoneNumber() != null) { 14 | if (user.getCountry().equalsIgnoreCase("KR") 15 | && !user.getPhoneNumber().startsWith("82")) { 16 | message = user.getCountry() + "에 대한 전화번호가 잘못되었습니다."; 17 | } 18 | } 19 | return message; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | web - %date [%thread] %-5level %logger{5} - %message%n%stack{5,1} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/jquery-validation-1.15.0/localization/messages_ko.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Validation Plugin - v1.15.0 - 2/24/2016 2 | * http://jqueryvalidation.org/ 3 | * Copyright (c) 2016 Jörn Zaefferer; Licensed MIT */ 4 | !function(a){"function"==typeof define&&define.amd?define(["jquery","../jquery.validate.min"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.validator.messages,{required:"필수 항목입니다.",remote:"항목을 수정하세요.",email:"유효하지 않은 E-Mail주소입니다.",url:"유효하지 않은 URL입니다.",date:"올바른 날짜를 입력하세요.",dateISO:"올바른 날짜(ISO)를 입력하세요.",number:"유효한 숫자가 아닙니다.",digits:"숫자만 입력 가능합니다.",creditcard:"신용카드 번호가 바르지 않습니다.",equalTo:"같은 값을 다시 입력하세요.",extension:"올바른 확장자가 아닙니다.",maxlength:a.validator.format("{0}자를 넘을 수 없습니다. "),minlength:a.validator.format("{0}자 이상 입력하세요."),rangelength:a.validator.format("문자 길이가 {0} 에서 {1} 사이의 값을 입력하세요."),range:a.validator.format("{0} 에서 {1} 사이의 값을 입력하세요."),max:a.validator.format("{0} 이하의 값을 입력하세요."),min:a.validator.format("{0} 이상의 값을 입력하세요.")})}); -------------------------------------------------------------------------------- /src/main/resources/static/vendor/jquery-validation-1.15.0/localization/messages_ko.js: -------------------------------------------------------------------------------- 1 | (function( factory ) { 2 | if ( typeof define === "function" && define.amd ) { 3 | define( ["jquery", "../jquery.validate"], factory ); 4 | } else if (typeof module === "object" && module.exports) { 5 | module.exports = factory( require( "jquery" ) ); 6 | } else { 7 | factory( jQuery ); 8 | } 9 | }(function( $ ) { 10 | 11 | /* 12 | * Translated default messages for the jQuery validation plugin. 13 | * Locale: KO (Korean; 한국어) 14 | */ 15 | $.extend( $.validator.messages, { 16 | required: "필수 항목입니다.", 17 | remote: "항목을 수정하세요.", 18 | email: "유효하지 않은 E-Mail주소입니다.", 19 | url: "유효하지 않은 URL입니다.", 20 | date: "올바른 날짜를 입력하세요.", 21 | dateISO: "올바른 날짜(ISO)를 입력하세요.", 22 | number: "유효한 숫자가 아닙니다.", 23 | digits: "숫자만 입력 가능합니다.", 24 | creditcard: "신용카드 번호가 바르지 않습니다.", 25 | equalTo: "같은 값을 다시 입력하세요.", 26 | extension: "올바른 확장자가 아닙니다.", 27 | maxlength: $.validator.format( "{0}자를 넘을 수 없습니다. " ), 28 | minlength: $.validator.format( "{0}자 이상 입력하세요." ), 29 | rangelength: $.validator.format( "문자 길이가 {0} 에서 {1} 사이의 값을 입력하세요." ), 30 | range: $.validator.format( "{0} 에서 {1} 사이의 값을 입력하세요." ), 31 | max: $.validator.format( "{0} 이하의 값을 입력하세요." ), 32 | min: $.validator.format( "{0} 이상의 값을 입력하세요." ) 33 | } ); 34 | 35 | })); -------------------------------------------------------------------------------- /src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | #http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties 2 | 3 | # ------------------------------------------------------------------- 4 | # [ DataSource - Multi-datasource ] 5 | # ------------------------------------------------------------------- 6 | 7 | # Datasource Configuration 8 | spring.datasource.ds1.jndi-name=java:/comp/env/jndi-name1 9 | spring.datasource.ds2.jndi-name=java:/comp/env/jndi-name2 10 | 11 | 12 | # ------------------------------------------------------------------- 13 | # [ Hibernate Configuration ] 14 | # ------------------------------------------------------------------- 15 | 16 | # \uc6b4\uc601 \uc7a5\ube44\uc5d0\uc11c\ub294 \uc808\ub300 crate, create-drop, update \ub4f1 \uc0ac\uc6a9 \uae08\uc9c0!! 17 | spring.jpa.properties.hibernate.hbm2ddl.auto=none 18 | 19 | # ------------------------------------------------------------------- 20 | # [ Multipart ] 21 | # ------------------------------------------------------------------- 22 | 23 | spring.servlet.multipart.location=D:\\dev-home\\appfiles\\attatched_files 24 | 25 | # ------------------------------------------------------------------- 26 | # [ Logging ] 27 | # ------------------------------------------------------------------- 28 | 29 | #logging.level.root=INFO 30 | logging.level.kyungseo.demo.security=info 31 | -------------------------------------------------------------------------------- /src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | #http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties 2 | 3 | # ------------------------------------------------------------------- 4 | # [ DataSource - Multi-datasource ] 5 | # ------------------------------------------------------------------- 6 | 7 | # Datasource Configuration 8 | spring.datasource.ds1.jndi-name=java:/comp/env/jndi-name1 9 | spring.datasource.ds2.jndi-name=java:/comp/env/jndi-name2 10 | 11 | # ------------------------------------------------------------------- 12 | # [ Hibernate Configuration ] 13 | # ------------------------------------------------------------------- 14 | 15 | # \uac1c\ubc1c \uc7a5\ube44\uc5d0\uc11c\ub294 \uac00\uae09\uc801 crate, create-drop, update \ub4f1\uc744 \uc0ac\uc6a9 \uc790\uc81c 16 | spring.jpa.properties.hibernate.hbm2ddl.auto=none 17 | 18 | # ------------------------------------------------------------------- 19 | # [ Multipart ] 20 | # ------------------------------------------------------------------- 21 | 22 | spring.servlet.multipart.location=D:\\dev-home\\appfiles\\attatched_files 23 | 24 | # ------------------------------------------------------------------- 25 | # [ Logging ] 26 | # ------------------------------------------------------------------- 27 | 28 | #logging.level.root=INFO 29 | 30 | logging.level.kyungseo.demo.security=debug 31 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/play/custom-dialog-id.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Dialog ID 11 | 12 | 13 | 14 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/model/Gender.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.common.model; 24 | 25 | /** 26 | * @author 박경서 (Kyungseo.Park@gmail.com) 27 | * @version 1.0 28 | */ 29 | public enum Gender { 30 | 31 | MAN, WOMAN 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/resources/templates/layout/fragments-fancysidebar/footer.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/data/enums/DatabaseType.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.data.enums; 24 | 25 | /** 26 | * @author 박경서 (Kyungseo.Park@gmail.com) 27 | * @version 1.0 28 | */ 29 | public enum DatabaseType { 30 | 31 | WRITE, READ; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/cryptojs-3.1.2/js/sha256-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | (function(k){for(var g=CryptoJS,h=g.lib,v=h.WordArray,j=h.Hasher,h=g.algo,s=[],t=[],u=function(q){return 4294967296*(q-(q|0))|0},l=2,b=0;64>b;){var d;a:{d=l;for(var w=k.sqrt(d),r=2;r<=w;r++)if(!(d%r)){d=!1;break a}d=!0}d&&(8>b&&(s[b]=u(k.pow(l,0.5))),t[b]=u(k.pow(l,1/3)),b++);l++}var n=[],h=h.SHA256=j.extend({_doReset:function(){this._hash=new v.init(s.slice(0))},_doProcessBlock:function(q,h){for(var a=this._hash.words,c=a[0],d=a[1],b=a[2],k=a[3],f=a[4],g=a[5],j=a[6],l=a[7],e=0;64>e;e++){if(16>e)n[e]= 8 | q[h+e]|0;else{var m=n[e-15],p=n[e-2];n[e]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+n[e-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[e-16]}m=l+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&g^~f&j)+t[e]+n[e];p=((c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22))+(c&d^c&b^d&b);l=j;j=g;g=f;f=k+m|0;k=b;b=d;d=c;c=m+p|0}a[0]=a[0]+c|0;a[1]=a[1]+d|0;a[2]=a[2]+b|0;a[3]=a[3]+k|0;a[4]=a[4]+f|0;a[5]=a[5]+g|0;a[6]=a[6]+j|0;a[7]=a[7]+l|0},_doFinalize:function(){var d=this._data,b=d.words,a=8*this._nDataBytes,c=8*d.sigBytes; 9 | b[c>>>5]|=128<<24-c%32;b[(c+64>>>9<<4)+14]=k.floor(a/4294967296);b[(c+64>>>9<<4)+15]=a;d.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var b=j.clone.call(this);b._hash=this._hash.clone();return b}});g.SHA256=j._createHelper(h);g.HmacSHA256=j._createHmacHelper(h)})(Math); 10 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/model/MemberRole.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.common.model; 24 | 25 | /** 26 | * @author 박경서 (Kyungseo.Park@gmail.com) 27 | * @version 1.0 28 | */ 29 | public enum MemberRole { 30 | 31 | ROLE_USER, ROLE_STAFF, ROLE_ADMIN 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/play/tabindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Tabindex 12 | 13 | 14 | 15 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/static/js/ks.mini/ksm.base.js: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * KyungSeo's Mini JavaScript Development Templates - KSM.js 3 | * 4 | * Copyright (c) 2016 by Kyungseo.Park@gmail.com 5 | * ============================================================================ 6 | * AUTHOR : Kyungseo Park 7 | * DESCRIPTION : KSM JavaScript Templates > BASE 8 | * ============================================================================ 9 | * Revision History 10 | * Author Date Description 11 | * ------ ---------- --------------------------------------------------- 12 | * 박경서 2016-11-22 initial version 13 | * ========================================================================= */ 14 | 15 | // ============================================================================ 16 | // KSM Namespace 17 | // ============================================================================ 18 | 19 | // TODO: 어플리케이션에 필요한 전역변수를 이름 하나로 관리 20 | // -> 다른 어플리케이션이나 위젯 또는 라이브러리들과 연동할 때 발생하는 문제점을 최소화 21 | 22 | // KSM, global namespace 23 | // TODO: 즉시 실행함수로 KSM 객체 생성 후 작업할 것! 24 | var KSM = KSM || {}; 25 | 26 | // Application (Web/App 등 구축 대상 시스템) 27 | KSM.application = KSM.application || {}; 28 | 29 | // flags 30 | KSM.flags = KSM.flags || {}; 31 | 32 | // KSM Dialog 창이 오픈되어 있는지의 여부 33 | // backbutton 눌렸을 때 처리 시 사용된다. -> ksm.cordova.js, main.js 34 | KSM.flags.isOpenKsmDialog = false; 35 | 36 | 37 | // Double Submit 방지를 위한 Request ID 생성 38 | KSM.request = KSM.request || { "id" : self.crypto.randomUUID() }; 39 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/play/append-to-div.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Append modal to div 11 | 12 | 13 | 14 | 15 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/hello.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Hello 28 | 29 | 30 |

Hello World

31 | 32 | 33 | -------------------------------------------------------------------------------- /src/test/java/kyungseo/poc/simple/web/SimpleWebApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web; 24 | 25 | import org.junit.jupiter.api.Test; 26 | import org.springframework.boot.test.context.SpringBootTest; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | @SpringBootTest 33 | class SimpleWebApplicationTests { 34 | 35 | @Test 36 | void contextLoads() { 37 | // ... 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/kyungseo/poc/simple/web/config/TestTaskConfig.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.config; 24 | 25 | import org.springframework.context.annotation.ComponentScan; 26 | import org.springframework.context.annotation.Configuration; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | @Configuration 33 | @ComponentScan({ "kyungseo.poc.simple.web.security.task" }) 34 | public class TestTaskConfig { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/components/ISecurityUserService.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.components; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | public interface ISecurityUserService { 33 | 34 | String validatePasswordResetToken(String token); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/play/spinning-icon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Spinning Icon 12 | 13 | 14 | 15 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/dto/file/FileBucket.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.dto.file; 24 | 25 | import org.springframework.web.multipart.MultipartFile; 26 | 27 | /** 28 | * @author 박경서 (Kyungseo.Park@gmail.com) 29 | * @version 1.0 30 | */ 31 | public class FileBucket { 32 | 33 | MultipartFile file; 34 | 35 | public MultipartFile getFile() { 36 | return file; 37 | } 38 | 39 | public void setFile(MultipartFile file) { 40 | this.file = file; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/resources/messages/messages-site.properties: -------------------------------------------------------------------------------- 1 | # Page view \ubcc4\ub85c \uc139\uc158 \uad6c\ubd84\ud558\uc5ec \uc791\uc131\ud560 \uac83! 2 | 3 | # -------------------------------------------------- 4 | # '/view/admin/usermgmt'\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 properties 5 | # -------------------------------------------------- 6 | 7 | # Pages 8 | admin.usermgmt.page.users.title=User Mgmt. 9 | admin.usermgmt.page.swagger.title=KYUNGSEO.PoC - API 1.0.0 10 | 11 | # lables 12 | admin.usermgmt.lbl.info=user info 13 | admin.usermgmt.lbl.id=ID 14 | admin.usermgmt.lbl.membername=membername 15 | admin.usermgmt.lbl.email=email 16 | admin.usermgmt.lbl.password=password 17 | admin.usermgmt.lbl.age=age 18 | admin.usermgmt.lbl.birthdate=birthdate 19 | admin.usermgmt.lbl.phoneNumber=phoneNumber 20 | admin.usermgmt.lbl.country=country 21 | admin.usermgmt.lbl.enabled=enabled 22 | admin.usermgmt.lbl.isUsing2FA=isUsing2FA 23 | admin.usermgmt.lbl.secret=secret 24 | admin.usermgmt.lbl.regDate=.regDate 25 | admin.usermgmt.lbl.modDate=modDate 26 | admin.usermgmt.lbl.roles=roles 27 | admin.usermgmt.lbl.action=action 28 | 29 | admin.usermgmt.lbl.btn.read=read 30 | admin.usermgmt.lbl.btn.edit=edit 31 | admin.usermgmt.lbl.btn.editRole=edit role 32 | admin.usermgmt.lbl.btn.delete=delete 33 | 34 | # messages 35 | admin.usermgmt.msg.reg.succ=success 36 | admin.usermgmt.msg.reg.fail=fail 37 | 38 | # validation 39 | admin.usermgmt.vld.password.notnull=notnull 40 | admin.usermgmt.vld.password.notempty=notempty 41 | admin.usermgmt.vld.password.matches=not matche 42 | 43 | # -------------------------------------------------- 44 | # '/view/admin/xxxx'\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 properties 45 | # -------------------------------------------------- 46 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/sample/persistence/repository/ds1/CustomerRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.sample.persistence.repository.ds1; 24 | 25 | import org.springframework.data.jpa.repository.JpaRepository; 26 | 27 | import kyungseo.poc.simple.web.site.sample.persistence.entity.ds1.Customer; 28 | 29 | /** 30 | * @author 박경서 (Kyungseo.Park@gmail.com) 31 | * @version 1.0 32 | */ 33 | public interface CustomerRepository extends JpaRepository { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/static/js/ks.mini/ksm.crypto.js: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * KyungSeo's Mini JavaScript Development Templates - KSM.js 3 | * 4 | * Copyright (c) 2016 by Kyungseo.Park@gmail.com 5 | * ============================================================================ 6 | * AUTHOR : Kyungseo Park 7 | * DESCRIPTION : CryptoJS에 기반해서 작성한 암호화 유틸리티 8 | * ============================================================================ 9 | * Revision History 10 | * Author Date Description 11 | * ------ ---------- --------------------------------------------------- 12 | * 박경서 2016-11-03 initial version 13 | * ========================================================================= */ 14 | 15 | //============================================================================ 16 | // Crypto 17 | //============================================================================ 18 | 19 | var KSM_CRYPTO = { 20 | 21 | encryptByDES: function(message, key) { 22 | var keyHex = CryptoJS.enc.Utf8.parse(key); 23 | var encrypted = CryptoJS.DES.encrypt(message, keyHex, { 24 | mode: CryptoJS.mode.ECB, 25 | padding: CryptoJS.pad.Pkcs7 26 | }); 27 | return encrypted.toString(); 28 | }, 29 | 30 | decryptByDES: function(ciphertext, key) { 31 | var keyHex = CryptoJS.enc.Utf8.parse(key); 32 | // direct decrypt ciphertext 33 | var decrypted = CryptoJS.DES.decrypt({ 34 | ciphertext: CryptoJS.enc.Base64.parse(ciphertext) 35 | }, keyHex, { 36 | mode: CryptoJS.mode.ECB, 37 | padding: CryptoJS.pad.Pkcs7 38 | }); 39 | return decrypted.toString(CryptoJS.enc.Utf8); 40 | } 41 | 42 | }; 43 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/geoip/City.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.geoip; 24 | 25 | /** 26 | * 임시 - 구현 예정 27 | * 28 | * @author 박경서 (Kyungseo.Park@gmail.com) 29 | * @version 1.0 30 | */ 31 | public class City { 32 | 33 | private String name; 34 | 35 | public City() { 36 | // 37 | } 38 | 39 | public String getName() { 40 | return name; 41 | } 42 | 43 | public void setName(String name) { 44 | this.name = name; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/switch.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Example switch 28 | 29 | 30 |
31 |
32 |

여성...

33 |

남성!

34 |

성별 알 수 없음

35 |
36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/geoip/Country.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.geoip; 24 | 25 | /** 26 | * 임시 - 구현 예정 27 | * 28 | * @author 박경서 (Kyungseo.Park@gmail.com) 29 | * @version 1.0 30 | */ 31 | public class Country { 32 | 33 | private String name; 34 | 35 | public Country() { 36 | // 37 | } 38 | 39 | public String getName() { 40 | return name; 41 | } 42 | 43 | public void setName(String name) { 44 | this.name = name; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/resources/static/js/ks.mini/ksm.plugins.shortcut.js: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * KyungSeo's Mini JavaScript Development Templates - KSM.js 3 | * 4 | * Copyright (c) 2016 by Kyungseo.Park@gmail.com 5 | * ============================================================================ 6 | * AUTHOR : Kyungseo Park 7 | * DESCRIPTION : KSM JavaScript Templates > Short Cut 8 | * ============================================================================ 9 | * Revision History 10 | * Author Date Description 11 | * ------ ---------- --------------------------------------------------- 12 | * 박경서 2016-11-22 initial version 13 | * ========================================================================= */ 14 | 15 | var KsmShortcut = function() {}; 16 | 17 | KsmShortcut.prototype.CreateShortcut = function (shortcut_text, successCallback, errorCallback) { 18 | cordova.exec( 19 | successCallback, 20 | errorCallback, 21 | 'KsmShortcut', 22 | 'addShortcut', 23 | [{ 24 | "shortcuttext": shortcut_text 25 | }] 26 | ); 27 | }; 28 | 29 | KsmShortcut.prototype.RemoveShortcut = function(shortcut_text, successCallback, errorCallback) { 30 | cordova.exec( 31 | successCallback, 32 | errorCallback, 33 | 'KsmShortcut', 34 | 'delShortcut', 35 | [{ 36 | "shortcuttext": shortcut_text 37 | }] 38 | ); 39 | }; 40 | 41 | if (! window.plugins) { 42 | window.plugins = {}; 43 | } 44 | 45 | if (! window.plugins.Shortcut) { 46 | window.plugins.Shortcut = new KsmShortcut(); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/dto/file/FileInfo.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.dto.file; 24 | 25 | import lombok.Builder; 26 | import lombok.Getter; 27 | import lombok.Setter; 28 | import lombok.ToString; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | @Getter 35 | @Setter 36 | @Builder 37 | @ToString 38 | public class FileInfo { 39 | 40 | private String uploadPath; 41 | 42 | private String uploadFilename; 43 | 44 | private String originalFilename; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/dto/response/UserIdentityAvailability.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.dto.response; 24 | 25 | import lombok.AllArgsConstructor; 26 | import lombok.Getter; 27 | import lombok.NoArgsConstructor; 28 | import lombok.Setter; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | @Getter 35 | @Setter 36 | @AllArgsConstructor 37 | @NoArgsConstructor 38 | public class UserIdentityAvailability { 39 | 40 | private Boolean available; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/if.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Example If/Unless 28 | 29 | 30 |
31 |

If/Unless

32 | HOME 33 |
34 | KICO 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/annotation/db/Slave.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.annotation.db; 24 | 25 | import java.lang.annotation.Documented; 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Target(ElementType.TYPE) 36 | @Retention(RetentionPolicy.RUNTIME) 37 | @Documented 38 | public @interface Slave { 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/annotation/db/Mapper.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.annotation.db; 24 | 25 | import java.lang.annotation.Documented; 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Target(ElementType.TYPE) 36 | @Retention(RetentionPolicy.RUNTIME) 37 | @Documented 38 | public @interface Mapper { 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/annotation/db/Master.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.annotation.db; 24 | 25 | import java.lang.annotation.Documented; 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Target(ElementType.TYPE) 36 | @Retention(RetentionPolicy.RUNTIME) 37 | @Documented 38 | public @interface Master { 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/geoip/DatabaseReader.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.geoip; 24 | 25 | import java.net.InetAddress; 26 | 27 | /** 28 | * 임시 - 구현 예정 29 | * 30 | * @author 박경서 (Kyungseo.Park@gmail.com) 31 | * @version 1.0 32 | */ 33 | public class DatabaseReader { 34 | 35 | public CountryResponse country(InetAddress ipAddress) { 36 | return new CountryResponse(ipAddress); 37 | } 38 | 39 | public CityResponse city(InetAddress ipAddress) { 40 | return new CityResponse(ipAddress); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/resources/mybatis/mapper/sample/CustomerMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 18 | 19 | 20 | INSERT /* CustomerMapper.insertCustomer */ 21 | INTO CUSTOMER( 22 | CUSTOMER_ID 23 | , CUSTOMER_NAME 24 | , COMPANY 25 | ) VALUES ( 26 | #{customerId} 27 | , #{customerName} 28 | , #{company} 29 | ) 30 | 31 | 32 | 33 | UPDATE /* CustomerMapper.updateCustomer */ 34 | CUSTOMER 35 | 36 | 37 | CUSTOMER_NAME = #{customerName} 38 | 39 | 40 | , COMPANY = #{company} 41 | 42 | 43 | WHERE CUSTOMER_ID = #{customerId} 44 | 45 | 46 | 47 | DELETE /* CustomerMapper.deleteCustomer */ 48 | FROM CUSTOMER 49 | WHERE CUSTOMER_ID = #{_parameter} 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/eq.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Example gt eq 28 | 29 | 30 |
31 |

EQ

32 | 33 |
34 | 35 |
36 | favorites 37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/EmailAlreadyExistException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.web.error; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | @SuppressWarnings("serial") 33 | public class EmailAlreadyExistException extends Throwable { 34 | 35 | public EmailAlreadyExistException(final String message) { 36 | super(message); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/string.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Example String 28 | 29 | 30 |
31 |

text

32 |

neo

33 | 34 |
35 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/dto/request/DeviceInfo.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.dto.request; 24 | 25 | import javax.validation.constraints.NotBlank; 26 | import javax.validation.constraints.NotNull; 27 | 28 | import lombok.Getter; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | @Getter 35 | public class DeviceInfo { 36 | 37 | @NotBlank(message = "Device id 항목은 필수 값입니다.") 38 | private String deviceId; 39 | 40 | @NotNull(message = "Device id 항목은 필수 값입니다.") 41 | private String deviceType; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/common/fileupload/from_file.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | XXXXX 5 |
6 |
7 | 8 | 0%
9 |
10 |
11 |
12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/converter/StringTrimConverter.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.converter; 24 | 25 | import org.springframework.core.convert.converter.Converter; 26 | import org.springframework.stereotype.Component; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | @Component 33 | public class StringTrimConverter implements Converter { 34 | 35 | @Override 36 | public String convert(String source) { 37 | if (source == null) return source; 38 | return source.trim(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/web/controller/SwaggerRedirector.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.common.web.controller; 24 | 25 | import org.springframework.stereotype.Controller; 26 | import org.springframework.web.bind.annotation.GetMapping; 27 | import org.springframework.web.bind.annotation.RequestMapping; 28 | 29 | /** 30 | * @author 박경서 (Kyungseo.Park@gmail.com) 31 | * @version 1.0 32 | */ 33 | @Controller 34 | @RequestMapping("/api/usage") 35 | public class SwaggerRedirector { 36 | @GetMapping 37 | public String api() { return "redirect:/swagger-ui/index.html"; } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/dto/response/UserProfile.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.dto.response; 24 | 25 | import lombok.AllArgsConstructor; 26 | import lombok.Getter; 27 | import lombok.NoArgsConstructor; 28 | import lombok.Setter; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | @Getter 35 | @Setter 36 | @NoArgsConstructor 37 | @AllArgsConstructor 38 | public class UserProfile { 39 | 40 | private Long id; 41 | 42 | private String email; 43 | 44 | private String membername; 45 | 46 | private Boolean active; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/config/ServiceConfig.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.config; 27 | 28 | import org.springframework.context.annotation.ComponentScan; 29 | import org.springframework.context.annotation.Configuration; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Configuration 36 | @ComponentScan({ "kyungseo.poc.simple.web.security.service" }) 37 | public class ServiceConfig { 38 | 39 | // 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/play/reopen-dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Reopen Dialog 11 | 12 | 13 | 14 | 15 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/dto/request/TokenRefreshRequest.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.dto.request; 24 | 25 | import javax.validation.constraints.NotBlank; 26 | 27 | import lombok.AllArgsConstructor; 28 | import lombok.Getter; 29 | import lombok.NoArgsConstructor; 30 | import lombok.Setter; 31 | 32 | /** 33 | * @author 박경서 (Kyungseo.Park@gmail.com) 34 | * @version 1.0 35 | */ 36 | @Getter 37 | @Setter 38 | @AllArgsConstructor 39 | @NoArgsConstructor 40 | public class TokenRefreshRequest { 41 | 42 | @NotBlank(message = "Refresh token은 필수 값입니다.") 43 | private String refreshToken; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/css/bootstrap-dialog.min.css: -------------------------------------------------------------------------------- 1 | .bootstrap-dialog .modal-header{border-top-left-radius:4px;border-top-right-radius:4px}.bootstrap-dialog .bootstrap-dialog-title{color:#fff;display:inline-block;font-size:16px}.bootstrap-dialog .bootstrap-dialog-message{font-size:14px}.bootstrap-dialog .bootstrap-dialog-button-icon{margin-right:3px}.bootstrap-dialog .bootstrap-dialog-close-button{font-size:20px;float:right;opacity:.9;filter:alpha(opacity=90)}.bootstrap-dialog .bootstrap-dialog-close-button:hover{cursor:pointer;opacity:1;filter:alpha(opacity=100)}.bootstrap-dialog.type-default .modal-header{background-color:#fff}.bootstrap-dialog.type-default .bootstrap-dialog-title{color:#333}.bootstrap-dialog.type-info .modal-header{background-color:#5bc0de}.bootstrap-dialog.type-primary .modal-header{background-color:#337ab7}.bootstrap-dialog.type-success .modal-header{background-color:#5cb85c}.bootstrap-dialog.type-warning .modal-header{background-color:#f0ad4e}.bootstrap-dialog.type-danger .modal-header{background-color:#d9534f}.bootstrap-dialog.size-large .bootstrap-dialog-title{font-size:24px}.bootstrap-dialog.size-large .bootstrap-dialog-close-button{font-size:30px}.bootstrap-dialog.size-large .bootstrap-dialog-message{font-size:18px}.bootstrap-dialog .icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/validation/ValidationMarkers.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.validation; 24 | 25 | /** 26 | * Validation Markers interface for @Validated annotation 27 | * 28 | * @author 박경서 (Kyungseo.Park@gmail.com) 29 | * @version 1.0 30 | */ 31 | public interface ValidationMarkers { 32 | 33 | // Validation Marker for Create-request 34 | interface Create {} 35 | 36 | // Validation Marker for Retrieve-request 37 | interface Retrieve {} 38 | 39 | // Validation Marker for Update-request 40 | interface Update {} 41 | 42 | // Validation Marker for Delete-request 43 | interface Delete {} 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/dto/SessionScopeModel.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.dto; 24 | 25 | import org.springframework.stereotype.Component; 26 | import org.springframework.web.context.annotation.SessionScope; 27 | 28 | import lombok.Getter; 29 | import lombok.Setter; 30 | import lombok.ToString; 31 | 32 | /** 33 | * @author 박경서 (Kyungseo.Park@gmail.com) 34 | * @version 1.0 35 | */ 36 | @SessionScope 37 | @Component 38 | @Getter 39 | @Setter 40 | @ToString 41 | public class SessionScopeModel { 42 | 43 | private String membername; 44 | 45 | private String password; 46 | 47 | private String role; 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/data/enums/ExcelColumnType.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.data.enums; 24 | 25 | /** 26 | * @author 박경서 (Kyungseo.Park@gmail.com) 27 | * @version 1.0 28 | */ 29 | public enum ExcelColumnType { 30 | 31 | /** Column type : String */ 32 | STRING 33 | /** Column type : Integer */ 34 | , INTEGER 35 | /** Column type : Double */ 36 | , DOUBLE 37 | /** Column type : Date (yyyy-MM-dd) */ 38 | , DATE 39 | /** Column type : Date (yyyy-MM-dd HH:mm) */ 40 | , DATEHHMM 41 | /** Column type : Date (yyyy-MM-dd HH:mm:ss) */ 42 | , DATETIME 43 | /** Column type : Header */ 44 | , HEADER 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/annotation/profile/Dev.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.annotation.profile; 24 | 25 | import static java.lang.annotation.ElementType.METHOD; 26 | import static java.lang.annotation.ElementType.TYPE; 27 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 28 | 29 | import java.lang.annotation.Retention; 30 | import java.lang.annotation.Target; 31 | 32 | import org.springframework.context.annotation.Profile; 33 | 34 | /** 35 | * @author 박경서 (Kyungseo.Park@gmail.com) 36 | * @version 1.0 37 | */ 38 | @Retention(RUNTIME) 39 | @Target({ TYPE, METHOD }) 40 | @Profile("dev") 41 | public @interface Dev { 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/annotation/profile/Local.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.annotation.profile; 24 | 25 | import static java.lang.annotation.ElementType.METHOD; 26 | import static java.lang.annotation.ElementType.TYPE; 27 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 28 | 29 | import java.lang.annotation.Retention; 30 | import java.lang.annotation.Target; 31 | 32 | import org.springframework.context.annotation.Profile; 33 | 34 | /** 35 | * @author 박경서 (Kyungseo.Park@gmail.com) 36 | * @version 1.0 37 | */ 38 | @Retention(RUNTIME) 39 | @Target({ TYPE, METHOD }) 40 | @Profile("local") 41 | public @interface Local { 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/annotation/profile/Prod.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.annotation.profile; 24 | 25 | import static java.lang.annotation.ElementType.METHOD; 26 | import static java.lang.annotation.ElementType.TYPE; 27 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 28 | 29 | import java.lang.annotation.Retention; 30 | import java.lang.annotation.Target; 31 | 32 | import org.springframework.context.annotation.Profile; 33 | 34 | /** 35 | * @author 박경서 (Kyungseo.Park@gmail.com) 36 | * @version 1.0 37 | */ 38 | @Retention(RUNTIME) 39 | @Target({ TYPE, METHOD }) 40 | @Profile("prod") 41 | public @interface Prod { 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/sample/persistence/mapper/ds1/CustomerMapper.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.sample.persistence.mapper.ds1; 24 | 25 | import java.util.List; 26 | 27 | import org.apache.ibatis.annotations.Mapper; 28 | 29 | import kyungseo.poc.simple.web.site.sample.model.Customer; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Mapper 36 | public interface CustomerMapper { 37 | 38 | List selectCustomer(Integer customerId); 39 | 40 | void insertCustomer(Customer customer); 41 | 42 | void updateCustomer(Customer customer); 43 | 44 | void deleteCustomer(int customerId); 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/list.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Example list 28 | 29 | 30 |
31 |

사용자 목록

32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
indexKyungseoMAN213
40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/url.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Example If/Unless 28 | 29 | 30 |
31 |

URL

32 | link1 33 |
34 | view 35 |
36 |
37 |


38 |
39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/persistence/repository/ds1/JwtRefreshTokenRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.persistence.repository.ds1; 24 | 25 | import java.util.Optional; 26 | 27 | import org.springframework.data.jpa.repository.JpaRepository; 28 | 29 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.JwtRefreshToken; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | public interface JwtRefreshTokenRepository extends JpaRepository { 36 | 37 | @Override 38 | Optional findById(Long id); 39 | 40 | Optional findByToken(String token); 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/dto/file/MultiFileBucket.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.dto.file; 24 | 25 | import java.util.ArrayList; 26 | import java.util.List; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | public class MultiFileBucket { 33 | 34 | List files = new ArrayList(); 35 | 36 | public MultiFileBucket() { 37 | files.add(new FileBucket()); 38 | files.add(new FileBucket()); 39 | files.add(new FileBucket()); 40 | } 41 | 42 | public List getFiles() { 43 | return files; 44 | } 45 | 46 | public void setFiles(List files) { 47 | this.files = files; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/persistence/repository/ds1/RoleRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.persistence.repository.ds1; 27 | 28 | import org.springframework.data.jpa.repository.JpaRepository; 29 | 30 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.Role; 31 | 32 | /** 33 | * @author 박경서 (Kyungseo.Park@gmail.com) 34 | * @version 1.0 35 | */ 36 | public interface RoleRepository extends JpaRepository { 37 | 38 | Role findByName(String name); 39 | 40 | @Override 41 | void delete(Role role); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/config/SpringTaskConfig.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.config; 27 | 28 | import org.springframework.context.annotation.Configuration; 29 | import org.springframework.context.annotation.ComponentScan; 30 | import org.springframework.scheduling.annotation.EnableScheduling; 31 | 32 | /** 33 | * @author 박경서 (Kyungseo.Park@gmail.com) 34 | * @version 1.0 35 | */ 36 | @Configuration 37 | @EnableScheduling 38 | @ComponentScan({ "kyungseo.poc.simple.web.security.task" }) 39 | public class SpringTaskConfig { 40 | 41 | // 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/service/CurrentUser.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.service; 24 | 25 | import java.lang.annotation.Documented; 26 | import java.lang.annotation.ElementType; 27 | import java.lang.annotation.Retention; 28 | import java.lang.annotation.RetentionPolicy; 29 | import java.lang.annotation.Target; 30 | 31 | import org.springframework.security.core.annotation.AuthenticationPrincipal; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | @Target({ElementType.PARAMETER, ElementType.TYPE}) 38 | @Retention(RetentionPolicy.RUNTIME) 39 | @Documented 40 | @AuthenticationPrincipal 41 | public @interface CurrentUser { 42 | 43 | // 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/config/ApplicationConfig.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.config; 27 | 28 | import org.springframework.context.annotation.Bean; 29 | import org.springframework.context.annotation.Configuration; 30 | 31 | import kyungseo.poc.simple.web.security.components.ActiveUserStore; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | @Configuration 38 | public class ApplicationConfig { 39 | 40 | @Bean 41 | public ActiveUserStore activeUserStore() { 42 | return new ActiveUserStore(); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/exception/ViolationException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.exception; 24 | 25 | /** 26 | * @author 박경서 (Kyungseo.Park@gmail.com) 27 | * @version 1.0 28 | */ 29 | public class ViolationException extends RuntimeException { 30 | 31 | private static final long serialVersionUID = 1L; 32 | 33 | public ViolationException() { 34 | super(); 35 | } 36 | 37 | public ViolationException(String message) { 38 | super(message); 39 | } 40 | 41 | public ViolationException(String message, Throwable cause) { 42 | super(message, cause); 43 | } 44 | 45 | public ViolationException(Throwable cause) { 46 | super(cause); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/persistence/repository/ds1/PrivilegeRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.persistence.repository.ds1; 27 | 28 | import org.springframework.data.jpa.repository.JpaRepository; 29 | 30 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.Privilege; 31 | 32 | /** 33 | * @author 박경서 (Kyungseo.Park@gmail.com) 34 | * @version 1.0 35 | */ 36 | public interface PrivilegeRepository extends JpaRepository { 37 | 38 | Privilege findByName(String name); 39 | 40 | @Override 41 | void delete(Privilege privilege); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/resources/templates/view/sample/th/currencies.html: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | Currency table 28 | 29 | 30 |

Currency format by Locale

31 |

32 | 33 |

Currency Arrays format by Locale

34 |

35 | 36 |

Remove decimal values

37 |

38 | 39 |

Replace decimal points

40 |

41 | 42 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/dto/request/LogOutRequest.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.dto.request; 24 | 25 | import javax.validation.Valid; 26 | import javax.validation.constraints.NotNull; 27 | 28 | import lombok.AllArgsConstructor; 29 | import lombok.Getter; 30 | import lombok.NoArgsConstructor; 31 | import lombok.Setter; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | @Getter 38 | @Setter 39 | @AllArgsConstructor 40 | @NoArgsConstructor 41 | public class LogOutRequest { 42 | 43 | @Valid 44 | @NotNull(message = "기존 토큰을 전달해야 합니다.") 45 | private String token; 46 | 47 | @Valid 48 | @NotNull(message = "Device 정보는 필수 값입니다.") 49 | private DeviceInfo deviceInfo; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/resources/static/js/ks.mini/ksm.message.js: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * KyungSeo's Mini JavaScript Development Templates - KSM.js 3 | * 4 | * Copyright (c) 2016 by Kyungseo.Park@gmail.com 5 | * ============================================================================ 6 | * AUTHOR : Kyungseo Park 7 | * DESCRIPTION : KSM JavaScript Templates > MESSAGE 8 | * ============================================================================ 9 | * Revision History 10 | * Author Date Description 11 | * ------ ---------- --------------------------------------------------- 12 | * 박경서 2016-10-22 initial version 13 | * ========================================================================= */ 14 | 15 | //============================================================================ 16 | // Mesages 17 | //============================================================================ 18 | 19 | var KSM_MESSAGE = { 20 | 21 | // 시스템 Core와 관련한 메지시 map 22 | systemErrorMessageMap : { 23 | '901': "현재 브라우저는 HTML5의 local storage 기능을 지원하지 않습니다.", 24 | '902': "유효하지않은 ACTION 값입니다.", 25 | '903': "유효하지않은 DATATYPE입니다." 26 | }, 27 | 28 | // status와 관련한 메지시 map 29 | // - https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html 30 | statusErrorMessageMap : { 31 | '0': "Not connected. 네트워크 연결을 확인하시기 바랍니다.", 32 | '400': "Bad Request. 잘못된 요청입니다.", 33 | '401': "Unauthorized. 인증되지 않은 사용자입니다. ", 34 | '403': "Forbidden. 권한이 없습니다.", 35 | '404': "Not Found. 요청한 서비스(API)를 찾을 수 없습니다.", 36 | '415': "Unsupported Media Type. 지원하지 않는 미디어 형식입니다.", 37 | '500': "Internal Server Error. 서버에서 예기치 않은 에러가 발생하였습니다.", 38 | '503': "Service Unavailable. 서비스가 불가합니다.", 39 | '999': "Unknown Error. 알 수 없는 에러가 발생하였습니다." 40 | }, 41 | 42 | // Application(Project) 업무와 관련한 메시지 map 43 | applicationMessageMap : { 44 | '101': "정상적으로 조회되었습니다.", 45 | '105': "데이터가 존재하지 않습니다.", 46 | '201': "세션 시간이 만료되었습니다." 47 | } 48 | 49 | }; 50 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/geoip/CityResponse.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.geoip; 24 | 25 | import java.io.IOException; 26 | import java.net.InetAddress; 27 | import java.util.HashMap; 28 | import java.util.List; 29 | import java.util.Map; 30 | 31 | /** 32 | * 임시 - 구현 예정 33 | * 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | public final class CityResponse { 38 | 39 | private final Map>> records = new HashMap<>(); 40 | 41 | private InetAddress ipAddress; 42 | 43 | public CityResponse(InetAddress ipAddress) { 44 | this.ipAddress = ipAddress; 45 | } 46 | 47 | public City getCity() throws IOException { 48 | return new City(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/components/ActiveUserStore.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.components; 27 | 28 | import java.util.ArrayList; 29 | import java.util.List; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | public class ActiveUserStore { 36 | 37 | public List users; 38 | 39 | public ActiveUserStore() { 40 | users = new ArrayList<>(); 41 | } 42 | 43 | public List getUsers() { 44 | return users; 45 | } 46 | 47 | public void setUsers(List users) { 48 | this.users = users; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/captcha/ICaptchaService.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.captcha; 27 | 28 | import kyungseo.poc.simple.web.security.web.error.ReCaptchaInvalidException; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | public interface ICaptchaService { 35 | 36 | default void processResponse(final String response) throws ReCaptchaInvalidException {} 37 | 38 | default void processResponse(final String response, String action) throws ReCaptchaInvalidException {} 39 | 40 | String getReCaptchaSite(); 41 | 42 | String getReCaptchaSecret(); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/data/mybatis/handler/EmptyToNullTypeHandler.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.data.mybatis.handler; 24 | 25 | import java.sql.PreparedStatement; 26 | import java.sql.SQLException; 27 | 28 | import org.apache.ibatis.type.JdbcType; 29 | import org.apache.ibatis.type.StringTypeHandler; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | public class EmptyToNullTypeHandler extends StringTypeHandler { 36 | 37 | @Override 38 | public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType) throws SQLException { 39 | if ("".equals(parameter)) { 40 | parameter = null; 41 | } 42 | ps.setString(i, (parameter)); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/persistence/repository/ds1/UserLocationRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.persistence.repository.ds1; 27 | 28 | import org.springframework.data.jpa.repository.JpaRepository; 29 | 30 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.User; 31 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.UserLocation; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | public interface UserLocationRepository extends JpaRepository { 38 | 39 | UserLocation findByCountryAndUser(String country, User user); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/geoip/CountryResponse.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.geoip; 24 | 25 | import java.io.IOException; 26 | import java.net.InetAddress; 27 | import java.util.HashMap; 28 | import java.util.List; 29 | import java.util.Map; 30 | 31 | /** 32 | * 임시 - 구현 예정 33 | * 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | public final class CountryResponse { 38 | 39 | private final Map>> records = new HashMap<>(); 40 | 41 | private InetAddress ipAddress; 42 | 43 | public CountryResponse(InetAddress ipAddress) { 44 | this.ipAddress = ipAddress; 45 | } 46 | 47 | public Country getCountry() throws IOException { 48 | return new Country(); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/README.md: -------------------------------------------------------------------------------- 1 | bootstrap-dialog 2 | ================ 3 | 4 | [![Latest release](https://img.shields.io/github/release/nakupanda/bootstrap3-dialog.svg)](https://github.com/nakupanda/bootstrap3-dialog/releases/latest) 5 | 6 | Make use of Bootstrap Modal more monkey-friendly. 7 | 8 | See live examples here: http://nakupanda.github.io/bootstrap3-dialog/ 9 | 10 | Please note that this project is for Bootstrap 3. 11 | 12 | Thanks for [akinoniku](https://github.com/akinoniku)'s suggestions on dialog appearance. 13 | 14 | ================ 15 | 16 | ## Ask a question 17 | 18 | It's recommended to provide online examples when asking questions or reporting bugs. 19 | Fork this all-ready jsfiddle and start writing your example: 20 | http://jsfiddle.net/o5k0eaws/1/ 21 | 22 | ================ 23 | 24 | ## Use Guidances from contributors 25 | 26 | How to use bootstrap-dialog as Rails 4 confirm - @[Genkilabs](https://github.com/Genkilabs) 27 | 28 | ================ 29 | ## Reference to CDN 30 | 31 | ``` 32 | https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.7/css/bootstrap-dialog.min.css 33 | https://cdnjs.cloudflare.com/ajax/libs/bootstrap3-dialog/1.34.7/js/bootstrap-dialog.min.js 34 | ``` 35 | ================ 36 | 37 | ## Install using Bower 38 | 39 | ``` 40 | bower install bootstrap-dialog 41 | ``` 42 | 43 | Or 44 | 45 | ``` 46 | bower install bootstrap3-dialog 47 | ``` 48 | 49 | ================ 50 | 51 | ## Install using npm 52 | 53 | ``` 54 | npm install --save bootstrap3-dialog 55 | ``` 56 | 57 | ================ 58 | 59 | ## Build instructions: 60 | 61 | Prepare: 62 | 63 | ``` 64 | npm install 65 | ``` 66 | 67 | Build: 68 | 69 | ``` 70 | gulp dist 71 | ``` 72 | 73 | ================ 74 | 75 | Licensed under The MIT License. 76 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/base/persistence/IOperations.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.common.base.persistence; 24 | 25 | import java.io.Serializable; 26 | import java.util.List; 27 | 28 | import org.springframework.data.domain.Page; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | public interface IOperations { 35 | 36 | // read - one 37 | 38 | T findById(final long id); 39 | 40 | // read - all 41 | 42 | List findAll(); 43 | 44 | Page findPaginated(int page, int size); 45 | 46 | // write 47 | 48 | T create(final T entity); 49 | 50 | T update(final T entity); 51 | 52 | void delete(final T entity); 53 | 54 | void deleteById(final long entityId); 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/test/java/kyungseo/poc/simple/web/config/ConfigTest.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.config; 24 | 25 | import org.springframework.context.annotation.Bean; 26 | import org.springframework.context.annotation.Configuration; 27 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; 28 | import org.springframework.security.crypto.password.PasswordEncoder; 29 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Configuration 36 | public class ConfigTest implements WebMvcConfigurer { 37 | 38 | public ConfigTest() { 39 | super(); 40 | } 41 | 42 | @Bean 43 | public PasswordEncoder encoder() { 44 | return new BCryptPasswordEncoder(11); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/persistence/repository/ds1/DeviceMetadataRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.persistence.repository.ds1; 27 | 28 | import java.util.List; 29 | 30 | import org.springframework.data.jpa.repository.JpaRepository; 31 | 32 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.DeviceMetadata; 33 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.JwtRefreshToken; 34 | 35 | /** 36 | * @author 박경서 (Kyungseo.Park@gmail.com) 37 | * @version 1.0 38 | */ 39 | public interface DeviceMetadataRepository extends JpaRepository { 40 | 41 | List findByUserId(Long userId); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/UnusualLocationException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.web.error; 27 | 28 | import org.springframework.security.core.AuthenticationException; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | public final class UnusualLocationException extends AuthenticationException { 35 | 36 | private static final long serialVersionUID = 5861310537366287163L; 37 | 38 | public UnusualLocationException(final String message, final Throwable cause) { 39 | super(message, cause); 40 | } 41 | 42 | public UnusualLocationException(final String message) { 43 | super(message); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/persistence/repository/ds1/JwtUserDeviceRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.persistence.repository.ds1; 24 | 25 | import java.util.Optional; 26 | 27 | import org.springframework.data.jpa.repository.JpaRepository; 28 | 29 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.JwtRefreshToken; 30 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.JwtUserDevice; 31 | 32 | /** 33 | * @author 박경서 (Kyungseo.Park@gmail.com) 34 | * @version 1.0 35 | */ 36 | public interface JwtUserDeviceRepository extends JpaRepository { 37 | 38 | @Override 39 | Optional findById(Long id); 40 | 41 | Optional findByRefreshToken(JwtRefreshToken jwtRefreshToken); 42 | 43 | Optional findByUserId(Long userId); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/service/FileService.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.common.service; 24 | 25 | import org.springframework.stereotype.Service; 26 | import org.springframework.web.multipart.MultipartFile; 27 | 28 | import kyungseo.poc.simple.web.appcore.util.FileUtil; 29 | import lombok.RequiredArgsConstructor; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Service 36 | @RequiredArgsConstructor 37 | public class FileService { 38 | 39 | private final FileUtil fileUtil; 40 | 41 | /** 42 | * upload 43 | * @param multipartFiles 44 | */ 45 | public void upload(final MultipartFile[] multipartFiles) { 46 | int i=0; 47 | for(MultipartFile multipartFile : multipartFiles) { 48 | this.fileUtil.upload(multipartFile, "/test", "testNewFilename" + (++i)); 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/validation/FileValidator.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.validation; 24 | 25 | import org.springframework.stereotype.Component; 26 | import org.springframework.validation.Errors; 27 | import org.springframework.validation.Validator; 28 | 29 | import kyungseo.poc.simple.web.appcore.dto.file.FileBucket; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Component 36 | public class FileValidator implements Validator { 37 | 38 | public boolean supports(Class clazz) { 39 | return FileBucket.class.isAssignableFrom(clazz); 40 | } 41 | 42 | public void validate(Object obj, Errors errors) { 43 | FileBucket file = (FileBucket) obj; 44 | if (file.getFile() != null && file.getFile().getSize() == 0) { 45 | errors.rejectValue("file", "missing.file"); 46 | } 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/persistence/repository/ds1/NewLocationTokenRepository.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.persistence.repository.ds1; 27 | 28 | import org.springframework.data.jpa.repository.JpaRepository; 29 | 30 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.NewLocationToken; 31 | import kyungseo.poc.simple.web.security.persistence.entity.ds1.UserLocation; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | public interface NewLocationTokenRepository extends JpaRepository { 38 | 39 | NewLocationToken findByToken(String token); 40 | 41 | NewLocationToken findByUserLocation(UserLocation userLocation); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/exception/ResourceConflictException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.exception; 24 | 25 | /** 26 | * @author 박경서 (Kyungseo.Park@gmail.com) 27 | * @version 1.0 28 | */ 29 | @SuppressWarnings("serial") 30 | public class ResourceConflictException extends RuntimeException { 31 | 32 | public ResourceConflictException() {} 33 | 34 | public ResourceConflictException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 35 | super(message, cause, enableSuppression, writableStackTrace); 36 | } 37 | 38 | public ResourceConflictException(String message, Throwable cause) { 39 | super(message, cause); 40 | } 41 | 42 | public ResourceConflictException(String message) { 43 | super(message); 44 | } 45 | 46 | public ResourceConflictException(Throwable cause) { 47 | super(cause); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/formatter/LocalDateFormatter.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.formatter; 24 | 25 | import java.time.LocalDate; 26 | import java.time.format.DateTimeFormatter; 27 | import java.util.Locale; 28 | 29 | import org.springframework.format.Formatter; 30 | 31 | import kyungseo.poc.simple.web.appcore.AppConstants; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | public class LocalDateFormatter implements Formatter { 38 | 39 | @Override 40 | public LocalDate parse(String text, Locale locale) { 41 | return LocalDate.parse(text, DateTimeFormatter.ofPattern(AppConstants.DATE_FORMAT)); 42 | } 43 | 44 | @Override 45 | public String print(LocalDate object, Locale locale) { 46 | return DateTimeFormatter.ofPattern(AppConstants.DATE_FORMAT).format(object); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/test/java/kyungseo/poc/simple/web/security/IntegrationSuite.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security; 27 | 28 | import org.junit.platform.suite.api.SelectClasses; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | @SelectClasses({ // @formatter:off 35 | ChangePasswordIntegrationTest.class, 36 | DeviceServiceIntegrationTest.class, 37 | TokenExpirationIntegrationTest.class, 38 | RegistrationControllerIntegrationTest.class, 39 | GetLoggedUsersIntegrationTest.class, 40 | UserServiceIntegrationTest.class, 41 | UserIntegrationTest.class, 42 | SpringSecurityRolesIntegrationTest.class, 43 | LocalizationIntegrationTest.class 44 | })// @formatter:on 45 | public class IntegrationSuite { 46 | // 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/config/AtomikosJtaPlatform.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.config; 24 | 25 | import org.hibernate.engine.transaction.jta.platform.internal.AbstractJtaPlatform; 26 | 27 | import javax.transaction.TransactionManager; 28 | import javax.transaction.UserTransaction; 29 | 30 | /** 31 | * @author 박경서 (Kyungseo.Park@gmail.com) 32 | * @version 1.0 33 | */ 34 | public class AtomikosJtaPlatform extends AbstractJtaPlatform { 35 | 36 | private static final long serialVersionUID = 1L; 37 | 38 | static TransactionManager transactionManager; 39 | static UserTransaction transaction; 40 | 41 | @Override 42 | protected TransactionManager locateTransactionManager() { 43 | return transactionManager; 44 | } 45 | 46 | @Override 47 | protected UserTransaction locateUserTransaction() { 48 | return transaction; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/converter/StringToDateConverter.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.converter; 24 | 25 | import java.text.ParseException; 26 | import java.text.SimpleDateFormat; 27 | import java.util.Date; 28 | 29 | import org.springframework.core.convert.converter.Converter; 30 | 31 | import kyungseo.poc.simple.web.appcore.AppConstants; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | //@Component 38 | public class StringToDateConverter implements Converter { 39 | 40 | @Override 41 | public Date convert(String source) { 42 | SimpleDateFormat format = new SimpleDateFormat(AppConstants.DATE_FORMAT); 43 | try { 44 | return format.parse(source); 45 | } catch (ParseException e) { 46 | e.printStackTrace(); 47 | return null; 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/service/CommonService.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.common.service; 24 | 25 | import org.springframework.stereotype.Service; 26 | 27 | import kyungseo.poc.simple.web.site.common.model.Member; 28 | import kyungseo.poc.simple.web.site.common.persistence.mapper.ds1.CommonMapper; 29 | import lombok.RequiredArgsConstructor; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Service 36 | @RequiredArgsConstructor 37 | public class CommonService { 38 | 39 | private final CommonMapper commonMapper; 40 | 41 | /** 42 | * Get Member info 43 | * @param username 44 | * @return 45 | */ 46 | public Member getUser(final String username) { 47 | return this.commonMapper.getUser(username); 48 | } 49 | 50 | public Member getUserByEmail(final String email) { 51 | return this.commonMapper.getUserByEmail(email); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/dto/request/LogInForm.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.dto.request; 24 | 25 | import javax.validation.Valid; 26 | import javax.validation.constraints.NotBlank; 27 | import javax.validation.constraints.NotNull; 28 | import javax.validation.constraints.Size; 29 | 30 | import lombok.AllArgsConstructor; 31 | import lombok.Getter; 32 | import lombok.NoArgsConstructor; 33 | import lombok.Setter; 34 | 35 | /** 36 | * @author 박경서 (Kyungseo.Park@gmail.com) 37 | * @version 1.0 38 | */ 39 | @Getter 40 | @Setter 41 | @NoArgsConstructor 42 | @AllArgsConstructor 43 | public class LogInForm { 44 | 45 | @NotBlank 46 | @Size(min = 3, max = 60) 47 | private String email; 48 | 49 | @NotBlank 50 | @Size(min = 6, max = 40) 51 | private String password; 52 | 53 | @Valid 54 | @NotNull(message = "Device 정보는 필수 값입니다.") 55 | private DeviceInfo deviceInfo; 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/formatter/LocalDateTimeFormatter.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.formatter; 24 | 25 | import java.time.LocalDateTime; 26 | import java.time.format.DateTimeFormatter; 27 | import java.util.Locale; 28 | 29 | import org.springframework.format.Formatter; 30 | 31 | import kyungseo.poc.simple.web.appcore.AppConstants; 32 | 33 | /** 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | public class LocalDateTimeFormatter implements Formatter { 38 | 39 | @Override 40 | public LocalDateTime parse(String text, Locale locale) { 41 | return LocalDateTime.parse(text, DateTimeFormatter.ofPattern(AppConstants.DATETIME_FORMAT)); 42 | } 43 | 44 | @Override 45 | public String print(LocalDateTime object, Locale locale) { 46 | return DateTimeFormatter.ofPattern(AppConstants.DATETIME_FORMAT).format(object); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/TokenRefreshException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.security.web.error; 24 | 25 | import org.springframework.http.HttpStatus; 26 | 27 | import org.springframework.web.bind.annotation.ResponseStatus; 28 | 29 | import lombok.Getter; 30 | import lombok.Setter; 31 | 32 | /** 33 | * @author 박경서 (Kyungseo.Park@gmail.com) 34 | * @version 1.0 35 | */ 36 | @Getter 37 | @Setter 38 | @ResponseStatus(HttpStatus.EXPECTATION_FAILED) 39 | public class TokenRefreshException extends RuntimeException { 40 | 41 | private static final long serialVersionUID = 1L; 42 | 43 | private final String token; 44 | 45 | private final String message; 46 | 47 | public TokenRefreshException(String token, String message) { 48 | super(String.format("Couldn't refresh token for [%s]: [%s])", token, message)); 49 | this.token = token; 50 | this.message = message; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/UserNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.web.error; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | public final class UserNotFoundException extends RuntimeException { 33 | 34 | private static final long serialVersionUID = 5861310537366287163L; 35 | 36 | public UserNotFoundException() { 37 | super(); 38 | } 39 | 40 | public UserNotFoundException(final String message, final Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | public UserNotFoundException(final String message) { 45 | super(message); 46 | } 47 | 48 | public UserNotFoundException(final Throwable cause) { 49 | super(cause); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/formatter/NameFormatter.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.formatter; 24 | 25 | import java.text.ParseException; 26 | import java.util.Locale; 27 | 28 | import org.apache.commons.lang3.StringUtils; 29 | import org.springframework.format.Formatter; 30 | 31 | /** 32 | * name(문자열)을 포맷, 공백(' ')을 ','로 대체한 값을 반환 33 | * 34 | * @author 박경서 (Kyungseo.Park@gmail.com) 35 | * @version 1.0 36 | */ 37 | public class NameFormatter implements Formatter { 38 | 39 | @Override 40 | public String print(String input, Locale locale) { 41 | return formatName(input, locale); 42 | } 43 | 44 | @Override 45 | public String parse(String input, Locale locale) throws ParseException { 46 | return formatName(input, locale); 47 | } 48 | 49 | private String formatName(String input, Locale locale) { 50 | return StringUtils.replace(input, " ", ","); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/resources/static/vendor/bootstrap3-dialog-1.35.3/examples/play/only-one-dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Only one dialog 12 | 13 | 24 | 25 | 26 |
27 | 28 |
29 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/ReCaptchaInvalidException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.web.error; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | public final class ReCaptchaInvalidException extends RuntimeException { 33 | 34 | private static final long serialVersionUID = 5861310537366287163L; 35 | 36 | public ReCaptchaInvalidException() { 37 | super(); 38 | } 39 | 40 | public ReCaptchaInvalidException(final String message, final Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | public ReCaptchaInvalidException(final String message) { 45 | super(message); 46 | } 47 | 48 | public ReCaptchaInvalidException(final Throwable cause) { 49 | super(cause); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/UserAlreadyExistException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.web.error; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | public final class UserAlreadyExistException extends RuntimeException { 33 | 34 | private static final long serialVersionUID = 5861310537366287163L; 35 | 36 | public UserAlreadyExistException() { 37 | super(); 38 | } 39 | 40 | public UserAlreadyExistException(final String message, final Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | public UserAlreadyExistException(final String message) { 45 | super(message); 46 | } 47 | 48 | public UserAlreadyExistException(final Throwable cause) { 49 | super(cause); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/sample/model/Customer.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.sample.model; 24 | 25 | import javax.validation.constraints.NotEmpty; 26 | 27 | import kyungseo.poc.simple.web.appcore.validation.ValidationMarkers.Create; 28 | import kyungseo.poc.simple.web.appcore.validation.ValidationMarkers.Update; 29 | import lombok.AllArgsConstructor; 30 | import lombok.Builder; 31 | import lombok.Getter; 32 | import lombok.NoArgsConstructor; 33 | import lombok.Setter; 34 | import lombok.ToString; 35 | 36 | /** 37 | * @author 박경서 (Kyungseo.Park@gmail.com) 38 | * @version 1.0 39 | */ 40 | @Getter 41 | @Setter 42 | @Builder 43 | @NoArgsConstructor 44 | @AllArgsConstructor 45 | @ToString 46 | public class Customer { 47 | 48 | @NotEmpty 49 | private Integer customerId; 50 | 51 | @NotEmpty(groups = {Create.class, Update.class}, message = "${valid.msg.not-empty}") 52 | private String customerName; 53 | 54 | private String company; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/InvalidOldPasswordException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.web.error; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | public final class InvalidOldPasswordException extends RuntimeException { 33 | 34 | private static final long serialVersionUID = 5861310537366287163L; 35 | 36 | public InvalidOldPasswordException() { 37 | super(); 38 | } 39 | 40 | public InvalidOldPasswordException(final String message, final Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | public InvalidOldPasswordException(final String message) { 45 | super(message); 46 | } 47 | 48 | public InvalidOldPasswordException(final Throwable cause) { 49 | super(cause); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/sample/persistence/entity/ds1/Customer.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.sample.persistence.entity.ds1; 24 | 25 | import javax.persistence.Column; 26 | import javax.persistence.Entity; 27 | import javax.persistence.GeneratedValue; 28 | import javax.persistence.GenerationType; 29 | import javax.persistence.Id; 30 | 31 | import lombok.AllArgsConstructor; 32 | import lombok.Builder; 33 | import lombok.Getter; 34 | import lombok.NoArgsConstructor; 35 | import lombok.ToString; 36 | 37 | /** 38 | * @author 박경서 (Kyungseo.Park@gmail.com) 39 | * @version 1.0 40 | */ 41 | @Entity 42 | @Getter 43 | @Builder 44 | @NoArgsConstructor 45 | @AllArgsConstructor 46 | @ToString 47 | public class Customer { 48 | 49 | @Id 50 | @Column(unique = true, nullable = false) 51 | @GeneratedValue(strategy = GenerationType.AUTO) 52 | private Integer customerId; 53 | 54 | private String customerName; 55 | 56 | private String company; 57 | 58 | } 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Java ======================================================================== 3 | 4 | # Compiled class file 5 | *.class 6 | 7 | # Log file 8 | *.log 9 | *.log.gz 10 | 11 | # BlueJ files 12 | *.ctxt 13 | 14 | # Mobile Tools for Java (J2ME) 15 | .mtj.tmp/ 16 | 17 | # Package Files # 18 | *.jar 19 | *.war 20 | *.nar 21 | *.ear 22 | *.zip 23 | *.tar.gz 24 | *.rar 25 | 26 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 27 | hs_err_pid* 28 | replay_pid* 29 | 30 | # SVN 31 | .svn/ 32 | 33 | # Eclipse ===================================================================== 34 | 35 | .metadata 36 | bin/ 37 | tmp/ 38 | logs/ 39 | target/ 40 | *.tmp 41 | *.bak 42 | *.swp 43 | *~.nib 44 | local.properties 45 | .settings/ 46 | .loadpath 47 | .recommenders 48 | 49 | # sbteclipse plugin 50 | .target 51 | 52 | # STS (Spring Tool Suite) 53 | .springBeans 54 | 55 | # Annotation Processing 56 | .apt_generated/ 57 | .apt_generated_test/ 58 | 59 | # Scala IDE specific (Scala & Java development for Eclipse) 60 | .cache-main 61 | .scala_dependencies 62 | .worksheet 63 | 64 | # 65 | .project 66 | .classpath 67 | .factorypath 68 | 69 | # Windows ===================================================================== 70 | 71 | # Windows thumbnail cache files 72 | Thumbs.db 73 | 74 | # Folder config file 75 | [Dd]esktop.ini 76 | 77 | # Windows Installer files 78 | *.cab 79 | *.msi 80 | *.msix 81 | *.msm 82 | *.msp 83 | 84 | # Windows shortcuts 85 | *.lnk 86 | 87 | # macOS ===================================================================== 88 | 89 | # General 90 | .DS_Store 91 | .AppleDouble 92 | .LSOverride 93 | 94 | # Icon must end with two \r 95 | Icon 96 | 97 | # Thumbnails 98 | ._* 99 | 100 | # Files that might appear in the root of a volume 101 | .DocumentRevisions-V100 102 | .fseventsd 103 | .Spotlight-V100 104 | .TemporaryItems 105 | .Trashes 106 | .VolumeIcon.icns 107 | .com.apple.timemachine.donotpresent 108 | 109 | # Directories potentially created on remote AFP share 110 | .AppleDB 111 | .AppleDesktop 112 | Network Trash Folder 113 | Temporary Items 114 | .apdisk 115 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/dto/Mail.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.dto; 24 | 25 | import javax.validation.constraints.NotBlank; 26 | import javax.validation.constraints.Pattern; 27 | 28 | import lombok.AllArgsConstructor; 29 | import lombok.Builder; 30 | import lombok.Getter; 31 | import lombok.NoArgsConstructor; 32 | import lombok.Setter; 33 | import lombok.ToString; 34 | 35 | /** 36 | * @author 박경서 (Kyungseo.Park@gmail.com) 37 | * @version 1.0 38 | */ 39 | @Getter 40 | @Setter 41 | @NoArgsConstructor 42 | @AllArgsConstructor 43 | @ToString 44 | @Builder 45 | public class Mail { 46 | 47 | @Pattern(regexp = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$", message = "이메일 형식이 잘못되었습니다.") 48 | private String to; 49 | 50 | @NotBlank(message = "제목은 필수입니다.") 51 | private String title; 52 | 53 | @NotBlank(message = "본문은 필수입니다.") 54 | private String content; 55 | 56 | private String msgId; 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/security/web/error/ReCaptchaUnavailableException.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Original Code: https://github.com/Baeldung/spring-security-registration 7 | * @author Baeldung, modified by Kyungseo Park 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * ============================================================================ 21 | * Author Date Description 22 | * -------- ---------- ------------------------------------------------- 23 | * Kyungseo 2023-03-02 initial version 24 | * ========================================================================= */ 25 | 26 | package kyungseo.poc.simple.web.security.web.error; 27 | 28 | /** 29 | * @author 박경서 (Kyungseo.Park@gmail.com) 30 | * @version 1.0 31 | */ 32 | public final class ReCaptchaUnavailableException extends RuntimeException { 33 | 34 | private static final long serialVersionUID = 5861310537366287163L; 35 | 36 | public ReCaptchaUnavailableException() { 37 | super(); 38 | } 39 | 40 | public ReCaptchaUnavailableException(final String message, final Throwable cause) { 41 | super(message, cause); 42 | } 43 | 44 | public ReCaptchaUnavailableException(final String message) { 45 | super(message); 46 | } 47 | 48 | public ReCaptchaUnavailableException(final Throwable cause) { 49 | super(cause); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/site/common/persistence/mapper/ds1/CommonMapper.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.site.common.persistence.mapper.ds1; 24 | 25 | import org.apache.ibatis.annotations.Mapper; 26 | import org.apache.ibatis.annotations.Param; 27 | import org.apache.ibatis.annotations.Select; 28 | 29 | import kyungseo.poc.simple.web.site.common.model.Member; 30 | 31 | /** 32 | * @author 박경서 (Kyungseo.Park@gmail.com) 33 | * @version 1.0 34 | */ 35 | @Mapper 36 | public interface CommonMapper { 37 | 38 | //Spring Security는 내부적으로 사용자의 아이디만 데이터베이스에서 조회를 한 뒤에 39 | // 가져온 값에서 비밀번호(password) 값을 추출하여 데이터베이스 결과와 매핑하도록 구현되어 있다. 40 | // 따라서 사용자 비밀번호를 데이터베이스에서 조회하는 코드는 작성해서는 안된다. 41 | @Select("SELECT username, password, role FROM USERS WHERE username = #{username}") 42 | Member getUser(@Param("username") String username); 43 | 44 | @Select("SELECT username, password, role FROM USERS WHERE email = #{email}") 45 | Member getUserByEmail(@Param("email") String email); 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/resources/messages/messages-site_ko_KR.properties: -------------------------------------------------------------------------------- 1 | # Page view \ubcc4\ub85c \uc139\uc158 \uad6c\ubd84\ud558\uc5ec \uc791\uc131\ud560 \uac83! 2 | 3 | # -------------------------------------------------- 4 | # '/view/admin/usermgmt'\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 properties 5 | # -------------------------------------------------- 6 | 7 | # Page Title 8 | admin.usermgmt.page.users.title=\uc0ac\uc6a9\uc790 \uad00\ub9ac 9 | admin.usermgmt.page.swagger.title=KYUNGSEO.PoC - API 10 | 11 | # lables 12 | admin.usermgmt.lbl.info=\uc0ac\uc6a9\uc790 \uc815\ubcf4 13 | admin.usermgmt.lbl.id=ID 14 | admin.usermgmt.lbl.membername=\uc131\uba85 15 | admin.usermgmt.lbl.email=\uc774\uba54\uc77c 16 | admin.usermgmt.lbl.password=\ube44\ubc00\ubc88\ud638 17 | admin.usermgmt.lbl.age=\ub098\uc774 18 | admin.usermgmt.lbl.birthdate=\uc0dd\ub144\uc6d4\uc77c 19 | admin.usermgmt.lbl.phoneNumber=\ud734\ub300\ud3f0 20 | admin.usermgmt.lbl.country=\uad6d\uac00 21 | admin.usermgmt.lbl.enabled=\uc0ac\uc6a9\uc5ec\ubd80 22 | admin.usermgmt.lbl.isUsing2FA=2FA 23 | admin.usermgmt.lbl.secret=\ube44\ubc00\ud0a4 24 | admin.usermgmt.lbl.regDate=\ub4f1\ub85d\uc77c 25 | admin.usermgmt.lbl.modDate=\uc218\uc815\uc77c 26 | admin.usermgmt.lbl.roles=\ubcf4\uc720\uc5ed\ud560 27 | admin.usermgmt.lbl.action=\uc218\uc815/\uc0ad\uc81c 28 | 29 | admin.usermgmt.lbl.btn.read=\uc815\ubcf4 \ubcf4\uae30 30 | admin.usermgmt.lbl.btn.edit=\uc815\ubcf4 \uc218\uc815 31 | admin.usermgmt.lbl.btn.editRole=\uc5ed\ud560 \uc218\uc815 32 | admin.usermgmt.lbl.btn.delete=\uc0ac\uc6a9\uc790 \uc0ad\uc81c 33 | 34 | # messages 35 | admin.usermgmt.msg.reg.succ=\ub4f1\ub85d\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4. 36 | admin.usermgmt.msg.reg.fail=\ub4f1\ub85d\uc774 \uc2e4\ud328\ud558\uc600\uc2b5\ub2c8\ub2e4. 37 | 38 | # validation 39 | admin.usermgmt.vld.password.notnull=\ube44\ubc00\ubc88\ud638\ub294 \ud544\uc218 \uac12 40 | admin.usermgmt.vld.password.notempty=\ube44\ubc00\ubc88\ud638\ub294 \ud544\uc218 \uac12 41 | admin.usermgmt.vld.password.matches=\ube44\ubc00\ubc88\ud638 \ubd88\uc77c\uce58! 42 | 43 | # -------------------------------------------------- 44 | # '/view/admin/xxxx'\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 properties 45 | # -------------------------------------------------- 46 | -------------------------------------------------------------------------------- /src/main/java/kyungseo/poc/simple/web/appcore/util/MessageSourceUtil.java: -------------------------------------------------------------------------------- 1 | /* ============================================================================ 2 | * [ Development Templates based on Spring Boot ] 3 | * ---------------------------------------------------------------------------- 4 | * Copyright 2023 Kyungseo Park 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * ============================================================================ 18 | * Author Date Description 19 | * -------- ---------- ------------------------------------------------- 20 | * Kyungseo 2023-03-02 initial version 21 | * ========================================================================= */ 22 | 23 | package kyungseo.poc.simple.web.appcore.util; 24 | 25 | import java.util.Locale; 26 | 27 | import org.springframework.context.MessageSource; 28 | import org.springframework.context.i18n.LocaleContextHolder; 29 | import org.springframework.lang.Nullable; 30 | import org.springframework.stereotype.Component; 31 | 32 | import lombok.RequiredArgsConstructor; 33 | 34 | /** 35 | * @author 박경서 (Kyungseo.Park@gmail.com) 36 | * @version 1.0 37 | */ 38 | @Component 39 | @RequiredArgsConstructor 40 | public class MessageSourceUtil { 41 | 42 | private final MessageSource messageSource; 43 | 44 | public String getMessage(final String code, @Nullable final Object... args) { 45 | return this.getMessage(code, LocaleContextHolder.getLocale(), args); 46 | } 47 | 48 | public String getMessage(final String code, final Locale locale, @Nullable final Object... args) { 49 | return this.messageSource.getMessage(code, args, locale); 50 | } 51 | 52 | } 53 | --------------------------------------------------------------------------------