├── .idea
├── .name
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── modules.xml
├── artifacts
│ ├── Unmentionable_war.xml
│ └── Unmentionable_war_exploded.xml
├── typescript-compiler.xml
├── libraries
│ ├── Maven__junit_junit_4_12.xml
│ ├── Maven__antlr_antlr_2_7_7.xml
│ ├── Maven__dom4j_dom4j_1_6_1.xml
│ ├── Maven__javax_servlet_jstl_1_2.xml
│ ├── Maven__org_hsqldb_hsqldb_2_3_3.xml
│ ├── Maven__org_yaml_snakeyaml_1_16.xml
│ ├── Maven__com_google_guava_guava_18_0.xml
│ ├── Maven__xml_apis_xml_apis_1_0_b2.xml
│ ├── Maven__org_objenesis_objenesis_2_1.xml
│ ├── Maven__aopalliance_aopalliance_1_0.xml
│ ├── Maven__org_slf4j_slf4j_api_1_7_13.xml
│ ├── Maven__com_fasterxml_classmate_1_1_0.xml
│ ├── Maven__net_minidev_json_smart_1_1_1.xml
│ ├── Maven__com_sun_mail_javax_mail_1_5_4.xml
│ ├── Maven__commons_lang_commons_lang_2_6.xml
│ ├── Maven__org_jboss_jandex_1_1_0_Final.xml
│ ├── Maven__javax_activation_activation_1_1.xml
│ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml
│ ├── Maven__commons_codec_commons_codec_1_6.xml
│ ├── Maven__org_slf4j_jul_to_slf4j_1_7_13.xml
│ ├── Maven__org_aspectj_aspectjweaver_1_8_7.xml
│ ├── Maven__ch_qos_logback_logback_core_1_1_3.xml
│ ├── Maven__com_jayway_jsonpath_json_path_0_8_1.xml
│ ├── Maven__org_mockito_mockito_core_1_10_19.xml
│ ├── Maven__org_slf4j_jcl_over_slf4j_1_7_13.xml
│ ├── Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml
│ ├── Maven__org_hamcrest_hamcrest_library_1_3.xml
│ ├── Maven__org_javassist_javassist_3_18_1_GA.xml
│ ├── Maven__org_apache_tomcat_tomcat_jdbc_8_0_30.xml
│ ├── Maven__org_apache_tomcat_tomcat_juli_8_0_30.xml
│ ├── Maven__org_slf4j_log4j_over_slf4j_1_7_13.xml
│ ├── Maven__org_bouncycastle_bcpkix_jdk15on_1_47.xml
│ ├── Maven__org_bouncycastle_bcprov_jdk15on_1_47.xml
│ ├── Maven__ch_qos_logback_logback_classic_1_1_3.xml
│ ├── Maven__mysql_mysql_connector_java_5_1_38.xml
│ ├── Maven__com_jayway_jsonpath_json_path_assert_0_8_1.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_6_4.xml
│ ├── Maven__org_hibernate_hibernate_core_4_3_11_Final.xml
│ ├── Maven__org_springframework_spring_tx_4_2_4_RELEASE.xml
│ ├── Maven__javax_transaction_javax_transaction_api_1_2.xml
│ ├── Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml
│ ├── Maven__org_jboss_logging_jboss_logging_3_3_0_Final.xml
│ ├── Maven__javax_validation_validation_api_1_1_0_Final.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_8_0_30.xml
│ ├── Maven__org_springframework_spring_aop_4_2_4_RELEASE.xml
│ ├── Maven__org_springframework_spring_orm_4_2_4_RELEASE.xml
│ ├── Maven__org_springframework_spring_web_4_2_4_RELEASE.xml
│ ├── Maven__org_springframework_spring_core_4_2_4_RELEASE.xml
│ ├── Maven__org_springframework_spring_jdbc_4_2_4_RELEASE.xml
│ ├── Maven__org_springframework_spring_test_4_2_4_RELEASE.xml
│ ├── Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_6_4.xml
│ ├── Maven__org_springframework_spring_beans_4_2_4_RELEASE.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_8_0_30.xml
│ ├── Maven__org_springframework_spring_webmvc_4_2_4_RELEASE.xml
│ ├── Maven__org_hibernate_hibernate_validator_5_2_2_Final.xml
│ ├── Maven__org_springframework_boot_spring_boot_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_spring_aspects_4_2_4_RELEASE.xml
│ ├── Maven__org_springframework_spring_context_4_2_4_RELEASE.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_jasper_8_0_30.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_4.xml
│ ├── Maven__org_springframework_spring_expression_4_2_4_RELEASE.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_0_30.xml
│ ├── Maven__org_hibernate_hibernate_entitymanager_4_3_11_Final.xml
│ ├── Maven__org_springframework_data_spring_data_jpa_1_9_2_RELEASE.xml
│ ├── Maven__org_apache_tomcat_embed_tomcat_embed_logging_juli_8_0_30.xml
│ ├── Maven__org_jboss_logging_jboss_logging_annotations_1_2_0_Beta1.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_spring_context_support_4_2_4_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_actuator_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_data_spring_data_commons_1_11_2_RELEASE.xml
│ ├── Maven__org_springframework_security_spring_security_jwt_1_0_3_RELEASE.xml
│ ├── Maven__org_springframework_security_spring_security_web_4_0_3_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_aop_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_web_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_security_spring_security_core_4_0_3_RELEASE.xml
│ ├── Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_0_Final.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_jdbc_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_mail_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_test_1_3_1_RELEASE.xml
│ ├── Maven__org_hibernate_common_hibernate_commons_annotations_4_0_5_Final.xml
│ ├── Maven__org_springframework_security_spring_security_config_4_0_3_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_logging_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_actuator_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_data_jpa_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_boot_spring_boot_starter_security_1_3_1_RELEASE.xml
│ ├── Maven__org_springframework_security_oauth_spring_security_oauth2_2_0_8_RELEASE.xml
│ └── Maven__org_springframework_boot_spring_boot_starter_validation_1_3_1_RELEASE.xml
├── misc.xml
├── compiler.xml
└── uiDesigner.xml
├── .DS_Store
├── src
├── .DS_Store
├── main
│ ├── .DS_Store
│ ├── java
│ │ ├── .DS_Store
│ │ └── Unmentionable
│ │ │ ├── .DS_Store
│ │ │ ├── model
│ │ │ ├── .DS_Store
│ │ │ ├── Role.java
│ │ │ ├── Group.java
│ │ │ └── Account.java
│ │ │ ├── settings
│ │ │ ├── .DS_Store
│ │ │ ├── errors
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── InvalidRequestException.java
│ │ │ │ ├── FieldErrorResource.java
│ │ │ │ ├── ErrorResource.java
│ │ │ │ └── MyExceptionHandler.java
│ │ │ ├── security
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── WebSecurityConfiguration.java
│ │ │ │ ├── AccountAuthenticatoinProvider.java
│ │ │ │ ├── CustomUserDetailsService.java
│ │ │ │ └── OAuth2ServerConfiguration.java
│ │ │ ├── exceptions
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── ExceptionAttributes.java
│ │ │ │ └── DefaultExceptionAttributes.java
│ │ │ ├── validators
│ │ │ │ ├── .DS_Store
│ │ │ │ ├── UniqueUsername.java
│ │ │ │ └── UniqueUsernameValidator.java
│ │ │ ├── configuration
│ │ │ │ ├── WebInitializer.java
│ │ │ │ └── CorsFilterRequest.java
│ │ │ └── email
│ │ │ │ └── SmtpMailSender.java
│ │ │ ├── repository
│ │ │ ├── .DS_Store
│ │ │ ├── GroupRepository.java
│ │ │ ├── RoleRepository.java
│ │ │ └── AccountRepository.java
│ │ │ ├── service
│ │ │ ├── RoleService.java
│ │ │ ├── AccountService.java
│ │ │ ├── RoleServiceBean.java
│ │ │ └── AccountServiceBean.java
│ │ │ ├── controller
│ │ │ ├── StarterController.java
│ │ │ ├── BaseController.java
│ │ │ └── AuthenticationController.java
│ │ │ └── Application.java
│ ├── webapp
│ │ ├── .DS_Store
│ │ └── WEB-INF
│ │ │ ├── .DS_Store
│ │ │ └── jsp
│ │ │ └── index.jsp
│ └── resources
│ │ ├── .DS_Store
│ │ ├── config
│ │ ├── .DS_Store
│ │ └── application.properties
│ │ └── data
│ │ ├── .DS_Store
│ │ └── hsqldb
│ │ ├── data.sql
│ │ └── schema.sql
└── test
│ ├── .DS_Store
│ └── java
│ ├── .DS_Store
│ └── Unmentionable
│ ├── .DS_Store
│ ├── AbstractTest.java
│ ├── AbstractControllerTest.java
│ ├── controller
│ └── AuthenticationControllerTest.java
│ └── service
│ └── AccountServiceTest.java
├── target
├── .DS_Store
├── classes
│ ├── Unmentionable
│ │ ├── model
│ │ │ ├── Role.class
│ │ │ ├── Group.class
│ │ │ └── Account.class
│ │ ├── Application.class
│ │ ├── service
│ │ │ ├── RoleService.class
│ │ │ ├── AccountService.class
│ │ │ ├── RoleServiceBean.class
│ │ │ └── AccountServiceBean.class
│ │ ├── controller
│ │ │ ├── BaseController.class
│ │ │ ├── StarterController.class
│ │ │ └── AuthenticationController.class
│ │ ├── repository
│ │ │ ├── RoleRepository.class
│ │ │ ├── GroupRepository.class
│ │ │ └── AccountRepository.class
│ │ └── settings
│ │ │ ├── email
│ │ │ └── SmtpMailSender.class
│ │ │ ├── errors
│ │ │ ├── ErrorResource.class
│ │ │ ├── FieldErrorResource.class
│ │ │ ├── MyExceptionHandler.class
│ │ │ └── InvalidRequestException.class
│ │ │ ├── validators
│ │ │ ├── UniqueUsername.class
│ │ │ └── UniqueUsernameValidator.class
│ │ │ ├── configuration
│ │ │ ├── WebInitializer.class
│ │ │ └── CorsFilterRequest.class
│ │ │ ├── exceptions
│ │ │ ├── ExceptionAttributes.class
│ │ │ └── DefaultExceptionAttributes.class
│ │ │ └── security
│ │ │ ├── CustomUserDetailsService.class
│ │ │ ├── WebSecurityConfiguration.class
│ │ │ ├── OAuth2ServerConfiguration.class
│ │ │ ├── AccountAuthenticatoinProvider.class
│ │ │ ├── CustomUserDetailsService$UserRepositoryUserDetails.class
│ │ │ ├── OAuth2ServerConfiguration$ResourceServerConfiguration.class
│ │ │ └── OAuth2ServerConfiguration$AuthorizationServerConfiguration.class
│ ├── config
│ │ └── application.properties
│ └── data
│ │ └── hsqldb
│ │ ├── data.sql
│ │ └── schema.sql
├── test-classes
│ └── Unmentionable
│ │ ├── AbstractTest.class
│ │ ├── AbstractControllerTest.class
│ │ ├── service
│ │ └── AccountServiceTest.class
│ │ └── controller
│ │ └── AuthenticationControllerTest.class
└── maven-status
│ └── maven-compiler-plugin
│ ├── testCompile
│ └── default-testCompile
│ │ ├── createdFiles.lst
│ │ └── inputFiles.lst
│ └── compile
│ └── default-compile
│ ├── createdFiles.lst
│ └── inputFiles.lst
├── tsconfig.json
├── README.md
├── pom.xml
└── Databese.sql
/.idea/.name:
--------------------------------------------------------------------------------
1 | Unmentionable
--------------------------------------------------------------------------------
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/.DS_Store
--------------------------------------------------------------------------------
/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/.DS_Store
--------------------------------------------------------------------------------
/target/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/.DS_Store
--------------------------------------------------------------------------------
/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/.DS_Store
--------------------------------------------------------------------------------
/src/test/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/test/.DS_Store
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/main/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/.DS_Store
--------------------------------------------------------------------------------
/src/main/webapp/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/webapp/.DS_Store
--------------------------------------------------------------------------------
/src/test/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/test/java/.DS_Store
--------------------------------------------------------------------------------
/src/main/resources/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/resources/.DS_Store
--------------------------------------------------------------------------------
/src/main/resources/config/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/resources/config/.DS_Store
--------------------------------------------------------------------------------
/src/main/resources/data/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/resources/data/.DS_Store
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/webapp/WEB-INF/.DS_Store
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/.DS_Store
--------------------------------------------------------------------------------
/src/test/java/Unmentionable/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/test/java/Unmentionable/.DS_Store
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/model/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/model/.DS_Store
--------------------------------------------------------------------------------
/target/classes/Unmentionable/model/Role.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/model/Role.class
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/settings/.DS_Store
--------------------------------------------------------------------------------
/target/classes/Unmentionable/Application.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/Application.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/model/Group.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/model/Group.class
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/repository/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/repository/.DS_Store
--------------------------------------------------------------------------------
/target/classes/Unmentionable/model/Account.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/model/Account.class
--------------------------------------------------------------------------------
/target/test-classes/Unmentionable/AbstractTest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/test-classes/Unmentionable/AbstractTest.class
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/errors/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/settings/errors/.DS_Store
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/security/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/settings/security/.DS_Store
--------------------------------------------------------------------------------
/target/classes/Unmentionable/service/RoleService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/service/RoleService.class
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/exceptions/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/settings/exceptions/.DS_Store
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/validators/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/src/main/java/Unmentionable/settings/validators/.DS_Store
--------------------------------------------------------------------------------
/target/classes/Unmentionable/service/AccountService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/service/AccountService.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/controller/BaseController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/controller/BaseController.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/repository/RoleRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/repository/RoleRepository.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/service/RoleServiceBean.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/service/RoleServiceBean.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/repository/GroupRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/repository/GroupRepository.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/service/AccountServiceBean.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/service/AccountServiceBean.class
--------------------------------------------------------------------------------
/target/test-classes/Unmentionable/AbstractControllerTest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/test-classes/Unmentionable/AbstractControllerTest.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/controller/StarterController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/controller/StarterController.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/repository/AccountRepository.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/repository/AccountRepository.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/email/SmtpMailSender.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/email/SmtpMailSender.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/errors/ErrorResource.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/errors/ErrorResource.class
--------------------------------------------------------------------------------
/target/test-classes/Unmentionable/service/AccountServiceTest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/test-classes/Unmentionable/service/AccountServiceTest.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/controller/AuthenticationController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/controller/AuthenticationController.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/errors/FieldErrorResource.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/errors/FieldErrorResource.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/errors/MyExceptionHandler.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/errors/MyExceptionHandler.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/validators/UniqueUsername.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/validators/UniqueUsername.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/configuration/WebInitializer.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/configuration/WebInitializer.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/configuration/CorsFilterRequest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/configuration/CorsFilterRequest.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/errors/InvalidRequestException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/errors/InvalidRequestException.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/exceptions/ExceptionAttributes.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/exceptions/ExceptionAttributes.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/security/CustomUserDetailsService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/security/CustomUserDetailsService.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/security/WebSecurityConfiguration.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/security/WebSecurityConfiguration.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/security/OAuth2ServerConfiguration.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/security/OAuth2ServerConfiguration.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/validators/UniqueUsernameValidator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/validators/UniqueUsernameValidator.class
--------------------------------------------------------------------------------
/target/test-classes/Unmentionable/controller/AuthenticationControllerTest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/test-classes/Unmentionable/controller/AuthenticationControllerTest.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/exceptions/DefaultExceptionAttributes.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/exceptions/DefaultExceptionAttributes.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/security/AccountAuthenticatoinProvider.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/security/AccountAuthenticatoinProvider.class
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/security/CustomUserDetailsService$UserRepositoryUserDetails.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/security/CustomUserDetailsService$UserRepositoryUserDetails.class
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/security/OAuth2ServerConfiguration$ResourceServerConfiguration.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/security/OAuth2ServerConfiguration$ResourceServerConfiguration.class
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst:
--------------------------------------------------------------------------------
1 | Unmentionable/AbstractTest.class
2 | Unmentionable/controller/AuthenticationControllerTest.class
3 | Unmentionable/AbstractControllerTest.class
4 | Unmentionable/service/AccountServiceTest.class
5 |
--------------------------------------------------------------------------------
/target/classes/Unmentionable/settings/security/OAuth2ServerConfiguration$AuthorizationServerConfiguration.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/calamus0427/Spring-Boot-OAuth2-JWT-MySQL/master/target/classes/Unmentionable/settings/security/OAuth2ServerConfiguration$AuthorizationServerConfiguration.class
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/service/RoleService.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.service;
2 |
3 | import Unmentionable.model.Role;
4 |
5 | /**
6 | * Created by christospapidas on 25012016--.
7 | */
8 | public interface RoleService {
9 |
10 | Role findById(Long id);
11 |
12 | Role findByCode(String code);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/.idea/artifacts/Unmentionable_war.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $PROJECT_DIR$/target
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "system",
5 | "moduleResolution": "node",
6 | "sourceMap": true,
7 | "emitDecoratorMetadata": true,
8 | "experimentalDecorators": true,
9 | "removeComments": false,
10 | "noImplicitAny": false
11 | },
12 | "exclude": [
13 | "node_modules"
14 | ]
15 | }
--------------------------------------------------------------------------------
/.idea/typescript-compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/service/AccountService.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.service;
2 |
3 | import Unmentionable.model.Account;
4 |
5 | import java.util.Collection;
6 |
7 | /**
8 | * Created by christospapidas on 24012016--.
9 | */
10 | public interface AccountService {
11 |
12 | Collection findAll();
13 |
14 | Account findByUsername(String userename);
15 |
16 | Account createNewAccount(Account account);
17 |
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/repository/GroupRepository.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.repository;
2 |
3 | import Unmentionable.model.Group;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.stereotype.Repository;
6 |
7 | /**
8 | * Gives to JPA the ability to communicate with database
9 | */
10 | @Repository
11 | public interface GroupRepository extends JpaRepository{
12 | // Todo add the custom search query
13 | }
14 |
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst:
--------------------------------------------------------------------------------
1 | /Users/christospapidas/Projects/Java/Unmentionable/src/test/java/Unmentionable/service/AccountServiceTest.java
2 | /Users/christospapidas/Projects/Java/Unmentionable/src/test/java/Unmentionable/AbstractTest.java
3 | /Users/christospapidas/Projects/Java/Unmentionable/src/test/java/Unmentionable/controller/AuthenticationControllerTest.java
4 | /Users/christospapidas/Projects/Java/Unmentionable/src/test/java/Unmentionable/AbstractControllerTest.java
5 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__junit_junit_4_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__antlr_antlr_2_7_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__dom4j_dom4j_1_6_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hsqldb_hsqldb_2_3_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/controller/StarterController.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.controller;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 | import org.springframework.web.bind.annotation.RequestMethod;
6 |
7 | /**
8 | * Starter controller loads the index.jsp
9 | * to start the application correctly
10 | */
11 | @Controller
12 | public class StarterController {
13 |
14 | @RequestMapping("/")
15 | public String loadIndex(){
16 | return "index";
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/configuration/WebInitializer.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.configuration;
2 |
3 | import Unmentionable.Application;
4 | import org.springframework.boot.builder.SpringApplicationBuilder;
5 | import org.springframework.boot.context.web.SpringBootServletInitializer;
6 |
7 | public class WebInitializer extends SpringBootServletInitializer {
8 |
9 | @Override
10 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
11 | return application.sources(Application.class);
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
4 | <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
5 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Hell Unmentionable
15 | Hello
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_yaml_snakeyaml_1_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_guava_guava_18_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__xml_apis_xml_apis_1_0_b2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_objenesis_objenesis_2_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_classmate_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_minidev_json_smart_1_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_sun_mail_javax_mail_1_5_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_jboss_jandex_1_1_0_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__javax_activation_activation_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_codec_commons_codec_1_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_8_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_jayway_jsonpath_json_path_0_8_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_mockito_mockito_core_1_10_19.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_eclipse_jdt_core_compiler_ecj_4_4_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_javassist_javassist_3_18_1_GA.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/test/java/Unmentionable/AbstractTest.java:
--------------------------------------------------------------------------------
1 | package Unmentionable;
2 |
3 | import org.junit.runner.RunWith;
4 | import org.slf4j.Logger;
5 | import org.slf4j.LoggerFactory;
6 | import org.springframework.boot.test.SpringApplicationConfiguration;
7 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
8 |
9 | /**
10 | * An abstract class to run the test throw JUnit
11 | */
12 | @RunWith(SpringJUnit4ClassRunner.class)
13 | @SpringApplicationConfiguration(classes=Application.class)
14 | public abstract class AbstractTest {
15 |
16 | protected Logger logger = LoggerFactory.getLogger(this.getClass());
17 |
18 |
19 | }
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_tomcat_jdbc_8_0_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_tomcat_juli_8_0_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_log4j_over_slf4j_1_7_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_47.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_47.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_38.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/repository/RoleRepository.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.repository;
2 |
3 | import Unmentionable.model.Account;
4 | import Unmentionable.model.Role;
5 | import org.springframework.data.jpa.repository.JpaRepository;
6 | import org.springframework.data.jpa.repository.Query;
7 | import org.springframework.data.repository.query.Param;
8 | import org.springframework.stereotype.Repository;
9 |
10 | /**
11 | *
12 | */
13 | @Repository
14 | public interface RoleRepository extends JpaRepository {
15 |
16 | @Query("SELECT a FROM Role a WHERE a.code = :code")
17 | Role findByCode(@Param("code") String code);
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_jayway_jsonpath_json_path_assert_0_8_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_6_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_hibernate_core_4_3_11_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_tx_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__javax_transaction_javax_transaction_api_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_0_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__javax_validation_validation_api_1_1_0_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_8_0_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_aop_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_orm_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_web_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_core_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_jdbc_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_test_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_6_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_beans_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_8_0_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_webmvc_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_hibernate_validator_5_2_2_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_aspects_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_context_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_jasper_8_0_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_expression_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_0_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_hibernate_entitymanager_4_3_11_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_data_spring_data_jpa_1_9_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_logging_juli_8_0_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/validators/UniqueUsername.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.validators;
2 |
3 | import javax.validation.Constraint;
4 | import javax.validation.Payload;
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.Target;
7 |
8 | import static java.lang.annotation.ElementType.FIELD;
9 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
10 |
11 | /**
12 | * Annotation that check the uniqueness of username
13 | */
14 | @Target({ FIELD })
15 | @Retention(RUNTIME)
16 | @Constraint(validatedBy = { UniqueUsernameValidator.class })
17 | public @interface UniqueUsername {
18 |
19 | String message();
20 |
21 | Class>[] groups() default { };
22 |
23 | Class extends Payload>[] payload() default { };
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_jboss_logging_jboss_logging_annotations_1_2_0_Beta1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_spring_context_support_4_2_4_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/errors/InvalidRequestException.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.errors;
2 |
3 | import org.springframework.validation.Errors;
4 |
5 | /**
6 | * This is an exception that let us return a json with
7 | * all the validations errors
8 | */
9 | public class InvalidRequestException extends RuntimeException {
10 |
11 | private Errors errors;
12 |
13 | /**
14 | * Contructor that get the message and the errors object
15 | * @param message - a custom message as string
16 | * @param errors - the Errors that we have
17 | */
18 | public InvalidRequestException(String message, Errors errors) {
19 | super(message);
20 | this.errors = errors;
21 | }
22 |
23 | public Errors getErrors() { return errors; }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_data_spring_data_commons_1_11_2_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_jwt_1_0_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_web_4_0_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_core_4_0_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_0_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_mail_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hibernate_common_hibernate_commons_annotations_4_0_5_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_spring_security_config_4_0_3_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_actuator_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_jpa_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_security_oauth_spring_security_oauth2_2_0_8_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_validation_1_3_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/errors/FieldErrorResource.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.errors;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | /**
6 | * Get the field resources
7 | */
8 | @JsonIgnoreProperties(ignoreUnknown = true)
9 | public class FieldErrorResource {
10 | private String resource;
11 | private String field;
12 | private String code;
13 | private String message;
14 |
15 | public String getResource() { return resource; }
16 |
17 | public void setResource(String resource) { this.resource = resource; }
18 |
19 | public String getField() { return field; }
20 |
21 | public void setField(String field) { this.field = field; }
22 |
23 | public String getCode() { return code; }
24 |
25 | public void setCode(String code) { this.code = code; }
26 |
27 | public String getMessage() { return message; }
28 |
29 | public void setMessage(String message) { this.message = message; }
30 | }
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/validators/UniqueUsernameValidator.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.validators;
2 |
3 | import Unmentionable.repository.AccountRepository;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 |
6 | import javax.validation.ConstraintValidator;
7 | import javax.validation.ConstraintValidatorContext;
8 |
9 | /**
10 | * Validator of unique username
11 | */
12 | public class UniqueUsernameValidator implements ConstraintValidator {
13 |
14 | @Autowired
15 | private AccountRepository accountRepository;
16 |
17 | @Override
18 | public void initialize(UniqueUsername constraintAnnotation) {
19 |
20 | }
21 |
22 | @Override
23 | public boolean isValid(String username, ConstraintValidatorContext context) {
24 | // If the repository is null then return null
25 | if(accountRepository == null){
26 | return true;
27 | }
28 | // Check if the username is unique
29 | return accountRepository.findByUsername(username) == null;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/errors/ErrorResource.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.errors;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * Get the necessary field to print an error as json
9 | */
10 | @JsonIgnoreProperties(ignoreUnknown = true)
11 | public class ErrorResource {
12 | private String code;
13 | private String message;
14 | private List fieldErrors;
15 |
16 | public ErrorResource() { }
17 |
18 | public ErrorResource(String code, String message) {
19 | this.code = code;
20 | this.message = message;
21 | }
22 |
23 | public String getCode() { return code; }
24 |
25 | public void setCode(String code) { this.code = code; }
26 |
27 | public String getMessage() { return message; }
28 |
29 | public void setMessage(String message) { this.message = message; }
30 |
31 | public List getFieldErrors() { return fieldErrors; }
32 |
33 | public void setFieldErrors(List fieldErrors) {
34 | this.fieldErrors = fieldErrors;
35 | }
36 | }
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/repository/AccountRepository.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.repository;
2 |
3 | import Unmentionable.model.Account;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 | import org.springframework.data.jpa.repository.Query;
6 | import org.springframework.data.repository.query.Param;
7 | import org.springframework.stereotype.Repository;
8 |
9 | /**
10 | * The AccountRepository interface is a Spring Data JPA data repository for
11 | * Account entities. The AccountRepository provides all the data access
12 | * behaviors exposed by JpaRepository and additional custom
13 | * behaviors may be defined in this interface.
14 | */
15 | @Repository
16 | public interface AccountRepository extends JpaRepository {
17 |
18 | /**
19 | * Query for a single Account entity by username.
20 | *
21 | * @param username A String username value to query the repository.
22 | * @return An Account or null if none found.
23 | */
24 | @Query("SELECT a FROM Account a WHERE a.username = :username")
25 | Account findByUsername(@Param("username") String username);
26 |
27 | }
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/model/Role.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.model;
2 |
3 | import javax.persistence.Entity;
4 | import javax.persistence.Id;
5 | import javax.validation.constraints.NotNull;
6 |
7 | /**
8 | * The Role class is an entity model object. A Role describes a privilege level
9 | * within the application. A Role is used to authorize an Account to access a
10 | * set of application resources.
11 | *
12 | * @author Matt Warman
13 | */
14 | @Entity
15 | public class Role {
16 |
17 | @Id
18 | private Long id;
19 |
20 | @NotNull
21 | private String code;
22 |
23 | @NotNull
24 | private String label;
25 |
26 | public Role() {
27 |
28 | }
29 |
30 | public Long getId() {
31 | return id;
32 | }
33 |
34 | public void setId(Long id) {
35 | this.id = id;
36 | }
37 |
38 | public String getCode() {
39 | return code;
40 | }
41 |
42 | public void setCode(String code) {
43 | this.code = code;
44 | }
45 |
46 | public String getLabel() {
47 | return label;
48 | }
49 |
50 | public void setLabel(String label) {
51 | this.label = label;
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/email/SmtpMailSender.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.email;
2 |
3 | import javax.mail.MessagingException;
4 | import javax.mail.internet.MimeMessage;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.mail.javamail.JavaMailSender;
8 | import org.springframework.mail.javamail.MimeMessageHelper;
9 | import org.springframework.stereotype.Component;
10 |
11 | @Component
12 | public class SmtpMailSender {
13 |
14 | @Autowired
15 | private JavaMailSender javaMailSender;
16 |
17 | public void send(String to, String subject, String body) throws MessagingException {
18 |
19 | MimeMessage message = javaMailSender.createMimeMessage();
20 | MimeMessageHelper helper;
21 |
22 | helper = new MimeMessageHelper(message, true); // true indicates
23 | // multipart message
24 | helper.setSubject(subject);
25 | helper.setTo(to);
26 | helper.setText(body, true); // true indicates html
27 | // continue using helper object for more functionalities like adding attachments, etc.
28 |
29 | javaMailSender.send(message);
30 |
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/service/RoleServiceBean.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.service;
2 |
3 | import Unmentionable.model.Role;
4 | import Unmentionable.repository.RoleRepository;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 | import org.springframework.transaction.annotation.Propagation;
8 | import org.springframework.transaction.annotation.Transactional;
9 |
10 | /**
11 | * Manage the data from database from Role table user
12 | */
13 | @Service
14 | @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
15 | public class RoleServiceBean implements RoleService{
16 |
17 |
18 | /**
19 | * The Spring Data repository for Account entities.
20 | */
21 | @Autowired
22 | private RoleRepository roleRepository;
23 |
24 | /**
25 | * Get by id
26 | * @param id
27 | * @return
28 | */
29 | @Override
30 | public Role findById(Long id) {
31 | Role role = roleRepository.findOne(id);
32 | return role;
33 | }
34 |
35 | /**
36 | * File Role by code
37 | * @param code - the code of the role
38 | * @return Role object
39 | */
40 | @Override
41 | public Role findByCode(String code) {
42 | return roleRepository.findByCode(code);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/target/classes/config/application.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # The main application configuration file.
3 | #
4 | # This file is loaded automatically by Spring Boot when the application starts.
5 | ###
6 |
7 | spring.mvc.view.prefix: /WEB-INF/jsp/
8 | spring.mvc.view.suffix: .jsp
9 |
10 | ###
11 | # Data Source Configuration
12 | ###
13 | # Hibernate
14 | spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
15 |
16 |
17 | ###
18 | # Data Source Configuration
19 | ###
20 | # Hibernate
21 | spring.jpa.hibernate.ddl-auto = update
22 | spring.jpa.show-sql = true
23 |
24 | ###
25 | # Initialization
26 | ###
27 | spring.datasource.url=jdbc:mysql://localhost:3306/unmentionable
28 | spring.datasource.username=root
29 | spring.datasource.password=root
30 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver
31 |
32 | ###
33 | # Sessions
34 | ####
35 | security.sessions=never
36 |
37 | ###
38 | # Email Properties
39 | ###
40 | spring.mail.host = smtp.gmail.com
41 | spring.mail.username =
42 | spring.mail.password =
43 | spring.mail.properties.mail.smtp.auth = true
44 | spring.mail.properties.mail.smtp.ssl.enable = true
45 | spring.mail.properties.mail.smtp.socketFactory.port = 465
46 | spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
47 | spring.mail.properties.mail.smtp.socketFactory.fallback = false
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/main/resources/config/application.properties:
--------------------------------------------------------------------------------
1 | ###
2 | # The main application configuration file.
3 | #
4 | # This file is loaded automatically by Spring Boot when the application starts.
5 | ###
6 |
7 | spring.mvc.view.prefix: /WEB-INF/jsp/
8 | spring.mvc.view.suffix: .jsp
9 |
10 | ###
11 | # Data Source Configuration
12 | ###
13 | # Hibernate
14 | spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
15 |
16 |
17 | ###
18 | # Data Source Configuration
19 | ###
20 | # Hibernate
21 | spring.jpa.hibernate.ddl-auto = update
22 | spring.jpa.show-sql = true
23 |
24 | ###
25 | # Initialization
26 | ###
27 | spring.datasource.url=jdbc:mysql://localhost:3306/unmentionable
28 | spring.datasource.username=root
29 | spring.datasource.password=root
30 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver
31 |
32 | ###
33 | # Sessions
34 | ####
35 | security.sessions=never
36 |
37 | ###
38 | # Email Properties
39 | ###
40 | spring.mail.host = smtp.gmail.com
41 | spring.mail.username =
42 | spring.mail.password =
43 | spring.mail.properties.mail.smtp.auth = true
44 | spring.mail.properties.mail.smtp.ssl.enable = true
45 | spring.mail.properties.mail.smtp.socketFactory.port = 465
46 | spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
47 | spring.mail.properties.mail.smtp.socketFactory.fallback = false
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/exceptions/ExceptionAttributes.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.exceptions;
2 |
3 | import org.springframework.http.HttpStatus;
4 | import org.springframework.web.bind.annotation.ResponseBody;
5 |
6 | import javax.servlet.http.HttpServletRequest;
7 | import javax.servlet.http.HttpServletResponse;
8 | import java.util.Map;
9 |
10 | /**
11 | * The ExceptionAttributes interface defines the behavioral contract to be
12 | * implemented by concrete ExceptionAttributes classes.
13 | *
14 | * Provides attributes which describe Exceptions and the context in which they
15 | * occurred.
16 | *
17 | * @author Matt Warman
18 | * @see DefaultExceptionAttributes
19 | *
20 | */
21 | public interface ExceptionAttributes {
22 |
23 | /**
24 | * Returns a {@link Map} of exception attributes. The Map may be used to
25 | * display an error page or serialized into a {@link ResponseBody}.
26 | *
27 | * @param exception The Exception reported.
28 | * @param httpRequest The HttpServletRequest in which the Exception
29 | * occurred.
30 | * @param httpStatus The HttpStatus value that will be used in the
31 | * {@link HttpServletResponse}.
32 | * @return A Map of exception attributes.
33 | */
34 | Map getExceptionAttributes(Exception exception,
35 | HttpServletRequest httpRequest, HttpStatus httpStatus);
36 |
37 | }
--------------------------------------------------------------------------------
/target/classes/data/hsqldb/data.sql:
--------------------------------------------------------------------------------
1 |
2 | -- password is 'password'
3 | INSERT INTO Account (referenceId, username, password, enabled, credentialsexpired, expired, locked, version, createdBy, createdAt, updatedBy, updatedAt) VALUES ('a07bd221-3ecd-4893-a0f0-78d7c0fbf94e', 'user', '$2a$10$9/44Rne7kQqPXa0cY6NfG.3XzScMrCxFYjapoLq/wFmHz7EC9praK', true, false, false, false, 0, 'user', NOW(), NULL, NULL);
4 | -- password is 'operations'
5 | INSERT INTO Account (referenceId, username, password, enabled, credentialsexpired, expired, locked, version, createdBy, createdAt, updatedBy, updatedAt) VALUES ('7bd137c8-ab64-4a45-bf2d-d9bae3574622', 'operations', '$2a$10$CoMVfutnv1qZ.fNlHY1Na.rteiJhsDF0jB1o.76qXcfdWN6As27Zm', true, false, false, false, 0, 'user', NOW(), NULL, NULL);
6 |
7 | INSERT INTO Role (id, code, label, ordinal, effectiveAt, expiresAt, createdAt) VALUES (1, 'ROLE_USER', 'User', 0, '2015-01-01 00:00:00', NULL, NOW());
8 | INSERT INTO Role (id, code, label, ordinal, effectiveAt, expiresAt, createdAt) VALUES (2, 'ROLE_ADMIN', 'Admin', 1, '2015-01-01 00:00:00', NULL, NOW());
9 | INSERT INTO Role (id, code, label, ordinal, effectiveAt, expiresAt, createdAt) VALUES (3, 'ROLE_SYSADMIN', 'System Admin', 2, '2015-01-01 00:00:00', NULL, NOW());
10 |
11 | INSERT INTO AccountRole (accountId, roleId) SELECT a.id, r.id FROM Account a, Role r WHERE a.username = 'user' and r.id = 1;
12 | INSERT INTO AccountRole (accountId, roleId) SELECT a.id, r.id FROM Account a, Role r WHERE a.username = 'operations' and r.id = 3;
--------------------------------------------------------------------------------
/src/main/resources/data/hsqldb/data.sql:
--------------------------------------------------------------------------------
1 |
2 | -- password is 'password'
3 | INSERT INTO Account (referenceId, username, password, enabled, credentialsexpired, expired, locked, version, createdBy, createdAt, updatedBy, updatedAt) VALUES ('a07bd221-3ecd-4893-a0f0-78d7c0fbf94e', 'user', '$2a$10$9/44Rne7kQqPXa0cY6NfG.3XzScMrCxFYjapoLq/wFmHz7EC9praK', true, false, false, false, 0, 'user', NOW(), NULL, NULL);
4 | -- password is 'operations'
5 | INSERT INTO Account (referenceId, username, password, enabled, credentialsexpired, expired, locked, version, createdBy, createdAt, updatedBy, updatedAt) VALUES ('7bd137c8-ab64-4a45-bf2d-d9bae3574622', 'operations', '$2a$10$CoMVfutnv1qZ.fNlHY1Na.rteiJhsDF0jB1o.76qXcfdWN6As27Zm', true, false, false, false, 0, 'user', NOW(), NULL, NULL);
6 |
7 | INSERT INTO Role (id, code, label, ordinal, effectiveAt, expiresAt, createdAt) VALUES (1, 'ROLE_USER', 'User', 0, '2015-01-01 00:00:00', NULL, NOW());
8 | INSERT INTO Role (id, code, label, ordinal, effectiveAt, expiresAt, createdAt) VALUES (2, 'ROLE_ADMIN', 'Admin', 1, '2015-01-01 00:00:00', NULL, NOW());
9 | INSERT INTO Role (id, code, label, ordinal, effectiveAt, expiresAt, createdAt) VALUES (3, 'ROLE_SYSADMIN', 'System Admin', 2, '2015-01-01 00:00:00', NULL, NOW());
10 |
11 | INSERT INTO AccountRole (accountId, roleId) SELECT a.id, r.id FROM Account a, Role r WHERE a.username = 'user' and r.id = 1;
12 | INSERT INTO AccountRole (accountId, roleId) SELECT a.id, r.id FROM Account a, Role r WHERE a.username = 'operations' and r.id = 3;
--------------------------------------------------------------------------------
/target/classes/data/hsqldb/schema.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE AccountRole IF EXISTS;
2 | DROP TABLE Account IF EXISTS;
3 | DROP TABLE Role IF EXISTS;
4 |
5 | CREATE TABLE Account (
6 | id BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) NOT NULL,
7 | referenceId VARCHAR(255) NOT NULL,
8 | username VARCHAR(100) NOT NULL,
9 | password VARCHAR(200) NOT NULL,
10 | enabled BOOLEAN DEFAULT true NOT NULL,
11 | credentialsexpired BOOLEAN DEFAULT false NOT NULL,
12 | expired BOOLEAN DEFAULT false NOT NULL,
13 | locked BOOLEAN DEFAULT false NOT NULL,
14 | version INT NOT NULL,
15 | createdBy VARCHAR(100) NOT NULL,
16 | createdAt DATETIME NOT NULL,
17 | updatedBy VARCHAR(100) DEFAULT NULL,
18 | updatedAt DATETIME DEFAULT NULL,
19 | PRIMARY KEY (id),
20 | CONSTRAINT UQ_Account_ReferenceId UNIQUE (referenceId),
21 | CONSTRAINT UQ_Account_Username UNIQUE (username)
22 | );
23 |
24 | CREATE TABLE Role (
25 | id BIGINT NOT NULL,
26 | code VARCHAR(50) NOT NULL,
27 | label VARCHAR(100) NOT NULL,
28 | ordinal INT NOT NULL,
29 | effectiveAt DATETIME NOT NULL,
30 | expiresAt DATETIME DEFAULT NULL,
31 | createdAt DATETIME NOT NULL,
32 | PRIMARY KEY (id),
33 | CONSTRAINT UQ_Role_Code UNIQUE (code)
34 | );
35 |
36 | CREATE TABLE AccountRole (
37 | accountId BIGINT NOT NULL,
38 | roleId BIGINT NOT NULL,
39 | PRIMARY KEY (accountId, roleId),
40 | CONSTRAINT FK_AccountRole_AccountId FOREIGN KEY (accountId) REFERENCES Account (id),
41 | CONSTRAINT FK_AccountRole_RoleId FOREIGN KEY (roleId) REFERENCES Role (id)
42 | );
--------------------------------------------------------------------------------
/src/main/resources/data/hsqldb/schema.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE AccountRole IF EXISTS;
2 | DROP TABLE Account IF EXISTS;
3 | DROP TABLE Role IF EXISTS;
4 |
5 | CREATE TABLE Account (
6 | id BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1) NOT NULL,
7 | referenceId VARCHAR(255) NOT NULL,
8 | username VARCHAR(100) NOT NULL,
9 | password VARCHAR(200) NOT NULL,
10 | enabled BOOLEAN DEFAULT true NOT NULL,
11 | credentialsexpired BOOLEAN DEFAULT false NOT NULL,
12 | expired BOOLEAN DEFAULT false NOT NULL,
13 | locked BOOLEAN DEFAULT false NOT NULL,
14 | version INT NOT NULL,
15 | createdBy VARCHAR(100) NOT NULL,
16 | createdAt DATETIME NOT NULL,
17 | updatedBy VARCHAR(100) DEFAULT NULL,
18 | updatedAt DATETIME DEFAULT NULL,
19 | PRIMARY KEY (id),
20 | CONSTRAINT UQ_Account_ReferenceId UNIQUE (referenceId),
21 | CONSTRAINT UQ_Account_Username UNIQUE (username)
22 | );
23 |
24 | CREATE TABLE Role (
25 | id BIGINT NOT NULL,
26 | code VARCHAR(50) NOT NULL,
27 | label VARCHAR(100) NOT NULL,
28 | ordinal INT NOT NULL,
29 | effectiveAt DATETIME NOT NULL,
30 | expiresAt DATETIME DEFAULT NULL,
31 | createdAt DATETIME NOT NULL,
32 | PRIMARY KEY (id),
33 | CONSTRAINT UQ_Role_Code UNIQUE (code)
34 | );
35 |
36 | CREATE TABLE AccountRole (
37 | accountId BIGINT NOT NULL,
38 | roleId BIGINT NOT NULL,
39 | PRIMARY KEY (accountId, roleId),
40 | CONSTRAINT FK_AccountRole_AccountId FOREIGN KEY (accountId) REFERENCES Account (id),
41 | CONSTRAINT FK_AccountRole_RoleId FOREIGN KEY (roleId) REFERENCES Role (id)
42 | );
--------------------------------------------------------------------------------
/src/test/java/Unmentionable/AbstractControllerTest.java:
--------------------------------------------------------------------------------
1 | package Unmentionable;
2 |
3 | import Unmentionable.controller.BaseController;
4 | import com.fasterxml.jackson.core.JsonProcessingException;
5 | import com.fasterxml.jackson.databind.ObjectMapper;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.web.WebAppConfiguration;
8 | import org.springframework.test.web.servlet.MockMvc;
9 | import org.springframework.test.web.servlet.setup.MockMvcBuilders;
10 | import org.springframework.web.context.WebApplicationContext;
11 |
12 | import java.io.IOException;
13 |
14 | /**
15 | * Helps the controller testings
16 | */
17 | @WebAppConfiguration
18 | public class AbstractControllerTest extends AbstractTest{
19 |
20 | protected MockMvc mvc;
21 |
22 | @Autowired
23 | protected WebApplicationContext webApplicationContext;
24 |
25 | protected void setUp(){
26 | mvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();
27 | }
28 |
29 | protected String mapToJson(Object obj) throws JsonProcessingException {
30 | ObjectMapper objectMapper = new ObjectMapper();
31 | return objectMapper.writeValueAsString(obj);
32 | }
33 |
34 | protected T mapFromJson(String json, Class clazz) throws IOException {
35 | ObjectMapper objectMapper = new ObjectMapper();
36 | return objectMapper.readValue(json, clazz);
37 | }
38 |
39 | protected void setUp(BaseController controller){
40 | mvc = MockMvcBuilders.standaloneSetup(controller).build();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/configuration/CorsFilterRequest.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.configuration;
2 |
3 |
4 | import org.slf4j.Logger;
5 | import org.slf4j.LoggerFactory;
6 | import org.springframework.core.Ordered;
7 | import org.springframework.core.annotation.Order;
8 | import org.springframework.stereotype.Component;
9 |
10 | import javax.servlet.*;
11 | import javax.servlet.http.HttpServletRequest;
12 | import javax.servlet.http.HttpServletResponse;
13 | import java.io.IOException;
14 |
15 | @Component
16 | @Order(Ordered.HIGHEST_PRECEDENCE)
17 | public class CorsFilterRequest implements Filter {
18 |
19 |
20 | private final Logger log = LoggerFactory.getLogger(CorsFilterRequest.class);
21 |
22 | public CorsFilterRequest() {
23 | log.info("SimpleCORSFilter init");
24 | }
25 |
26 | @Override
27 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
28 |
29 | HttpServletRequest request = (HttpServletRequest) req;
30 | HttpServletResponse response = (HttpServletResponse) res;
31 |
32 | response.setHeader("Access-Control-Allow-Origin", "*");
33 | response.setHeader("Access-Control-Allow-Methods", "POST, PUT, GET, OPTIONS, DELETE");
34 | response.setHeader("Access-Control-Allow-Headers", "x-requested-with, Authorization, Content-Type");
35 | response.setHeader("Access-Control-Max-Age", "3600");
36 | if ("OPTIONS".equalsIgnoreCase(request.getMethod())) {
37 | response.setStatus(HttpServletResponse.SC_OK);
38 | } else {
39 | chain.doFilter(req, res);
40 | }
41 | }
42 |
43 | @Override
44 | public void init(FilterConfig filterConfig) {
45 | }
46 |
47 | @Override
48 | public void destroy() {
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst:
--------------------------------------------------------------------------------
1 | Unmentionable/service/AccountServiceBean.class
2 | Unmentionable/settings/security/OAuth2ServerConfiguration$ResourceServerConfiguration.class
3 | Unmentionable/controller/AuthenticationController.class
4 | Unmentionable/settings/configuration/CorsFilterRequest.class
5 | Unmentionable/controller/StarterController.class
6 | Unmentionable/settings/errors/InvalidRequestException.class
7 | Unmentionable/model/Group.class
8 | Unmentionable/repository/AccountRepository.class
9 | Unmentionable/service/RoleServiceBean.class
10 | Unmentionable/model/Role.class
11 | Unmentionable/settings/exceptions/DefaultExceptionAttributes.class
12 | Unmentionable/settings/configuration/WebInitializer.class
13 | Unmentionable/settings/security/WebSecurityConfiguration.class
14 | Unmentionable/controller/BaseController.class
15 | Unmentionable/repository/RoleRepository.class
16 | Unmentionable/repository/GroupRepository.class
17 | Unmentionable/model/Account.class
18 | Unmentionable/settings/errors/FieldErrorResource.class
19 | Unmentionable/settings/security/AccountAuthenticatoinProvider.class
20 | Unmentionable/settings/security/OAuth2ServerConfiguration$AuthorizationServerConfiguration.class
21 | Unmentionable/settings/validators/UniqueUsernameValidator.class
22 | Unmentionable/service/AccountService.class
23 | Unmentionable/settings/errors/ErrorResource.class
24 | Unmentionable/Application.class
25 | Unmentionable/settings/exceptions/ExceptionAttributes.class
26 | Unmentionable/settings/security/CustomUserDetailsService$UserRepositoryUserDetails.class
27 | Unmentionable/service/RoleService.class
28 | Unmentionable/settings/errors/MyExceptionHandler.class
29 | Unmentionable/settings/security/CustomUserDetailsService.class
30 | Unmentionable/settings/security/OAuth2ServerConfiguration.class
31 | Unmentionable/settings/validators/UniqueUsername.class
32 | Unmentionable/settings/email/SmtpMailSender.class
33 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/model/Group.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.model;
2 |
3 | import javax.persistence.Column;
4 | import javax.persistence.Entity;
5 | import javax.persistence.GeneratedValue;
6 | import javax.persistence.Id;
7 | import javax.validation.constraints.NotNull;
8 | import javax.validation.constraints.Size;
9 |
10 | /**
11 | * Group model describe the container of each post
12 | */
13 | @Entity
14 | public class Group {
15 |
16 | @Id
17 | @GeneratedValue
18 | private Long id;
19 |
20 | @NotNull
21 | @Size(min=8, max=255, message="Group name should be between 8 and 255 characters")
22 | private String name;
23 |
24 | @Size(min=30, max=512, message="Group description should be between 20 and 512 characters")
25 | @Column(name="description", length=512)
26 | private String description;
27 |
28 | @Size(min=3, max=255, message="Group country should be between 3 and 255 characters")
29 | private String country;
30 |
31 | @Size(min=3, max=255, message="Group city should be between 3 and 255 characters")
32 | private String city;
33 |
34 | public Long getId() {
35 | return id;
36 | }
37 |
38 | public void setId(Long id) {
39 | this.id = id;
40 | }
41 |
42 | public String getName() {
43 | return name;
44 | }
45 |
46 | public void setName(String name) {
47 | this.name = name;
48 | }
49 |
50 | public String getDescription() {
51 | return description;
52 | }
53 |
54 | public void setDescription(String description) {
55 | this.description = description;
56 | }
57 |
58 | public String getCountry() {
59 | return country;
60 | }
61 |
62 | public void setCountry(String country) {
63 | this.country = country;
64 | }
65 |
66 | public String getCity() {
67 | return city;
68 | }
69 |
70 | public void setCity(String city) {
71 | this.city = city;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/main/java/Unmentionable/settings/errors/MyExceptionHandler.java:
--------------------------------------------------------------------------------
1 | package Unmentionable.settings.errors;
2 |
3 | import org.springframework.http.HttpHeaders;
4 | import org.springframework.http.HttpStatus;
5 | import org.springframework.http.MediaType;
6 | import org.springframework.http.ResponseEntity;
7 | import org.springframework.validation.FieldError;
8 | import org.springframework.web.bind.annotation.ControllerAdvice;
9 | import org.springframework.web.bind.annotation.ExceptionHandler;
10 | import org.springframework.web.context.request.WebRequest;
11 | import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
12 |
13 | import java.util.ArrayList;
14 | import java.util.List;
15 |
16 | /**
17 | * Exception Handle, handle the exception
18 | */
19 | @ControllerAdvice
20 | public class MyExceptionHandler extends ResponseEntityExceptionHandler{
21 |
22 | @ExceptionHandler({ InvalidRequestException.class })
23 | protected ResponseEntity