├── .idea ├── .name ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── libraries │ ├── Maven__antlr_antlr_2_7_7.xml │ ├── Maven__aopalliance_aopalliance_1_0.xml │ ├── Maven__ch_qos_logback_logback_classic_1_1_3.xml │ ├── Maven__ch_qos_logback_logback_core_1_1_3.xml │ ├── Maven__com_alibaba_druid_1_0_18.xml │ ├── Maven__com_fasterxml_classmate_1_1_0.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_5.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_6_5.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_6_5.xml │ ├── Maven__com_google_code_gson_gson_2_3_1.xml │ ├── Maven__com_google_code_gson_gson_2_6_2.xml │ ├── Maven__dom4j_dom4j_1_6_1.xml │ ├── Maven__javax_transaction_javax_transaction_api_1_2.xml │ ├── Maven__javax_validation_validation_api_1_1_0_Final.xml │ ├── Maven__junit_junit_4_12.xml │ ├── Maven__mysql_mysql_connector_java_5_1_38.xml │ ├── Maven__nz_net_ultraq_thymeleaf_thymeleaf_layout_dialect_1_3_1.xml │ ├── Maven__ognl_ognl_3_0_8.xml │ ├── Maven__org_apache_commons_commons_lang3_3_4.xml │ ├── Maven__org_apache_commons_commons_pool2_2_4_2.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_8_0_30.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_8_0_30.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_logging_juli_8_0_30.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_8_0_30.xml │ ├── Maven__org_apache_tomcat_tomcat_jdbc_8_0_30.xml │ ├── Maven__org_apache_tomcat_tomcat_juli_8_0_30.xml │ ├── Maven__org_aspectj_aspectjweaver_1_8_8.xml │ ├── Maven__org_codehaus_groovy_groovy_2_4_4.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ ├── Maven__org_hamcrest_hamcrest_library_1_3.xml │ ├── Maven__org_hibernate_common_hibernate_commons_annotations_4_0_5_Final.xml │ ├── Maven__org_hibernate_hibernate_core_4_3_11_Final.xml │ ├── Maven__org_hibernate_hibernate_entitymanager_4_3_11_Final.xml │ ├── Maven__org_hibernate_hibernate_validator_5_2_2_Final.xml │ ├── Maven__org_hibernate_javax_persistence_hibernate_jpa_2_1_api_1_0_0_Final.xml │ ├── Maven__org_javassist_javassist_3_18_1_GA.xml │ ├── Maven__org_jboss_jandex_1_1_0_Final.xml │ ├── Maven__org_jboss_logging_jboss_logging_3_3_0_Final.xml │ ├── Maven__org_jboss_logging_jboss_logging_annotations_1_2_0_Beta1.xml │ ├── Maven__org_json_json_20140107.xml │ ├── Maven__org_mockito_mockito_core_1_10_19.xml │ ├── Maven__org_objenesis_objenesis_2_1.xml │ ├── Maven__org_slf4j_jcl_over_slf4j_1_7_13.xml │ ├── Maven__org_slf4j_jul_to_slf4j_1_7_13.xml │ ├── Maven__org_slf4j_log4j_over_slf4j_1_7_13.xml │ ├── Maven__org_slf4j_slf4j_api_1_7_13.xml │ ├── Maven__org_springframework_boot_spring_boot_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_actuator_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_configuration_processor_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_actuator_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_aop_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_data_jpa_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_jdbc_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_logging_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_redis_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_test_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_thymeleaf_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_validation_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_web_1_3_2_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_commons_1_11_2_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_jpa_1_9_2_RELEASE.xml │ ├── Maven__org_springframework_data_spring_data_redis_1_6_2_RELEASE.xml │ ├── Maven__org_springframework_spring_aop_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_aspects_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_beans_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_context_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_context_support_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_core_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_expression_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_jdbc_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_orm_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_test_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_tx_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_web_4_2_4_RELEASE.xml │ ├── Maven__org_springframework_spring_webmvc_4_2_4_RELEASE.xml │ ├── Maven__org_thymeleaf_thymeleaf_2_1_4_RELEASE.xml │ ├── Maven__org_thymeleaf_thymeleaf_spring4_2_1_4_RELEASE.xml │ ├── Maven__org_unbescape_unbescape_1_1_0_RELEASE.xml │ ├── Maven__org_yaml_snakeyaml_1_16.xml │ ├── Maven__redis_clients_jedis_2_7_3.xml │ └── Maven__xml_apis_xml_apis_1_0_b2.xml ├── misc.xml ├── modules.xml ├── uiDesigner.xml └── vcs.xml ├── dbexpand ├── dbexpand.iml ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── test │ └── dbexpand │ ├── DruidConfiguration.java │ ├── JpaConfiguration.java │ ├── RedisConfig.java │ └── jpa │ ├── exception │ └── DataException.java │ ├── parameter │ ├── LinkEnum.java │ ├── Operator.java │ ├── Predicate.java │ └── PredicateBuilder.java │ └── repository │ ├── ExpandJpaRepository.java │ ├── ExpandJpaRepositoryFactoryBean.java │ └── ExpandJpaRepositoryImpl.java ├── mysql ├── mysql.iml ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── test │ └── mysql │ ├── entity │ ├── Department.java │ ├── Role.java │ └── User.java │ ├── model │ ├── DepartmentQo.java │ ├── PageQo.java │ ├── RoleQo.java │ └── UserQo.java │ ├── redis │ ├── DepartmentRedis.java │ ├── RoleRedis.java │ └── UserRedis.java │ ├── repository │ ├── DepartmentRepository.java │ ├── RoleRepository.java │ └── UserRepository.java │ └── service │ ├── DepartmentService.java │ ├── RoleService.java │ └── UserService.java ├── pom.xml ├── readme.md ├── spring-boot-dbup.iml └── website ├── pom.xml ├── src ├── main │ ├── java │ │ └── com │ │ │ └── test │ │ │ └── website │ │ │ ├── WebApplication.java │ │ │ └── controller │ │ │ ├── DepartmentController.java │ │ │ ├── RoleController.java │ │ │ └── UserController.java │ └── resources │ │ ├── application.yml │ │ ├── static │ │ ├── images │ │ │ ├── arrow.png │ │ │ ├── global │ │ │ │ ├── selectDown.png │ │ │ │ ├── subMenuBk.png │ │ │ │ ├── togUpDownCircle.png │ │ │ │ ├── topLineBk.png │ │ │ │ └── wen.png │ │ │ ├── index │ │ │ │ ├── addIcon.png │ │ │ │ ├── arr1.png │ │ │ │ ├── arr2.png │ │ │ │ ├── arr3.png │ │ │ │ ├── arr4.png │ │ │ │ ├── bg.png │ │ │ │ ├── blueBtn-62X30.png │ │ │ │ ├── bryBk-256X118.png │ │ │ │ ├── btn-56X29.png │ │ │ │ ├── btn-93X38.png │ │ │ │ ├── btnBk.png │ │ │ │ ├── closeIcon-14X14.png │ │ │ │ ├── del.png │ │ │ │ ├── deleteIcon.png │ │ │ │ ├── line.png │ │ │ │ ├── list-bk.png │ │ │ │ ├── radiusBlueBot-782.png │ │ │ │ ├── radiusBlueMid-782.png │ │ │ │ ├── radiusBlueTop-782.png │ │ │ │ ├── radiusGrayBot-782.png │ │ │ │ ├── radiusGrayTop-782.png │ │ │ │ ├── selectDown.png │ │ │ │ ├── selectIcon-15X14.png │ │ │ │ ├── togMoveIcon.png │ │ │ │ └── verticalLine.png │ │ │ └── logo.png │ │ ├── index.html │ │ ├── scripts │ │ │ ├── My97DatePicker │ │ │ │ ├── WdatePicker.js │ │ │ │ ├── calendar.js │ │ │ │ ├── lang │ │ │ │ │ ├── en.js │ │ │ │ │ ├── zh-cn.js │ │ │ │ │ └── zh-tw.js │ │ │ │ └── skin │ │ │ │ │ ├── WdatePicker.css │ │ │ │ │ ├── datePicker.gif │ │ │ │ │ ├── default │ │ │ │ │ ├── datepicker.css │ │ │ │ │ └── img.gif │ │ │ │ │ └── whyGreen │ │ │ │ │ ├── bg.jpg │ │ │ │ │ ├── datepicker.css │ │ │ │ │ └── img.gif │ │ │ ├── artDialog │ │ │ │ ├── artDialog.js │ │ │ │ ├── default.css │ │ │ │ ├── icons │ │ │ │ │ └── loading.gif │ │ │ │ └── jquery.artDialog.source.js │ │ │ ├── common.js │ │ │ ├── department │ │ │ │ ├── edit.js │ │ │ │ ├── list.js │ │ │ │ └── new.js │ │ │ ├── imageselect.js │ │ │ ├── jquery.min.js │ │ │ ├── jquery.smartselect-1.1.min.js │ │ │ ├── pagination │ │ │ │ ├── jquery.pagination.js │ │ │ │ ├── pagination.css │ │ │ │ └── wait.gif │ │ │ ├── public │ │ │ │ ├── json2.js │ │ │ │ └── public.js │ │ │ ├── role │ │ │ │ ├── edit.js │ │ │ │ ├── list.js │ │ │ │ └── new.js │ │ │ ├── user │ │ │ │ ├── edit.js │ │ │ │ ├── list.js │ │ │ │ └── new.js │ │ │ └── validate │ │ │ │ ├── additional-methods.js │ │ │ │ ├── chinese.js │ │ │ │ ├── css │ │ │ │ ├── chili.css │ │ │ │ ├── cmxform.css │ │ │ │ ├── cmxformTemplate.css │ │ │ │ ├── core.css │ │ │ │ ├── reset.css │ │ │ │ └── screen.css │ │ │ │ ├── jquery.metadata.js │ │ │ │ ├── jquery.validate.min.js │ │ │ │ ├── tooltip.js │ │ │ │ ├── tooltip.slide.js │ │ │ │ └── validate.js │ │ └── styles │ │ │ ├── global.css │ │ │ ├── imageselect.css │ │ │ └── index.css │ │ └── templates │ │ ├── department │ │ ├── edit.html │ │ ├── index.html │ │ ├── new.html │ │ └── show.html │ │ ├── fragments │ │ ├── footer.html │ │ ├── layout.html │ │ └── nav.html │ │ ├── role │ │ ├── edit.html │ │ ├── index.html │ │ ├── new.html │ │ └── show.html │ │ └── user │ │ ├── edit.html │ │ ├── index.html │ │ ├── new.html │ │ └── show.html └── test │ └── java │ └── com │ └── test │ └── website │ ├── RedisConfig.java │ └── RedisListTest.java └── website.iml /.idea/.name: -------------------------------------------------------------------------------- 1 | spring-boot-dbup -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 37 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.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__aopalliance_aopalliance_1_0.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__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_alibaba_druid_1_0_18.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__com_fasterxml_jackson_core_jackson_annotations_2_6_5.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_5.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_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_gson_gson_2_6_2.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_transaction_javax_transaction_api_1_2.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__junit_junit_4_12.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 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__nz_net_ultraq_thymeleaf_thymeleaf_layout_dialect_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ognl_ognl_3_0_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_pool2_2_4_2.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_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_apache_tomcat_embed_tomcat_embed_logging_juli_8_0_30.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_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_aspectj_aspectjweaver_1_8_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_groovy_groovy_2_4_4.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__org_hamcrest_hamcrest_library_1_3.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_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_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_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_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_javassist_javassist_3_18_1_GA.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__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__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_json_json_20140107.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_objenesis_objenesis_2_1.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_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_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_slf4j_slf4j_api_1_7_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_1_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_actuator_1_3_2_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_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_configuration_processor_1_3_2_RELEASE.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_2_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_2_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_2_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_2_RELEASE.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_2_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_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_redis_1_3_2_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_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_thymeleaf_1_3_2_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_2_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_2_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_2_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_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_springframework_data_spring_data_redis_1_6_2_RELEASE.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_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_beans_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_springframework_spring_context_support_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_expression_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_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_test_4_2_4_RELEASE.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__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_webmvc_4_2_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_thymeleaf_thymeleaf_2_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_thymeleaf_thymeleaf_spring4_2_1_4_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_unbescape_unbescape_1_1_0_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.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__redis_clients_jedis_2_7_3.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/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /dbexpand/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-boot-dbup 7 | springboot.demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | dbexpand 13 | jar 14 | 15 | 16 | 17 | org.springframework.boot 18 | spring-boot-starter-data-jpa 19 | 20 | 21 | mysql 22 | mysql-connector-java 23 | runtime 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-redis 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-configuration-processor 32 | true 33 | 34 | 35 | 36 | com.alibaba 37 | druid 38 | 1.0.18 39 | 40 | 41 | org.apache.commons 42 | commons-lang3 43 | 3.4 44 | 45 | 46 | org.springframework.boot 47 | spring-boot-starter-web 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/DruidConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand; 2 | 3 | import com.alibaba.druid.support.http.StatViewServlet; 4 | import com.alibaba.druid.support.http.WebStatFilter; 5 | import org.springframework.boot.context.embedded.FilterRegistrationBean; 6 | import org.springframework.boot.context.embedded.ServletRegistrationBean; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | @Configuration 11 | public class DruidConfiguration { 12 | @Bean 13 | public ServletRegistrationBean statViewServle(){ 14 | ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(),"/druid/*"); 15 | //白名单: 16 | servletRegistrationBean.addInitParameter("allow","192.168.1.218,127.0.0.1"); 17 | //IP黑名单 (存在共同时,deny优先于allow) : 如果满足deny的即提示:Sorry, you are not permitted to view this page. 18 | servletRegistrationBean.addInitParameter("deny","192.168.1.100"); 19 | //登录查看信息的账号密码. 20 | servletRegistrationBean.addInitParameter("loginUsername","druid"); 21 | servletRegistrationBean.addInitParameter("loginPassword","12345678"); 22 | //是否能够重置数据. 23 | servletRegistrationBean.addInitParameter("resetEnable","false"); 24 | return servletRegistrationBean; 25 | } 26 | 27 | @Bean 28 | public FilterRegistrationBean statFilter(){ 29 | FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter()); 30 | //添加过滤规则. 31 | filterRegistrationBean.addUrlPatterns("/*"); 32 | //添加不需要忽略的格式信息. 33 | filterRegistrationBean.addInitParameter("exclusions","*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"); 34 | return filterRegistrationBean; 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/JpaConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand; 2 | 3 | import com.test.dbexpand.jpa.repository.ExpandJpaRepositoryFactoryBean; 4 | import org.springframework.boot.orm.jpa.EntityScan; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.core.Ordered; 8 | import org.springframework.core.annotation.Order; 9 | import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; 10 | import org.springframework.data.jpa.repository.config.EnableJpaRepositories; 11 | import org.springframework.transaction.annotation.EnableTransactionManagement; 12 | 13 | @Order(Ordered.HIGHEST_PRECEDENCE) 14 | @Configuration 15 | @EnableTransactionManagement(proxyTargetClass = true) 16 | @EnableJpaRepositories(basePackages = "com.**.repository",repositoryFactoryBeanClass = ExpandJpaRepositoryFactoryBean.class) 17 | @EntityScan(basePackages = "com.**.entity") 18 | public class JpaConfiguration { 19 | @Bean 20 | PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor(){ 21 | return new PersistenceExceptionTranslationPostProcessor(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/RedisConfig.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAutoDetect; 4 | import com.fasterxml.jackson.annotation.PropertyAccessor; 5 | import com.fasterxml.jackson.databind.ObjectMapper; 6 | import org.springframework.cache.CacheManager; 7 | import org.springframework.cache.annotation.CachingConfigurerSupport; 8 | import org.springframework.cache.annotation.EnableCaching; 9 | import org.springframework.cache.interceptor.KeyGenerator; 10 | import org.springframework.context.annotation.Bean; 11 | import org.springframework.context.annotation.Configuration; 12 | import org.springframework.data.redis.cache.RedisCacheManager; 13 | import org.springframework.data.redis.connection.RedisConnectionFactory; 14 | import org.springframework.data.redis.core.RedisTemplate; 15 | import org.springframework.data.redis.core.StringRedisTemplate; 16 | import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; 17 | 18 | import java.lang.reflect.InvocationTargetException; 19 | import java.lang.reflect.Method; 20 | 21 | @Configuration 22 | @EnableCaching 23 | public class RedisConfig extends CachingConfigurerSupport { 24 | 25 | @Bean 26 | public KeyGenerator simpleKey(){ 27 | return new KeyGenerator() { 28 | @Override 29 | public Object generate(Object target, Method method, Object... params) { 30 | StringBuilder sb = new StringBuilder(); 31 | sb.append(target.getClass().getName()+":"); 32 | for (Object obj : params) { 33 | sb.append(obj.toString()); 34 | } 35 | return sb.toString(); 36 | } 37 | }; 38 | } 39 | 40 | @Bean 41 | public KeyGenerator objectId(){ 42 | return new KeyGenerator() { 43 | @Override 44 | public Object generate(Object target, Method method, Object... params){ 45 | StringBuilder sb = new StringBuilder(); 46 | sb.append(target.getClass().getName()+":"); 47 | try { 48 | sb.append(params[0].getClass().getMethod("getId", null).invoke(params[0], null).toString()); 49 | }catch (NoSuchMethodException no){ 50 | no.printStackTrace(); 51 | }catch(IllegalAccessException il){ 52 | il.printStackTrace(); 53 | }catch(InvocationTargetException iv){ 54 | iv.printStackTrace(); 55 | } 56 | return sb.toString(); 57 | } 58 | }; 59 | } 60 | 61 | @Bean 62 | public CacheManager cacheManager(@SuppressWarnings("rawtypes") RedisTemplate redisTemplate) { 63 | RedisCacheManager manager = new RedisCacheManager(redisTemplate); 64 | manager.setDefaultExpiration(30);//30秒 65 | manager.setUsePrefix(true); 66 | return manager; 67 | } 68 | 69 | @Bean 70 | public RedisTemplate redisTemplate( 71 | RedisConnectionFactory factory) { 72 | StringRedisTemplate template = new StringRedisTemplate(factory); 73 | Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); 74 | ObjectMapper om = new ObjectMapper(); 75 | om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); 76 | om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); 77 | jackson2JsonRedisSerializer.setObjectMapper(om); 78 | template.setValueSerializer(jackson2JsonRedisSerializer); 79 | template.afterPropertiesSet(); 80 | return template; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/jpa/exception/DataException.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand.jpa.exception; 2 | 3 | public class DataException extends RuntimeException{ 4 | 5 | public int code; 6 | 7 | public final static int noPermission = -100; 8 | public final static int noID = -1; 9 | 10 | public DataException(int code) { 11 | this.code = code; 12 | } 13 | 14 | public DataException(int code , String message) { 15 | super(message); 16 | this.code = code; 17 | } 18 | 19 | public DataException(int code , String message, Throwable cause) { 20 | super(message, cause); 21 | this.code = code; 22 | } 23 | 24 | public DataException(int code , Throwable cause) { 25 | super(cause); 26 | this.code = code; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/jpa/parameter/LinkEnum.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand.jpa.parameter; 2 | 3 | import org.springframework.util.StringUtils; 4 | 5 | import javax.persistence.Query; 6 | 7 | public enum LinkEnum { 8 | /** 9 | * 等于 10 | */ 11 | EQ("="), 12 | /** 13 | * 大于等于 14 | */ 15 | GE(">="), 16 | /** 17 | * 大于 18 | */ 19 | GT(">"), 20 | /** 21 | * in 22 | */ 23 | IN("IN"), 24 | /** 25 | * 需要手动在 value中添加 % 26 | */ 27 | LIKE("LIKE"), 28 | /** 29 | * 小于等于 30 | */ 31 | LE("<="), 32 | /** 33 | * 小于 34 | */ 35 | LT("<"), 36 | /** 37 | * 不等于 38 | */ 39 | NE("<>"), 40 | /** 41 | * not in 42 | */ 43 | NIN("NOT IN"), 44 | /** 45 | * 为空 is null 46 | */ 47 | EN("IS NULL"){ 48 | @Override 49 | public String toCondition(String key,String index) { 50 | return key+" "+getName(); 51 | } 52 | 53 | @Override 54 | public void setParameter(Predicate predicate, Query query,String index) { 55 | //do nothing 56 | } 57 | }, 58 | /** 59 | * 不为空 is not null 60 | */ 61 | NN("IS NOT NULL"){ 62 | @Override 63 | public String toCondition(String key,String index) { 64 | return key+" "+getName(); 65 | } 66 | 67 | @Override 68 | public void setParameter(Predicate predicate, Query query,String index) { 69 | //do nothing 70 | } 71 | }; 72 | 73 | private String name; 74 | 75 | LinkEnum(String name) { 76 | this.name = name; 77 | } 78 | 79 | public String getName() { 80 | return name; 81 | } 82 | 83 | public void setName(String name) { 84 | this.name = name; 85 | } 86 | 87 | public String toCondition(String key,String index){ 88 | return key+" "+this.name+" :"+ (StringUtils.replace(key, ".", "_")+index); 89 | } 90 | 91 | public void setParameter(Predicate predicate, Query query,String index) { 92 | query.setParameter(StringUtils.replace(predicate.getKey() + index, ".", "_"),predicate.getValue()); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/jpa/parameter/Operator.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand.jpa.parameter; 2 | 3 | 4 | public enum Operator { 5 | AND, 6 | OR 7 | } 8 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/jpa/parameter/Predicate.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand.jpa.parameter; 2 | 3 | import javax.persistence.Query; 4 | import java.io.Serializable; 5 | 6 | public class Predicate implements Serializable { 7 | 8 | /** 9 | * 字段名 10 | */ 11 | private String key; 12 | /** 13 | * 连接串 = > < in .... 14 | */ 15 | private LinkEnum link = LinkEnum.EQ; 16 | /** 17 | * 值 18 | */ 19 | private Object value; 20 | 21 | /** 22 | * 默认是 like 23 | */ 24 | public Predicate(String key, Object value) { 25 | this.key = key; 26 | this.value = value; 27 | } 28 | 29 | public Predicate(String key, Object value, LinkEnum link) { 30 | this.key = key; 31 | this.value = value; 32 | this.link = link; 33 | } 34 | 35 | public String getKey() { 36 | return key; 37 | } 38 | 39 | public void setKey(String key) { 40 | this.key = key; 41 | } 42 | 43 | public LinkEnum getLink() { 44 | return link; 45 | } 46 | 47 | public void setLink(LinkEnum link) { 48 | this.link = link; 49 | } 50 | 51 | public Object getValue() { 52 | return value; 53 | } 54 | 55 | public void setValue(Object value) { 56 | this.value = value; 57 | } 58 | 59 | public String toCondition(String index){ 60 | return link.toCondition(key,index); 61 | } 62 | 63 | public void setParameter(Query query,String index){ 64 | link.setParameter(this,query,index); 65 | } 66 | 67 | 68 | } 69 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/jpa/parameter/PredicateBuilder.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand.jpa.parameter; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class PredicateBuilder { 7 | private List predicates = new ArrayList(); 8 | 9 | public static PredicateBuilder create(){ 10 | return new PredicateBuilder(); 11 | } 12 | 13 | public PredicateBuilder add(String key,Object value,LinkEnum link){ 14 | predicates.add(new Predicate(key,value,link)); 15 | return this; 16 | } 17 | 18 | public PredicateBuilder add(String key,Object value){ 19 | predicates.add(new Predicate(key,value)); 20 | return this; 21 | } 22 | public List build(){ 23 | return predicates; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/jpa/repository/ExpandJpaRepository.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand.jpa.repository; 2 | 3 | import com.test.dbexpand.jpa.parameter.Operator; 4 | import com.test.dbexpand.jpa.parameter.Predicate; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.data.domain.Sort; 8 | import org.springframework.data.jpa.repository.JpaRepository; 9 | import org.springframework.data.repository.NoRepositoryBean; 10 | 11 | import java.io.Serializable; 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | @NoRepositoryBean 16 | public interface ExpandJpaRepository extends JpaRepository { 17 | 18 | T findOne(String condition, Object... objects); 19 | 20 | List findAll(String condition, Object... objects); 21 | 22 | List findAll(Iterable predicates, Operator operator); 23 | 24 | List findAll(Iterable predicates, Operator operator, Sort sort); 25 | 26 | Page findAll(Iterable predicates, Operator operator, Pageable pageable); 27 | 28 | long count(Iterable predicates, Operator operator); 29 | 30 | List findAll(String condition, Sort sort, Object... objects); 31 | 32 | Page findAll(String condition, Pageable pageable, Object... objects); 33 | 34 | long count(String condition, Object... objects); 35 | 36 | void deleteByIds(Iterable ids); 37 | 38 | Class getEntityClass(); 39 | 40 | List> nativeQuery4Map(String sql); 41 | 42 | Page nativeQuery4Map(String sql, Pageable pageable); 43 | 44 | Object nativeQuery4Object(String sql); 45 | } 46 | -------------------------------------------------------------------------------- /dbexpand/src/main/java/com/test/dbexpand/jpa/repository/ExpandJpaRepositoryFactoryBean.java: -------------------------------------------------------------------------------- 1 | package com.test.dbexpand.jpa.repository; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.support.JpaEntityInformation; 5 | import org.springframework.data.jpa.repository.support.JpaRepositoryFactory; 6 | import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean; 7 | import org.springframework.data.repository.core.RepositoryMetadata; 8 | import org.springframework.data.repository.core.support.RepositoryFactorySupport; 9 | 10 | import javax.persistence.EntityManager; 11 | import java.io.Serializable; 12 | 13 | public class ExpandJpaRepositoryFactoryBean, T, ID extends Serializable> 14 | extends JpaRepositoryFactoryBean { 15 | 16 | protected RepositoryFactorySupport createRepositoryFactory( 17 | EntityManager entityManager) { 18 | return new ExpandJpaRepositoryFactory(entityManager); 19 | } 20 | 21 | private static class ExpandJpaRepositoryFactory 22 | extends JpaRepositoryFactory { 23 | 24 | private final EntityManager entityManager; 25 | 26 | public ExpandJpaRepositoryFactory(EntityManager entityManager) { 27 | 28 | super(entityManager); 29 | this.entityManager = entityManager; 30 | } 31 | 32 | protected Object getTargetRepository(RepositoryMetadata metadata) { 33 | JpaEntityInformation entityInformation = (JpaEntityInformation) getEntityInformation(metadata.getDomainType()); 34 | return new ExpandJpaRepositoryImpl(entityInformation, entityManager); 35 | } 36 | 37 | protected Class getRepositoryBaseClass(RepositoryMetadata metadata) { 38 | return ExpandJpaRepositoryImpl.class; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /mysql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-boot-dbup 7 | springboot.demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | mysql 13 | jar 14 | 15 | 16 | 17 | springboot.demo 18 | dbexpand 19 | ${project.version} 20 | 21 | 22 | 23 | com.google.code.gson 24 | gson 25 | 2.6.2 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/entity/Department.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.entity; 2 | 3 | import org.springframework.format.annotation.DateTimeFormat; 4 | 5 | import javax.persistence.*; 6 | import java.util.Date; 7 | 8 | @Entity 9 | @Table(name = "department") 10 | public class Department implements java.io.Serializable{ 11 | @Id 12 | @GeneratedValue(strategy = GenerationType.IDENTITY) 13 | private Long id; 14 | private String name; 15 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 16 | private Date createdate; 17 | 18 | public Department() { 19 | } 20 | 21 | public Long getId() { 22 | return id; 23 | } 24 | 25 | public void setId(Long id) { 26 | this.id = id; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | public Date getCreatedate() { 38 | return createdate; 39 | } 40 | 41 | public void setCreatedate(Date createdate) { 42 | this.createdate = createdate; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/entity/Role.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.entity; 2 | 3 | import org.springframework.format.annotation.DateTimeFormat; 4 | 5 | import javax.persistence.*; 6 | import java.util.Date; 7 | 8 | @Entity 9 | @Table(name = "role") 10 | public class Role implements java.io.Serializable{ 11 | @Id 12 | @GeneratedValue(strategy = GenerationType.IDENTITY) 13 | private Long id; 14 | private String name; 15 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 16 | private Date createdate; 17 | 18 | public Role() { 19 | } 20 | 21 | public Long getId() { 22 | return id; 23 | } 24 | 25 | public void setId(Long id) { 26 | this.id = id; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | public Date getCreatedate() { 38 | return createdate; 39 | } 40 | 41 | public void setCreatedate(Date createdate) { 42 | this.createdate = createdate; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonBackReference; 4 | import com.fasterxml.jackson.annotation.JsonIgnore; 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import javax.persistence.*; 8 | import java.util.Date; 9 | import java.util.List; 10 | 11 | @Entity 12 | @Table(name = "user") 13 | public class User implements java.io.Serializable{ 14 | @Id 15 | @GeneratedValue(strategy = GenerationType.IDENTITY) 16 | private Long id; 17 | private String name; 18 | private String email; 19 | private Integer sex; 20 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 21 | private Date createdate; 22 | 23 | @ManyToOne 24 | @JoinColumn(name = "did") 25 | @JsonBackReference 26 | private Department department; 27 | 28 | @ManyToMany 29 | @JoinTable(name = "user_role", 30 | joinColumns = {@JoinColumn(name = "user_id")}, 31 | inverseJoinColumns = {@JoinColumn(name = "roles_id")}) 32 | //@JsonIgnore 33 | private List roles; 34 | 35 | public User() { 36 | } 37 | 38 | public Long getId() { 39 | return id; 40 | } 41 | 42 | public void setId(Long id) { 43 | this.id = id; 44 | } 45 | 46 | public String getName() { 47 | return name; 48 | } 49 | 50 | public void setName(String name) { 51 | this.name = name; 52 | } 53 | 54 | public String getEmail() { 55 | return email; 56 | } 57 | 58 | public void setEmail(String email) { 59 | this.email = email; 60 | } 61 | 62 | public Integer getSex() { 63 | return sex; 64 | } 65 | 66 | public void setSex(Integer sex) { 67 | this.sex = sex; 68 | } 69 | 70 | public Date getCreatedate() { 71 | return createdate; 72 | } 73 | 74 | public void setCreatedate(Date createdate) { 75 | this.createdate = createdate; 76 | } 77 | 78 | public Department getDepartment() { 79 | return department; 80 | } 81 | 82 | public void setDepartment(Department department) { 83 | this.department = department; 84 | } 85 | 86 | public List getRoles() { 87 | return roles; 88 | } 89 | 90 | public void setRoles(List roles) { 91 | this.roles = roles; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/model/DepartmentQo.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.model; 2 | 3 | public class DepartmentQo extends PageQo{ 4 | private Long id; 5 | private String name; 6 | 7 | public DepartmentQo() { 8 | } 9 | 10 | public Long getId() { 11 | return id; 12 | } 13 | 14 | public void setId(Long id) { 15 | this.id = id; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/model/PageQo.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.model; 2 | 3 | public class PageQo { 4 | private Integer page = 0; 5 | private Integer size = 10; 6 | 7 | public Integer getPage() { 8 | return page; 9 | } 10 | 11 | public void setPage(Integer page) { 12 | this.page = page; 13 | } 14 | 15 | public Integer getSize() { 16 | return size; 17 | } 18 | 19 | public void setSize(Integer size) { 20 | this.size = size; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/model/RoleQo.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.model; 2 | 3 | public class RoleQo extends PageQo{ 4 | private Long id; 5 | private String name; 6 | 7 | public RoleQo() { 8 | } 9 | 10 | public Long getId() { 11 | return id; 12 | } 13 | 14 | public void setId(Long id) { 15 | this.id = id; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/model/UserQo.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.model; 2 | 3 | 4 | import org.springframework.format.annotation.DateTimeFormat; 5 | 6 | import java.util.Date; 7 | import java.util.List; 8 | 9 | public class UserQo extends PageQo{ 10 | private Long id; 11 | private String name; 12 | private String email; 13 | private Integer sex; 14 | @DateTimeFormat(pattern = "yyyy-MM-dd") 15 | private Date createdate; 16 | 17 | @DateTimeFormat(pattern = "yyyy-MM-dd") 18 | private Date createdateStart; 19 | @DateTimeFormat(pattern = "yyyy-MM-dd") 20 | private Date createdateEnd; 21 | 22 | public UserQo() { 23 | } 24 | 25 | public Long getId() { 26 | return id; 27 | } 28 | 29 | public void setId(Long id) { 30 | this.id = id; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name; 39 | } 40 | 41 | public String getEmail() { 42 | return email; 43 | } 44 | 45 | public void setEmail(String email) { 46 | this.email = email; 47 | } 48 | 49 | public Integer getSex() { 50 | return sex; 51 | } 52 | 53 | public void setSex(Integer sex) { 54 | this.sex = sex; 55 | } 56 | 57 | public Date getCreatedate() { 58 | return createdate; 59 | } 60 | 61 | public void setCreatedate(Date createdate) { 62 | this.createdate = createdate; 63 | } 64 | 65 | public Date getCreatedateStart() { 66 | return createdateStart; 67 | } 68 | 69 | public void setCreatedateStart(Date createdateStart) { 70 | this.createdateStart = createdateStart; 71 | } 72 | 73 | public Date getCreatedateEnd() { 74 | return createdateEnd; 75 | } 76 | 77 | public void setCreatedateEnd(Date createdateEnd) { 78 | this.createdateEnd = createdateEnd; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/redis/DepartmentRedis.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.redis; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.reflect.TypeToken; 5 | import com.test.mysql.entity.Department; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.redis.core.RedisTemplate; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.util.StringUtils; 10 | 11 | import java.util.List; 12 | import java.util.concurrent.TimeUnit; 13 | 14 | @Repository 15 | public class DepartmentRedis { 16 | @Autowired 17 | private RedisTemplate redisTemplate; 18 | 19 | 20 | public void add(String key, Long time, List deparments) { 21 | Gson gson = new Gson(); 22 | redisTemplate.opsForValue().set(key, gson.toJson(deparments), time, TimeUnit.MINUTES); 23 | } 24 | 25 | 26 | public List getList(String key) { 27 | Gson gson = new Gson(); 28 | List ts = null; 29 | String listJson = redisTemplate.opsForValue().get(key); 30 | if(!StringUtils.isEmpty(listJson)) 31 | ts = gson.fromJson(listJson, new TypeToken>(){}.getType()); 32 | return ts; 33 | } 34 | 35 | public void delete(String key){ 36 | redisTemplate.opsForValue().getOperations().delete(key); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/redis/RoleRedis.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.redis; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.reflect.TypeToken; 5 | import com.test.mysql.entity.Role; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.redis.core.RedisTemplate; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.util.StringUtils; 10 | 11 | import java.util.List; 12 | import java.util.concurrent.TimeUnit; 13 | 14 | @Repository 15 | public class RoleRedis { 16 | @Autowired 17 | private RedisTemplate redisTemplate; 18 | 19 | 20 | public void add(String key, Long time, List roles) { 21 | Gson gson = new Gson(); 22 | redisTemplate.opsForValue().set(key, gson.toJson(roles), time, TimeUnit.MINUTES); 23 | } 24 | 25 | 26 | public List getList(String key) { 27 | Gson gson = new Gson(); 28 | List ts = null; 29 | String listJson = redisTemplate.opsForValue().get(key); 30 | if(!StringUtils.isEmpty(listJson)) 31 | ts = gson.fromJson(listJson, new TypeToken>(){}.getType()); 32 | return ts; 33 | } 34 | 35 | public void delete(String key){ 36 | redisTemplate.opsForValue().getOperations().delete(key); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/redis/UserRedis.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.redis; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.reflect.TypeToken; 5 | import com.test.mysql.entity.User; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.redis.core.RedisTemplate; 8 | import org.springframework.stereotype.Repository; 9 | import org.springframework.util.StringUtils; 10 | 11 | import java.util.List; 12 | import java.util.concurrent.TimeUnit; 13 | 14 | @Repository 15 | public class UserRedis { 16 | @Autowired 17 | private RedisTemplate redisTemplate; 18 | 19 | 20 | public void add(String key, Long time, User user) { 21 | Gson gson = new Gson(); 22 | redisTemplate.opsForValue().set(key, gson.toJson(user), time, TimeUnit.MINUTES); 23 | } 24 | 25 | public void add(String key, Long time, List users) { 26 | Gson gson = new Gson(); 27 | redisTemplate.opsForValue().set(key, gson.toJson(users), time, TimeUnit.MINUTES); 28 | } 29 | 30 | 31 | public User get(String key) { 32 | Gson gson = new Gson(); 33 | User user = null; 34 | String json = redisTemplate.opsForValue().get(key); 35 | if(!StringUtils.isEmpty(json)) 36 | user = gson.fromJson(json, User.class); 37 | return user; 38 | } 39 | 40 | public List getList(String key) { 41 | Gson gson = new Gson(); 42 | List ts = null; 43 | String listJson = redisTemplate.opsForValue().get(key); 44 | if(!StringUtils.isEmpty(listJson)) 45 | ts = gson.fromJson(listJson, new TypeToken>(){}.getType()); 46 | return ts; 47 | } 48 | 49 | public void delete(String key){ 50 | redisTemplate.opsForValue().getOperations().delete(key); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/repository/DepartmentRepository.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.repository; 2 | 3 | import com.test.dbexpand.jpa.repository.ExpandJpaRepository; 4 | import com.test.mysql.entity.Department; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface DepartmentRepository extends ExpandJpaRepository { 9 | } 10 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/repository/RoleRepository.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.repository; 2 | 3 | import com.test.dbexpand.jpa.repository.ExpandJpaRepository; 4 | import com.test.mysql.entity.Role; 5 | import org.springframework.stereotype.Repository; 6 | 7 | @Repository 8 | public interface RoleRepository extends ExpandJpaRepository { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.repository; 2 | 3 | import com.test.dbexpand.jpa.repository.ExpandJpaRepository; 4 | import com.test.mysql.entity.User; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.data.jpa.repository.Query; 8 | import org.springframework.data.repository.query.Param; 9 | import org.springframework.stereotype.Repository; 10 | 11 | @Repository 12 | public interface UserRepository extends ExpandJpaRepository { 13 | @Query("select t from User t where t.name =?1 and t.email =?2") 14 | User findByNameAndEmail(String name, String email); 15 | 16 | @Query("select t from User t where t.name like :name") 17 | Page findByName(@Param("name") String name, Pageable pageRequest); 18 | } 19 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/service/DepartmentService.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.service; 2 | 3 | import com.test.dbexpand.jpa.parameter.LinkEnum; 4 | import com.test.dbexpand.jpa.parameter.Operator; 5 | import com.test.dbexpand.jpa.parameter.PredicateBuilder; 6 | import com.test.mysql.entity.Department; 7 | import com.test.mysql.model.DepartmentQo; 8 | import com.test.mysql.redis.DepartmentRedis; 9 | import com.test.mysql.repository.DepartmentRepository; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.cache.annotation.CacheEvict; 12 | import org.springframework.cache.annotation.CachePut; 13 | import org.springframework.cache.annotation.Cacheable; 14 | import org.springframework.data.domain.Page; 15 | import org.springframework.data.domain.PageRequest; 16 | import org.springframework.data.domain.Pageable; 17 | import org.springframework.data.domain.Sort; 18 | import org.springframework.stereotype.Service; 19 | import org.springframework.util.StringUtils; 20 | 21 | import java.util.List; 22 | 23 | @Service 24 | public class DepartmentService { 25 | @Autowired 26 | private DepartmentRepository departmentRepository; 27 | @Autowired 28 | private DepartmentRedis departmentRedis; 29 | 30 | 31 | @Cacheable(value = "mysql:findById:deparment", keyGenerator = "simpleKey") 32 | public Department findById(Long id) { 33 | return departmentRepository.findOne(id); 34 | } 35 | 36 | @CachePut(value = "mysql:findById:deparment", keyGenerator = "objectId") 37 | public Department create(Department deparment) { 38 | return departmentRepository.save(deparment); 39 | } 40 | 41 | @CachePut(value = "mysql:findById:deparment", keyGenerator = "objectId") 42 | public Department update(Department role) { 43 | return departmentRepository.save(role); 44 | } 45 | 46 | @CacheEvict(value = "mysql:findById:deparment", keyGenerator = "simpleKey") 47 | public void delete(Long id) { 48 | departmentRepository.delete(id); 49 | } 50 | 51 | public List findAll(){ 52 | List deparments = departmentRedis.getList("mysql:findAll:deparment"); 53 | if(deparments == null) { 54 | deparments = departmentRepository.findAll(); 55 | if(deparments != null) 56 | departmentRedis.add("mysql:findAll:deparment", 5L, deparments); 57 | } 58 | return deparments; 59 | } 60 | 61 | public Page findPage(DepartmentQo deparmentQo){ 62 | Pageable pageable = new PageRequest(deparmentQo.getPage(), deparmentQo.getSize(), new Sort(Sort.Direction.ASC, "id")); 63 | 64 | PredicateBuilder pb = new PredicateBuilder(); 65 | 66 | if (!StringUtils.isEmpty(deparmentQo.getName())) { 67 | pb.add("name","%" + deparmentQo.getName() + "%", LinkEnum.LIKE); 68 | } 69 | 70 | Page pages = departmentRepository.findAll(pb.build(), Operator.AND, pageable); 71 | return pages; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/service/RoleService.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.service; 2 | 3 | import com.test.dbexpand.jpa.parameter.LinkEnum; 4 | import com.test.dbexpand.jpa.parameter.Operator; 5 | import com.test.dbexpand.jpa.parameter.PredicateBuilder; 6 | import com.test.mysql.entity.Role; 7 | import com.test.mysql.model.RoleQo; 8 | import com.test.mysql.redis.RoleRedis; 9 | import com.test.mysql.repository.RoleRepository; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.cache.annotation.CacheEvict; 12 | import org.springframework.cache.annotation.CachePut; 13 | import org.springframework.cache.annotation.Cacheable; 14 | import org.springframework.data.domain.Page; 15 | import org.springframework.data.domain.PageRequest; 16 | import org.springframework.data.domain.Pageable; 17 | import org.springframework.data.domain.Sort; 18 | import org.springframework.stereotype.Service; 19 | import org.springframework.util.StringUtils; 20 | 21 | import java.util.List; 22 | 23 | @Service 24 | public class RoleService { 25 | @Autowired 26 | private RoleRepository roleRepository; 27 | @Autowired 28 | private RoleRedis roleRedis; 29 | 30 | 31 | @Cacheable(value = "mysql:findById:role", keyGenerator = "simpleKey") 32 | public Role findById(Long id) { 33 | return roleRepository.findOne(id); 34 | } 35 | 36 | @CachePut(value = "mysql:findById:role", keyGenerator = "objectId") 37 | public Role create(Role role) { 38 | return roleRepository.save(role); 39 | } 40 | 41 | @CachePut(value = "mysql:findById:role", keyGenerator = "objectId") 42 | public Role update(Role role) { 43 | return roleRepository.save(role); 44 | } 45 | 46 | @CacheEvict(value = "mysql:findById:role", keyGenerator = "simpleKey") 47 | public void delete(Long id) { 48 | roleRepository.delete(id); 49 | } 50 | 51 | public List findAll(){ 52 | List roleList = roleRedis.getList("mysql:findAll:role"); 53 | if(roleList == null) { 54 | roleList = roleRepository.findAll(); 55 | if(roleList != null) 56 | roleRedis.add("mysql:findAll:role", 5L, roleList); 57 | } 58 | return roleList; 59 | } 60 | 61 | public Page findPage(RoleQo roleQo){ 62 | Pageable pageable = new PageRequest(roleQo.getPage(), roleQo.getSize(), new Sort(Sort.Direction.ASC, "id")); 63 | 64 | PredicateBuilder pb = new PredicateBuilder(); 65 | 66 | if (!StringUtils.isEmpty(roleQo.getName())) { 67 | pb.add("name","%" + roleQo.getName() + "%", LinkEnum.LIKE); 68 | } 69 | 70 | Page pages = roleRepository.findAll(pb.build(), Operator.AND, pageable); 71 | return pages; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /mysql/src/main/java/com/test/mysql/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.test.mysql.service; 2 | 3 | import com.test.dbexpand.jpa.parameter.LinkEnum; 4 | import com.test.dbexpand.jpa.parameter.Operator; 5 | import com.test.dbexpand.jpa.parameter.PredicateBuilder; 6 | import com.test.mysql.entity.User; 7 | import com.test.mysql.model.UserQo; 8 | import com.test.mysql.redis.UserRedis; 9 | import com.test.mysql.repository.UserRepository; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.cache.annotation.CacheEvict; 12 | import org.springframework.cache.annotation.CachePut; 13 | import org.springframework.cache.annotation.Cacheable; 14 | import org.springframework.data.domain.Page; 15 | import org.springframework.data.domain.PageRequest; 16 | import org.springframework.data.domain.Pageable; 17 | import org.springframework.data.domain.Sort; 18 | import org.springframework.stereotype.Service; 19 | import org.springframework.util.StringUtils; 20 | 21 | 22 | @Service 23 | public class UserService { 24 | @Autowired 25 | private UserRepository userRepository; 26 | @Autowired 27 | private UserRedis userRedis; 28 | private static final String keyHead = "mysql:get:user:"; 29 | 30 | public User findById(Long id) { 31 | User user = userRedis.get(keyHead + id); 32 | if(user == null){ 33 | user = userRepository.findOne(id); 34 | if(user != null) 35 | userRedis.add(keyHead + id, 30L, user); 36 | } 37 | return user; 38 | } 39 | 40 | public User create(User user) { 41 | User newUser = userRepository.save(user); 42 | if(newUser != null) 43 | userRedis.add(keyHead + newUser.getId(), 30L, newUser); 44 | return newUser; 45 | } 46 | 47 | public User update(User user) { 48 | if(user != null) { 49 | userRedis.delete(keyHead + user.getId()); 50 | userRedis.add(keyHead + user.getId(), 30L, user); 51 | } 52 | return userRepository.save(user); 53 | } 54 | 55 | public void delete(Long id) { 56 | userRedis.delete(keyHead + id); 57 | userRepository.delete(id); 58 | } 59 | 60 | public Page findPage(UserQo userQo){ 61 | Pageable pageable = new PageRequest(userQo.getPage(), userQo.getSize(), new Sort(Sort.Direction.ASC, "id")); 62 | 63 | PredicateBuilder pb = new PredicateBuilder(); 64 | 65 | if (!StringUtils.isEmpty(userQo.getName())) { 66 | pb.add("name","%" + userQo.getName() + "%", LinkEnum.LIKE); 67 | } 68 | if (!StringUtils.isEmpty(userQo.getCreatedateStart())) { 69 | pb.add("createdate",userQo.getCreatedateStart(), LinkEnum.GE); 70 | } 71 | if (!StringUtils.isEmpty(userQo.getCreatedateEnd())) { 72 | pb.add("createdate",userQo.getCreatedateEnd(), LinkEnum.LE); 73 | } 74 | 75 | return userRepository.findAll(pb.build(), Operator.AND, pageable); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | springboot.demo 8 | spring-boot-dbup 9 | pom 10 | 1.0-SNAPSHOT 11 | 12 | mysql 13 | dbexpand 14 | website 15 | 16 | 17 | 18 | org.springframework.boot 19 | spring-boot-starter-parent 20 | 1.3.2.RELEASE 21 | 22 | 23 | 24 | UTF-8 25 | 1.8 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-actuator 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-starter-test 40 | test 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | 1. config website/resoueces/application.yml 2 | set spring.datasource.url/username/password 3 | set spring.redis.host/port 4 | 5 | 2. create mysql database: test 6 | 7 | 3. run/debug website/com.test.website.WebApplication 8 | 9 | 4. http://127.0.0.1 10 | 11 | 5.Druid Moniter: http://localhost/druid/index.html 12 | -------------------------------------------------------------------------------- /spring-boot-dbup.iml: -------------------------------------------------------------------------------- 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 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /website/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-boot-dbup 7 | springboot.demo 8 | 1.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | website 13 | jar 14 | 15 | 16 | 17 | org.springframework.boot 18 | spring-boot-starter-web 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-thymeleaf 23 | 24 | 25 | springboot.demo 26 | mysql 27 | ${project.version} 28 | 29 | 30 | 31 | 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-maven-plugin 36 | 37 | 38 | 39 | repackage 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /website/src/main/java/com/test/website/WebApplication.java: -------------------------------------------------------------------------------- 1 | package com.test.website; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.ComponentScan; 6 | 7 | @SpringBootApplication 8 | @ComponentScan(basePackages = "com.test") 9 | public class WebApplication { 10 | public static void main(String[] args) { 11 | SpringApplication.run(WebApplication.class, args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /website/src/main/java/com/test/website/controller/DepartmentController.java: -------------------------------------------------------------------------------- 1 | package com.test.website.controller; 2 | 3 | import com.test.mysql.entity.Department; 4 | import com.test.mysql.model.DepartmentQo; 5 | import com.test.mysql.service.DepartmentService; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.data.domain.Page; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.ui.ModelMap; 12 | import org.springframework.web.bind.annotation.PathVariable; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestMethod; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | 17 | @Controller 18 | @RequestMapping("/deparment") 19 | public class DepartmentController { 20 | private static Logger logger = LoggerFactory.getLogger(DepartmentController.class); 21 | 22 | @Autowired 23 | private DepartmentService departmentService; 24 | 25 | @RequestMapping("/index") 26 | public String index() throws Exception{ 27 | return "department/index"; 28 | } 29 | 30 | @RequestMapping(value="/{id}") 31 | public String show(ModelMap model,@PathVariable Long id) { 32 | Department department = departmentService.findById(id); 33 | model.addAttribute("department",department); 34 | return "department/show"; 35 | } 36 | 37 | @RequestMapping(value = "/list") 38 | @ResponseBody 39 | public Page getList(DepartmentQo departmentQo) { 40 | try { 41 | return departmentService.findPage(departmentQo); 42 | }catch (Exception e){ 43 | e.printStackTrace(); 44 | } 45 | return null; 46 | } 47 | 48 | @RequestMapping("/new") 49 | public String create(){ 50 | return "department/new"; 51 | } 52 | 53 | @RequestMapping(value="/save", method = RequestMethod.POST) 54 | @ResponseBody 55 | public String save(Department department) throws Exception{ 56 | departmentService.create(department); 57 | logger.info("新增->ID="+department.getId()); 58 | return "1"; 59 | } 60 | 61 | @RequestMapping(value="/edit/{id}") 62 | public String update(ModelMap model,@PathVariable Long id){ 63 | Department department = departmentService.findById(id); 64 | model.addAttribute("department",department); 65 | return "department/edit"; 66 | } 67 | 68 | @RequestMapping(method = RequestMethod.POST, value="/update") 69 | @ResponseBody 70 | public String update(Department department) throws Exception{ 71 | departmentService.update(department); 72 | logger.info("修改->ID="+department.getId()); 73 | return "1"; 74 | } 75 | 76 | @RequestMapping(value="/delete/{id}",method = RequestMethod.GET) 77 | @ResponseBody 78 | public String delete(@PathVariable Long id) throws Exception{ 79 | departmentService.delete(id); 80 | logger.info("删除->ID="+id); 81 | return "1"; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /website/src/main/java/com/test/website/controller/RoleController.java: -------------------------------------------------------------------------------- 1 | package com.test.website.controller; 2 | 3 | import com.test.mysql.entity.Role; 4 | import com.test.mysql.model.RoleQo; 5 | import com.test.mysql.service.RoleService; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.data.domain.Page; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.ui.ModelMap; 12 | import org.springframework.web.bind.annotation.PathVariable; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestMethod; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | 17 | @Controller 18 | @RequestMapping("/role") 19 | public class RoleController { 20 | private static Logger logger = LoggerFactory.getLogger(RoleController.class); 21 | 22 | @Autowired 23 | private RoleService roleService; 24 | 25 | @RequestMapping("/index") 26 | public String index() throws Exception{ 27 | return "role/index"; 28 | } 29 | 30 | @RequestMapping(value="/{id}") 31 | public String show(ModelMap model,@PathVariable Long id) { 32 | Role role = roleService.findById(id); 33 | model.addAttribute("role",role); 34 | return "role/show"; 35 | } 36 | 37 | @RequestMapping(value = "/list") 38 | @ResponseBody 39 | public Page getList(RoleQo roleQo) { 40 | try { 41 | return roleService.findPage(roleQo); 42 | }catch (Exception e){ 43 | e.printStackTrace(); 44 | } 45 | return null; 46 | } 47 | 48 | @RequestMapping("/new") 49 | public String create(){ 50 | return "role/new"; 51 | } 52 | 53 | @RequestMapping(value="/save", method = RequestMethod.POST) 54 | @ResponseBody 55 | public String save(Role role) throws Exception{ 56 | roleService.create(role); 57 | logger.info("新增->ID="+role.getId()); 58 | return "1"; 59 | } 60 | 61 | @RequestMapping(value="/edit/{id}") 62 | public String update(ModelMap model,@PathVariable Long id){ 63 | Role role = roleService.findById(id); 64 | model.addAttribute("role",role); 65 | return "role/edit"; 66 | } 67 | 68 | @RequestMapping(method = RequestMethod.POST, value="/update") 69 | @ResponseBody 70 | public String update(Role role) throws Exception{ 71 | roleService.update(role); 72 | logger.info("修改->ID="+role.getId()); 73 | return "1"; 74 | } 75 | 76 | @RequestMapping(value="/delete/{id}",method = RequestMethod.GET) 77 | @ResponseBody 78 | public String delete(@PathVariable Long id) throws Exception{ 79 | roleService.delete(id); 80 | logger.info("删除->ID="+id); 81 | return "1"; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /website/src/main/java/com/test/website/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.test.website.controller; 2 | 3 | import com.test.mysql.entity.Department; 4 | import com.test.mysql.entity.Role; 5 | import com.test.mysql.entity.User; 6 | import com.test.mysql.model.UserQo; 7 | import com.test.mysql.service.DepartmentService; 8 | import com.test.mysql.service.RoleService; 9 | import com.test.mysql.service.UserService; 10 | 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | import org.springframework.data.domain.Page; 15 | import org.springframework.stereotype.Controller; 16 | import org.springframework.ui.ModelMap; 17 | import org.springframework.web.bind.annotation.PathVariable; 18 | import org.springframework.web.bind.annotation.RequestMapping; 19 | import org.springframework.web.bind.annotation.RequestMethod; 20 | import org.springframework.web.bind.annotation.ResponseBody; 21 | 22 | import java.util.ArrayList; 23 | import java.util.List; 24 | 25 | @Controller 26 | @RequestMapping("/user") 27 | public class UserController { 28 | private static Logger logger = LoggerFactory.getLogger(UserController.class); 29 | 30 | @Autowired 31 | private UserService userService; 32 | @Autowired 33 | private DepartmentService departmentService; 34 | @Autowired 35 | private RoleService roleService; 36 | 37 | @RequestMapping("/index") 38 | public String index() throws Exception{ 39 | return "user/index"; 40 | } 41 | 42 | @RequestMapping(value="/{id}") 43 | public String show(ModelMap model,@PathVariable Long id) { 44 | User user = userService.findById(id); 45 | model.addAttribute("user",user); 46 | return "user/show"; 47 | } 48 | 49 | @RequestMapping(value = "/list") 50 | @ResponseBody 51 | public Page getList(UserQo userQo) { 52 | try { 53 | return userService.findPage(userQo); 54 | }catch (Exception e){ 55 | e.printStackTrace(); 56 | } 57 | return null; 58 | } 59 | 60 | @RequestMapping("/new") 61 | public String create(ModelMap model,User user){ 62 | List departments = departmentService.findAll(); 63 | List roles = roleService.findAll(); 64 | 65 | model.addAttribute("departments",departments); 66 | model.addAttribute("roles", roles); 67 | model.addAttribute("user", user); 68 | return "user/new"; 69 | } 70 | 71 | @RequestMapping(value="/save", method = RequestMethod.POST) 72 | @ResponseBody 73 | public String save(User user) throws Exception{ 74 | userService.create(user); 75 | logger.info("新增->ID="+user.getId()); 76 | return "1"; 77 | } 78 | 79 | @RequestMapping(value="/edit/{id}") 80 | public String update(ModelMap model,@PathVariable Long id){ 81 | User user = userService.findById(id); 82 | 83 | List departments = departmentService.findAll(); 84 | List roles = roleService.findAll(); 85 | 86 | List rids = new ArrayList(); 87 | for(Role role : user.getRoles()){ 88 | rids.add(role.getId()); 89 | } 90 | 91 | model.addAttribute("user",user); 92 | model.addAttribute("departments",departments); 93 | model.addAttribute("roles", roles); 94 | model.addAttribute("rids", rids); 95 | return "user/edit"; 96 | } 97 | 98 | @RequestMapping(method = RequestMethod.POST, value="/update") 99 | @ResponseBody 100 | public String update(User user) throws Exception{ 101 | userService.update(user); 102 | logger.info("修改->ID="+user.getId()); 103 | return "1"; 104 | } 105 | 106 | @RequestMapping(value="/delete/{id}",method = RequestMethod.GET) 107 | @ResponseBody 108 | public String delete(@PathVariable Long id) throws Exception{ 109 | userService.delete(id); 110 | logger.info("删除->ID="+id); 111 | return "1"; 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /website/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 80 3 | tomcat: 4 | uri-encoding: UTF-8 5 | 6 | spring: 7 | datasource: 8 | type: com.alibaba.druid.pool.DruidDataSource 9 | driver-class-name: com.mysql.jdbc.Driver 10 | url: jdbc:mysql://localhost:3306/test?characterEncoding=utf8 11 | username: root 12 | password: 12345678 13 | # 初始化大小,最小,最大 14 | initialSize: 5 15 | minIdle: 5 16 | maxActive: 20 17 | # 配置获取连接等待超时的时间 18 | maxWait: 60000 19 | # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 20 | timeBetweenEvictionRunsMillis: 60000 21 | # 配置一个连接在池中最小生存的时间,单位是毫秒 22 | minEvictableIdleTimeMillis: 300000 23 | validationQuery: SELECT 1 FROM DUAL 24 | testWhileIdle: true 25 | testOnBorrow: false 26 | testOnReturn: false 27 | # 打开PSCache,并且指定每个连接上PSCache的大小 28 | poolPreparedStatements: true 29 | maxPoolPreparedStatementPerConnectionSize: 20 30 | # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 31 | filters: stat,wall,log4j 32 | # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 33 | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 34 | # 合并多个DruidDataSource的监控数据 35 | #useGlobalDataSourceStat=true 36 | 37 | jpa: 38 | database: MYSQL 39 | show-sql: true 40 | ## Hibernate ddl auto (validate|create|create-drop|update) 41 | hibernate: 42 | ddl-auto: update 43 | naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy 44 | properties: 45 | hibernate: 46 | dialect: org.hibernate.dialect.MySQL5Dialect 47 | ## redis 48 | redis: 49 | host: 192.168.1.214 50 | port: 6379 51 | pool: 52 | max-idle: 8 53 | min-idle: 0 54 | max-active: 8 55 | max-wait: -1 -------------------------------------------------------------------------------- /website/src/main/resources/static/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/arrow.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/global/selectDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/global/selectDown.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/global/subMenuBk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/global/subMenuBk.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/global/togUpDownCircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/global/togUpDownCircle.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/global/topLineBk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/global/topLineBk.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/global/wen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/global/wen.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/addIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/addIcon.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/arr1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/arr1.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/arr2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/arr2.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/arr3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/arr3.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/arr4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/arr4.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/bg.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/blueBtn-62X30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/blueBtn-62X30.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/bryBk-256X118.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/bryBk-256X118.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/btn-56X29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/btn-56X29.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/btn-93X38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/btn-93X38.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/btnBk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/btnBk.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/closeIcon-14X14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/closeIcon-14X14.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/del.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/del.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/deleteIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/deleteIcon.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/line.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/list-bk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/list-bk.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/radiusBlueBot-782.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/radiusBlueBot-782.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/radiusBlueMid-782.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/radiusBlueMid-782.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/radiusBlueTop-782.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/radiusBlueTop-782.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/radiusGrayBot-782.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/radiusGrayBot-782.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/radiusGrayTop-782.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/radiusGrayTop-782.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/selectDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/selectDown.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/selectIcon-15X14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/selectIcon-15X14.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/togMoveIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/togMoveIcon.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/index/verticalLine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/index/verticalLine.png -------------------------------------------------------------------------------- /website/src/main/resources/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/images/logo.png -------------------------------------------------------------------------------- /website/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 欢迎 6 | 7 | 14 | 15 | ......请稍候! 16 | 17 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/lang/en.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "Invalid date or the date out of range,redo or not?", 3 | aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 4 | aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], 5 | aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 6 | aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"], 7 | clearStr: "Clear", 8 | todayStr: "Today", 9 | okStr: "OK", 10 | updateStr: "OK", 11 | timeStr: "Time", 12 | quickStr: "Quick Selection", 13 | err_1: 'MinDate Cannot be bigger than MaxDate!' 14 | } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?", 3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], 4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], 5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], 6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], 7 | clearStr: "\u6E05\u7A7A", 8 | todayStr: "\u4ECA\u5929", 9 | okStr: "\u786E\u5B9A", 10 | updateStr: "\u786E\u5B9A", 11 | timeStr: "\u65F6\u95F4", 12 | quickStr: "\u5FEB\u901F\u9009\u62E9", 13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!' 14 | } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/lang/zh-tw.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?", 3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], 4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], 5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], 6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], 7 | clearStr: "\u6E05\u7A7A", 8 | todayStr: "\u4ECA\u5929", 9 | okStr: "\u78BA\u5B9A", 10 | updateStr: "\u78BA\u5B9A", 11 | timeStr: "\u6642\u9593", 12 | quickStr: "\u5FEB\u901F\u9078\u64C7", 13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!' 14 | } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/skin/WdatePicker.css: -------------------------------------------------------------------------------- 1 | .Wdate{ 2 | /*border:#999 1px solid;*/ 3 | /*height:20px;*/ 4 | background:#fff url(datePicker.gif) no-repeat right; 5 | } 6 | .Wdate::-ms-clear{display:none;} 7 | 8 | .WdateFmtErr{ 9 | font-weight:bold; 10 | color:red; 11 | } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/skin/datePicker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/scripts/My97DatePicker/skin/datePicker.gif -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/skin/default/datepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * My97 DatePicker 4.8 3 | */ 4 | 5 | .WdateDiv{ 6 | width:180px; 7 | background-color:#FFFFFF; 8 | border:#bbb 1px solid; 9 | padding:2px; 10 | } 11 | 12 | .WdateDiv2{ 13 | width:360px; 14 | } 15 | .WdateDiv *{font-size:9pt;} 16 | 17 | .WdateDiv .NavImg a{ 18 | display:block; 19 | cursor:pointer; 20 | height:16px; 21 | width:16px; 22 | } 23 | 24 | .WdateDiv .NavImgll a{ 25 | float:left; 26 | background:transparent url(img.gif) no-repeat scroll 0 0; 27 | } 28 | .WdateDiv .NavImgl a{ 29 | float:left; 30 | background:transparent url(img.gif) no-repeat scroll -16px 0; 31 | } 32 | .WdateDiv .NavImgr a{ 33 | float:right; 34 | background:transparent url(img.gif) no-repeat scroll -32px 0; 35 | } 36 | .WdateDiv .NavImgrr a{ 37 | float:right; 38 | background:transparent url(img.gif) no-repeat scroll -48px 0; 39 | } 40 | 41 | .WdateDiv #dpTitle{ 42 | height:24px; 43 | margin-bottom:2px; 44 | padding:1px; 45 | } 46 | 47 | .WdateDiv .yminput{ 48 | margin-top:2px; 49 | text-align:center; 50 | height:20px; 51 | border:0px; 52 | width:50px; 53 | cursor:pointer; 54 | } 55 | 56 | .WdateDiv .yminputfocus{ 57 | margin-top:2px; 58 | text-align:center; 59 | font-weight:bold; 60 | height:20px; 61 | color:blue; 62 | border:#ccc 1px solid; 63 | width:50px; 64 | } 65 | 66 | .WdateDiv .menuSel{ 67 | z-index:1; 68 | position:absolute; 69 | background-color:#FFFFFF; 70 | border:#ccc 1px solid; 71 | display:none; 72 | } 73 | 74 | .WdateDiv .menu{ 75 | cursor:pointer; 76 | background-color:#fff; 77 | } 78 | 79 | .WdateDiv .menuOn{ 80 | cursor:pointer; 81 | background-color:#BEEBEE; 82 | } 83 | 84 | .WdateDiv .invalidMenu{ 85 | color:#aaa; 86 | } 87 | 88 | .WdateDiv .YMenu{ 89 | margin-top:20px; 90 | 91 | } 92 | 93 | .WdateDiv .MMenu{ 94 | margin-top:20px; 95 | *width:62px; 96 | } 97 | 98 | .WdateDiv .hhMenu{ 99 | margin-top:-90px; 100 | margin-left:26px; 101 | } 102 | 103 | .WdateDiv .mmMenu{ 104 | margin-top:-46px; 105 | margin-left:26px; 106 | } 107 | 108 | .WdateDiv .ssMenu{ 109 | margin-top:-24px; 110 | margin-left:26px; 111 | } 112 | 113 | .WdateDiv .Wweek { 114 | text-align:center; 115 | background:#DAF3F5; 116 | border-right:#BDEBEE 1px solid; 117 | } 118 | 119 | .WdateDiv .MTitle{ 120 | background-color:#BDEBEE; 121 | } 122 | .WdateDiv .WdayTable2{ 123 | border-collapse:collapse; 124 | border:#c5d9e8 1px solid; 125 | } 126 | .WdateDiv .WdayTable2 table{ 127 | border:0; 128 | } 129 | 130 | .WdateDiv .WdayTable{ 131 | line-height:20px; 132 | border:#c5d9e8 1px solid; 133 | } 134 | .WdateDiv .WdayTable td{ 135 | text-align:center; 136 | } 137 | 138 | .WdateDiv .Wday{ 139 | cursor:pointer; 140 | } 141 | 142 | .WdateDiv .WdayOn{ 143 | cursor:pointer; 144 | background-color:#C0EBEF; 145 | } 146 | 147 | .WdateDiv .Wwday{ 148 | cursor:pointer; 149 | color:#FF2F2F; 150 | } 151 | 152 | .WdateDiv .WwdayOn{ 153 | cursor:pointer; 154 | color:#000; 155 | background-color:#C0EBEF; 156 | } 157 | .WdateDiv .Wtoday{ 158 | cursor:pointer; 159 | color:blue; 160 | } 161 | .WdateDiv .Wselday{ 162 | background-color:#A9E4E9; 163 | } 164 | .WdateDiv .WspecialDay{ 165 | background-color:#66F4DF; 166 | } 167 | 168 | .WdateDiv .WotherDay{ 169 | cursor:pointer; 170 | color:#6A6AFF; 171 | } 172 | 173 | .WdateDiv .WotherDayOn{ 174 | cursor:pointer; 175 | background-color:#C0EBEF; 176 | } 177 | 178 | .WdateDiv .WinvalidDay{ 179 | color:#aaa; 180 | } 181 | 182 | .WdateDiv #dpTime{ 183 | float:left; 184 | margin-top:3px; 185 | margin-right:30px; 186 | } 187 | 188 | .WdateDiv #dpTime #dpTimeStr{ 189 | margin-left:1px; 190 | } 191 | 192 | .WdateDiv #dpTime input{ 193 | width:18px; 194 | height:20px; 195 | text-align:center; 196 | border:#ccc 1px solid; 197 | } 198 | 199 | .WdateDiv #dpTime .tB{ 200 | border-right:0px; 201 | } 202 | 203 | .WdateDiv #dpTime .tE{ 204 | border-left:0; 205 | border-right:0; 206 | } 207 | 208 | .WdateDiv #dpTime .tm{ 209 | width:7px; 210 | border-left:0; 211 | border-right:0; 212 | } 213 | 214 | .WdateDiv #dpTime #dpTimeUp{ 215 | height:10px; 216 | width:13px; 217 | border:0px; 218 | background:url(img.gif) no-repeat -32px -16px; 219 | } 220 | 221 | .WdateDiv #dpTime #dpTimeDown{ 222 | height:10px; 223 | width:13px; 224 | border:0px; 225 | background:url(img.gif) no-repeat -48px -16px; 226 | } 227 | 228 | .WdateDiv #dpQS { 229 | float:left; 230 | margin-right:3px; 231 | margin-top:3px; 232 | background:url(img.gif) no-repeat 0px -16px; 233 | width:20px; 234 | height:20px; 235 | cursor:pointer; 236 | } 237 | .WdateDiv #dpControl { 238 | text-align:right; 239 | } 240 | .WdateDiv .dpButton{ 241 | height:20px; 242 | width:45px; 243 | border:#ccc 1px solid; 244 | margin-top:2px; 245 | margin-right:1px; 246 | } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/skin/default/img.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/scripts/My97DatePicker/skin/default/img.gif -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/skin/whyGreen/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/scripts/My97DatePicker/skin/whyGreen/bg.jpg -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/My97DatePicker/skin/whyGreen/img.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/scripts/My97DatePicker/skin/whyGreen/img.gif -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/artDialog/icons/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/scripts/artDialog/icons/loading.gif -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/common.js: -------------------------------------------------------------------------------- 1 | function getScrollTop() { 2 | try { 3 | var scrollTop = document.body.scrollTop || document.documentElement.scrollTop; 4 | } catch (e) { 5 | 6 | } 7 | return scrollTop; 8 | } 9 | function showWindowPop(state) { 10 | if (state === undefined) { 11 | state = true; 12 | } 13 | if (state) { 14 | var contentHeight = $(window).height() , top = getScrollTop() + (contentHeight - $('#windowTipBox').height()) / 2; 15 | $('#windowShadow').height($(document).height()).show(); 16 | $('#windowTipBox').css('top', (top < 0 ? 36 : top) + 'px').show(); 17 | } else { 18 | $('#windowTipBox').hide(); 19 | $('#windowShadow').hide(); 20 | } 21 | } 22 | $(function () { 23 | $('.columnLeftMenu h6').live('click', function () { 24 | var $this = $(this); 25 | $this.toggleClass('isOpen'); 26 | if (!$this.hasClass('isOpen')) { 27 | $this.next('ul').slideDown('300'); 28 | } else { 29 | $this.next('ul').slideUp('300'); 30 | } 31 | }); 32 | $('.selectMode').live("change", (function () { 33 | var $this = $(this) , val = $(this).find('option:selected').text(); 34 | $this.siblings('input').val(val); 35 | })); 36 | }); 37 | 38 | function isEmpty(obj){ 39 | if (obj == undefined||obj ==null||obj =='') { 40 | return true; 41 | } 42 | return false; 43 | } 44 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/department/edit.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $('#saveForm').validate({ 3 | rules: { 4 | name :{required:true}, 5 | email :{required:true} 6 | },submitHandler:function(){ 7 | return false; 8 | },errorPlacement:function(error,ele){ 9 | ele.attr('data',error.html()); 10 | },success:function(label){ 11 | 12 | },ignore: '' 13 | }); 14 | $('.saveBtn').click(function(){ 15 | if($('#saveForm').valid()){ 16 | $.ajax({ 17 | type: "POST", 18 | url: "./update", 19 | data: $("#saveForm").serialize(), 20 | headers: {"Content-type": "application/x-www-form-urlencoded;charset=UTF-8"}, 21 | success: function (data) { 22 | if (data == 1) { 23 | alert("编辑成功"); 24 | pageaction(); 25 | closeDialog(); 26 | } else { 27 | alert(data); 28 | } 29 | } 30 | }); 31 | }else{ 32 | alert('数据验证失败,请检查!'); 33 | } 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/department/new.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $('#saveForm').validate({ 3 | rules: { 4 | name :{required:true}, 5 | email :{required:true} 6 | },messages:{ 7 | name :{required:"必填"}, 8 | createDate :{required:"必填"} 9 | } 10 | }); 11 | $('.saveBtn').click(function(){ 12 | if($('#saveForm').valid()){ 13 | $.ajax({ 14 | type: "POST", 15 | url: "./save", 16 | data: $("#saveForm").serialize(), 17 | headers: {"Content-type": "application/x-www-form-urlencoded;charset=UTF-8"}, 18 | success: function (data) { 19 | if (data == 1) { 20 | alert("保存成功"); 21 | pageaction(); 22 | closeDialog(); 23 | } else { 24 | alert(data); 25 | } 26 | } 27 | }); 28 | }else{ 29 | alert('数据验证失败,请检查!'); 30 | } 31 | }); 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/imageselect.js: -------------------------------------------------------------------------------- 1 | (function($){var methods={init:function(options){if(!/select/i.test(this.tagName)){return false;} 2 | var element=$(this);var selectName=element.attr('name');var id='jq_imageselect_'+ selectName;if($('#'+id).length>0){return;} 3 | var iWidth=options.width>options.dropdownWidth?options.width:options.dropdownWidth;var imageSelect=$(document.createElement('div')).attr('id',id).addClass('jqis');imageSelect.css('width',iWidth+'px').css('height',options.height+'px');var header=$(document.createElement('div')).addClass('jqis_header');header.css('width',options.width+'px').css('height',options.height+'px');header.css('text-align','center').css('background-color',options.backgroundColor);header.css('border','1px solid '+ options.borderColor);var dropdown=$(document.createElement('div')).addClass('jqis_dropdown');dropdown.css('width',options.dropdownWidth+'px');dropdown.css('z-index',options.z).css('background-color',options.backgroundColor).css('border','1px solid '+ options.borderColor);;dropdown.hide();var selectedImage=$('option:selected',element).text();header.attr('lock',options.lock);if(options.lock=='height'){header.append('');}else{header.append('');} 4 | var $options=$('option',element);$options.each(function(i,el){dropdown.append('');});imageSelect.append(header);imageSelect.append(dropdown);element.after(imageSelect);element.hide();header.attr('linkedselect',selectName);header.children().attr('linkedselect',selectName);header.click(function(){$('select[name='+ $(this).attr('linkedselect')+']').ImageSelect('open');});var w=0;$('.jqis_dropdown img').mouseover(function(){$(this).css('opacity',1);}).mouseout(function(){$(this).css('opacity',0.7);}).css('opacity',0.7).each(function(i,el){w=w+$(el).width();});dropdown.css('max-height',options.dropdownHeight+'px');element.ImageSelect('update',{src:selectedImage});},update:function(options){var element=$(this);var selectName=element.attr('name');var id='jq_imageselect_'+ selectName;if($('#'+id+' .jqis_header').length==1){var ffix=false;if($('#'+id+' .jqis_header img').attr('src')!=options.src){ffix=true;} 5 | $('#'+id+' .jqis_header img').attr('src',options.src).css('opacity',0.1);if(ffix){setTimeout(function(){element.ImageSelect('update',options);},1);return;} 6 | if($('#'+id+' .jqis_header').attr('lock')=='height'){$('#'+id+' .jqis_header img').unbind('load');$('#'+id+' .jqis_header img').one('load',function(){$(this).parent().stop();$(this).parent().parent().stop();$(this).parent().animate({width:$(this).width()+ 60});$(this).parent().parent().animate({width:$(this).width()+ 60});$('.jqis_dropdown',$(this).parent().parent()).animate({width:$(this).width()+ 50});}).each(function(){if(this.complete)$(this).load();});}else{$('#'+id+' .jqis_header img').unbind('load');$('#'+id+' .jqis_header img').one('load',function(){$(this).parent().parent().stop();$(this).parent().stop();$(this).parent().parent().css('height',($(this).height()+2)+'px');$(this).parent().animate({height:$(this).height()+2});}).each(function(){if(this.complete)$(this).load();});} 7 | $('#'+id+' .jqis_header img').animate({opacity:1});}},open:function(){var element=$(this);var selectName=element.attr('name');var id='jq_imageselect_'+ selectName;var w=0;if($('#'+id).length==1){if($('#'+id+' .jqis_dropdown').is(':visible')){$('#'+id+' .jqis_dropdown').stop();$('#'+id+' .jqis_dropdown').slideUp().fadeOut();}else{$('#'+id+' .jqis_dropdown').stop();var mh=$('#'+id+' .jqis_dropdown').css('max-height').replace(/px/,'');mh=parseInt(mh);window.imageHeightTotal=0;$('#'+id+' .jqis_dropdown').show();$('#'+id+' .jqis_dropdown img').each(function(i,el){window.imageHeightTotal=window.imageHeightTotal+ $(el).height();});var ih=window.imageHeightTotal;mh=(ih0)?ih:mh;$('#'+id+' .jqis_dropdown').height(mh);}}},close:function(){var element=$(this);var selectName=element.attr('name');var id='jq_imageselect_'+ selectName;if($('#'+id).length==1){$('#'+id+' .jqis_dropdown').slideUp().hide();}},remove:function(){if(!/select/i.test(this.tagName)){return false;} 8 | var element=$(this);var selectName=element.attr('name');var id='jq_imageselect_'+ selectName;if($('#'+id).length>0){$('#'+id).remove();$('select[name='+ selectName+']').show();return;}}};$.fn.ImageSelect=function(method,options){if(method==undefined){method='init';} 9 | var settings={width:200,height:75,dropdownHeight:250,dropdownWidth:200,z:99999,backgroundColor:'#ffffff',border:true,borderColor:'#cccccc',lock:'height'};if(options){$.extend(settings,options);} 10 | if(typeof method==='object'){$.extend(settings,method);} 11 | settings.dropdownWidth=settings.width- 10;return this.each(function(){if(methods[method]){return methods[method].apply(this,Array(settings));}else if(typeof method==='object'||!method){return methods.init.apply(this,Array(settings));}else{$.error('Method '+ method+' does not exist on jQuery.ImageSelect');}});};})(jQuery); -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/pagination/pagination.css: -------------------------------------------------------------------------------- 1 | .pagination a,.pagination span{margin:0px 2px;padding:2px 6px;line-height:24px;font-size:15px;display:inline-block;background:#FFF;border:1px solid #ccc;} 2 | .pagination a{border:1px solid #ccc;text-decoration:none;border-radius:2px;} 3 | .pagination .current,.pagination a:hover{background:#FFF;color:#50a73f;border:1px solid #50a73f;} 4 | #pageSelect {height: 30px} -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/pagination/wait.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenfromsz/spring-boot-dbup/24b5a2152b8e5567107315a867603f08e0df79f9/website/src/main/resources/static/scripts/pagination/wait.gif -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/role/edit.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $('#saveForm').validate({ 3 | rules: { 4 | name :{required:true}, 5 | email :{required:true} 6 | },submitHandler:function(){ 7 | return false; 8 | },errorPlacement:function(error,ele){ 9 | ele.attr('data',error.html()); 10 | },success:function(label){ 11 | 12 | },ignore: '' 13 | }); 14 | $('.saveBtn').click(function(){ 15 | if($('#saveForm').valid()){ 16 | $.ajax({ 17 | type: "POST", 18 | url: "./update", 19 | data: $("#saveForm").serialize(), 20 | headers: {"Content-type": "application/x-www-form-urlencoded;charset=UTF-8"}, 21 | success: function (data) { 22 | if (data == 1) { 23 | alert("编辑成功"); 24 | pageaction(); 25 | closeDialog(); 26 | } else { 27 | alert(data); 28 | } 29 | } 30 | }); 31 | }else{ 32 | alert('数据验证失败,请检查!'); 33 | } 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/role/list.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $('#searchBtn').click(function(){ 3 | pageaction(); 4 | }); 5 | $('#addUserInf').click(function(){ 6 | create(); 7 | }); 8 | //初始化分页 9 | pageaction(); 10 | var pg = $('.pagination'); 11 | $('#pageSelect').live("change",function(){ 12 | pg.trigger('setPage', [$(this).val()-1]); 13 | }); 14 | }); 15 | 16 | //分页的参数设置 17 | var getOpt = function(){ 18 | var opt = { 19 | items_per_page: 10, //每页记录数 20 | num_display_entries: 3, //中间显示的页数个数 默认为10 21 | current_page:0, //当前页 22 | num_edge_entries:1, //头尾显示的页数个数 默认为0 23 | link_to:"javascript:void(0)", 24 | prev_text:"上页", 25 | next_text:"下页", 26 | load_first_page:true, 27 | show_total_info:true , 28 | show_first_last:true, 29 | first_text:"首页", 30 | last_text:"尾页", 31 | hasSelect:false, 32 | callback: pageselectCallback //回调函数 33 | } 34 | return opt; 35 | } 36 | //分页开始 37 | var currentPageData = null ; 38 | var pageaction = function(){ 39 | $.get('./list?t='+new Date().getTime(),{ 40 | name:$("#name").val(),createdateStart:$("#createdateStart").val(),createdateEnd:$("#createdateEnd").val() 41 | },function(data){ 42 | currentPageData = data.content; 43 | $(".pagination").pagination(data.totalElements, getOpt()); 44 | }); 45 | } 46 | 47 | var pageselectCallback = function(page_index, jq, size){ 48 | var html = "" ; 49 | if(currentPageData!=null){ 50 | fillData(currentPageData); 51 | currentPageData = null; 52 | }else 53 | $.get('./list?t='+new Date().getTime(),{ 54 | size:size,page:page_index,name:$("#name").val(),createdateStart:$("#createdateStart").val(),createdateEnd:$("#createdateEnd").val() 55 | },function(data){ 56 | fillData(data.content); 57 | }); 58 | } 59 | //填充分页数据 60 | function fillData(data){ 61 | var $list = $('#tbodyContent').empty(); 62 | $.each(data,function(k,v){ 63 | var html = "" ; 64 | html += ' ' + 65 | ''+ (v.id==null?'':v.id) +'' + 66 | ''+ (v.name==null?'':v.name) +'' + 67 | ''+ (v.createdate==null?'': getSmpFormatDateByLong(v.createdate,true)) +''; 68 | html += '查看修改删除'; 69 | html +='' ; 70 | 71 | $list.append($(html)); 72 | }); 73 | } 74 | //分页结束 75 | var artdialog ; 76 | function showDetail(id){ 77 | $.get("./"+id,{ts:new Date().getTime()},function(data){ 78 | art.dialog({ 79 | lock:true, 80 | opacity:0.3, 81 | title: "查看信息", 82 | width:'750px', 83 | height: 'auto', 84 | left: '50%', 85 | top: '50%', 86 | content:data, 87 | esc: true, 88 | init: function(){ 89 | artdialog = this; 90 | }, 91 | close: function(){ 92 | artdialog = null; 93 | } 94 | }); 95 | }); 96 | } 97 | function edit(id){ 98 | $.get("./edit/"+id,{ts:new Date().getTime()},function(data){ 99 | art.dialog({ 100 | lock:true, 101 | opacity:0.3, 102 | title: "修改", 103 | width:'750px', 104 | height: 'auto', 105 | left: '50%', 106 | top: '50%', 107 | content:data, 108 | esc: true, 109 | init: function(){ 110 | artdialog = this; 111 | }, 112 | close: function(){ 113 | artdialog = null; 114 | } 115 | }); 116 | }); 117 | } 118 | function del(id){ 119 | if(!confirm("您确定删除此记录吗?")){ 120 | return false; 121 | } 122 | $.get("./delete/"+id,{ts:new Date().getTime()},function(data){ 123 | if(data==1){ 124 | alert("删除成功"); 125 | pageaction(); 126 | }else{ 127 | alert(data); 128 | } 129 | }); 130 | } 131 | function create(){ 132 | $.get("./new",{ts:new Date().getTime()},function(data){ 133 | art.dialog({ 134 | lock:true, 135 | opacity:0.3, 136 | title: "新增", 137 | width:'750px', 138 | height: 'auto', 139 | left: '50%', 140 | top: '50%', 141 | content:data, 142 | esc: true, 143 | init: function(){ 144 | artdialog = this; 145 | }, 146 | close: function(){ 147 | artdialog = null; 148 | } 149 | }); 150 | }); 151 | } 152 | 153 | function closeDialog() { 154 | artdialog.close(); 155 | } 156 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/role/new.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $('#saveForm').validate({ 3 | rules: { 4 | name :{required:true}, 5 | email :{required:true} 6 | },messages:{ 7 | name :{required:"必填"}, 8 | createDate :{required:"必填"} 9 | } 10 | }); 11 | $('.saveBtn').click(function(){ 12 | if($('#saveForm').valid()){ 13 | $.ajax({ 14 | type: "POST", 15 | url: "./save", 16 | data: $("#saveForm").serialize(), 17 | headers: {"Content-type": "application/x-www-form-urlencoded;charset=UTF-8"}, 18 | success: function (data) { 19 | if (data == 1) { 20 | alert("保存成功"); 21 | pageaction(); 22 | closeDialog(); 23 | } else { 24 | alert(data); 25 | } 26 | } 27 | }); 28 | }else{ 29 | alert('数据验证失败,请检查!'); 30 | } 31 | }); 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/user/edit.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $('#saveForm').validate({ 3 | rules: { 4 | name :{required:true}, 5 | email :{required:true} 6 | },submitHandler:function(){ 7 | return false; 8 | },errorPlacement:function(error,ele){ 9 | ele.attr('data',error.html()); 10 | },success:function(label){ 11 | 12 | },ignore: '' 13 | }); 14 | $('.saveBtn').click(function(){ 15 | if($('#saveForm').valid()){ 16 | $.ajax({ 17 | type: "POST", 18 | url: "./update", 19 | data: $("#saveForm").serialize(), 20 | headers: {"Content-type": "application/x-www-form-urlencoded;charset=UTF-8"}, 21 | success: function (data) { 22 | if (data == 1) { 23 | alert("编辑成功"); 24 | pageaction(); 25 | closeDialog(); 26 | } else { 27 | alert(data); 28 | } 29 | } 30 | }); 31 | }else{ 32 | alert('数据验证失败,请检查!'); 33 | } 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/user/new.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $('#saveForm').validate({ 3 | rules: { 4 | name :{required:true}, 5 | email :{required:true} 6 | },messages:{ 7 | name :{required:"必填"}, 8 | createDate :{required:"必填"} 9 | } 10 | }); 11 | $('.saveBtn').click(function(){ 12 | if($('#saveForm').valid()){ 13 | $.ajax({ 14 | type: "POST", 15 | url: "./save", 16 | data: $("#saveForm").serialize(), 17 | headers: {"Content-type": "application/x-www-form-urlencoded;charset=UTF-8"}, 18 | success: function (data) { 19 | if (data == 1) { 20 | alert("保存成功"); 21 | pageaction(); 22 | closeDialog(); 23 | } else { 24 | alert(data); 25 | } 26 | } 27 | }); 28 | }else{ 29 | alert('数据验证失败,请检查!'); 30 | } 31 | }); 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/additional-methods.js: -------------------------------------------------------------------------------- 1 | jQuery.validator 2 | .addMethod( 3 | "byPhone", 4 | function(value, element) { 5 | var phone = /^(1[3,5,8,7]{1}[\d]{9})|(((400)-(\d{3})-(\d{4}))|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{3,7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)$/; 6 | return this.optional(element) || (phone.test(value)); 7 | }, "例如:xxxx-6666666或13866668888"); 8 | 9 | jQuery.validator 10 | .addMethod( 11 | "byFacsimile", 12 | function(value, element) { 13 | var facsimile =/^(\d{3}-)(\d{8})$|^(\d{4}-)(\d{7})$|^(\d{4}-)(\d{8})$/; 14 | return this.optional(element) || (facsimile.test(value)); 15 | }, "例如:xxxx-6666666"); 16 | 17 | jQuery.validator.addMethod("byZipCode", function(value, element) { 18 | var zipCode = /^[1-9][0-9]{5}$/; 19 | return this.optional(element) || (zipCode.test(value)); 20 | }, "邮编例如:518000"); 21 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/css/chili.css: -------------------------------------------------------------------------------- 1 | .jscom, .mix htcom { color: #4040c2; } 2 | .com { color: green; } 3 | .regexp { color: maroon; } 4 | .string { color: teal; } 5 | .keywords { color: blue; } 6 | .global { color: #008; } 7 | .numbers { color: #880; } 8 | .comm { color: green; } 9 | .tag { color: blue; } 10 | .entity { color: blue; } 11 | .string { color: teal; } 12 | .aname { color: maroon; } 13 | .avalue { color: maroon; } 14 | .jquery { color: #00a; } 15 | .plugin { color: red; } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/css/cmxform.css: -------------------------------------------------------------------------------- 1 | /********************************** 2 | 3 | Name: cmxform Styles 4 | 5 | ***********************************/ 6 | form.cmxform { 7 | width: 370px; 8 | font-size: 1.0em; 9 | color: #333; 10 | } 11 | 12 | form.cmxform legend { 13 | padding-left: 0; 14 | } 15 | 16 | form.cmxform legend, form.cmxform label { 17 | color: #333; 18 | } 19 | 20 | form.cmxform fieldset { 21 | border: none; 22 | border-top: 1px solid #C9DCA6; 23 | background: url(../../../images/cmxform-fieldset.gif) left bottom repeat-x; 24 | background-color: #F8FDEF; 25 | } 26 | 27 | form.cmxform fieldset fieldset { 28 | background: none; 29 | } 30 | 31 | form.cmxform fieldset p, form.cmxform fieldset fieldset { 32 | padding: 5px 10px 7px; 33 | background: url(../../../images/cmxform-divider.gif) left bottom repeat-x; 34 | } 35 | 36 | form.cmxform label.error, label.error { 37 | background:url("../../../images/reg.gif") no-repeat 10px 0px; 38 | padding-left: 32px; 39 | padding-bottom: 2px; 40 | font-size:12px; 41 | color: #EA5200; 42 | } 43 | form.cmxform label.checked ,label.checked{ 44 | background:url("../../../images/reg.gif") no-repeat 10px -44px; 45 | } 46 | 47 | div.error { display: none; } 48 | input.checkbox { border: none } 49 | input:focus {/* border: 1px dotted black;*/ } 50 | input.error { border: 1px dotted red!important; } 51 | textarea.error { border: 1px dotted red!important; } 52 | form.cmxform .gray * { color: gray; } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/css/cmxformTemplate.css: -------------------------------------------------------------------------------- 1 | /********************************** 2 | 3 | Use: cmxform template 4 | 5 | ***********************************/ 6 | form.cmxform fieldset { 7 | margin-bottom: 10px; 8 | } 9 | 10 | form.cmxform legend { 11 | padding: 0 2px; 12 | font-weight: bold; 13 | _margin: 0 -7px; /* IE Win */ 14 | } 15 | 16 | form.cmxform label { 17 | display: inline-block; 18 | line-height: 1.8; 19 | vertical-align: top; 20 | cursor: hand; 21 | } 22 | 23 | form.cmxform fieldset p { 24 | list-style: none; 25 | padding: 5px; 26 | margin: 0; 27 | } 28 | 29 | form.cmxform fieldset fieldset { 30 | border: none; 31 | margin: 3px 0 0; 32 | } 33 | 34 | form.cmxform fieldset fieldset legend { 35 | padding: 0 0 5px; 36 | font-weight: normal; 37 | } 38 | 39 | form.cmxform fieldset fieldset label { 40 | display: block; 41 | width: auto; 42 | } 43 | 44 | form.cmxform label { width: 100px; } /* Width of labels */ 45 | form.cmxform fieldset fieldset label { margin-left: 103px; } /* Width plus 3 (html space) */ 46 | form.cmxform label.error { 47 | margin-left: 103px; 48 | width: 220px; 49 | } 50 | 51 | form.cmxform input.submit { 52 | margin-left: 103px; 53 | } 54 | 55 | /*\*//*/ form.cmxform legend { display: inline-block; } /* IE Mac legend fix */ -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/css/core.css: -------------------------------------------------------------------------------- 1 | #main { padding: 1em; } 2 | #banner { padding: 15px; background-color: #06b; color: white; font-size: large; border-bottom: 1px solid #ccc; 3 | background: url(/images/bg.gif) repeat-x; text-align: center } 4 | #banner a { color: white; } 5 | .hi-tooltip { 6 | position: absolute!important; 7 | overflow:hidden; 8 | font-size: 12px; 9 | z-index: 10000!important; 10 | width:206px; 11 | } 12 | .hi-tooltip .xtop, .hi-tooltip .xbottom { display: block; background: transparent; font-size: 1px; } 13 | .hi-tooltip .xb1, .hi-tooltip .xb2, .hi-tooltip .xb3, .tooltip .xb4 { display: block; overflow: hidden; } 14 | .hi-tooltip .xb1, .hi-tooltip .xb2, .hi-tooltip .xb3 { height: 1px; } 15 | .hi-tooltip .xb2, .hi-tooltip .xb3, .hi-tooltip .xb4 { background: #666; border-left: 1px solid #333; border-right: 1px solid #333; } 16 | .hi-tooltip .xbottom .xb2, .hi-tooltip .xbottom .xb3, .hi-tooltip .xbottom .xb4 { background: #666; } 17 | .hi-tooltip .xb1 { margin: 0 5px; background: #333; } 18 | .hi-tooltip .xb2 { margin: 0 3px; border-width: 0 2px; } 19 | .hi-tooltip .xb3 { margin: 0 2px; } 20 | .hi-tooltip .xb4 { height: 2px; margin: 0 1px; } 21 | 22 | .hi-tooltip .xboxcontent { 23 | padding: 0 .5em; 24 | margin: 0; 25 | color: #000; 26 | text-shadow: 2px 2px 0px #CCC; 27 | word-wrap:break-word; 28 | border: 1px solid #333; 29 | border-width: 0px 1px 0 1px; 30 | background-color: #666; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/css/reset.css: -------------------------------------------------------------------------------- 1 | /********************************** 2 | 3 | Use: Reset Styles for all browsers 4 | 5 | ***********************************/ 6 | 7 | body, p, blockquote { 8 | margin: 0; 9 | padding: 0; 10 | } 11 | 12 | a img, iframe { border: none; } 13 | 14 | /* Headers 15 | ------------------------------*/ 16 | 17 | h1, h2, h3, h4, h5, h6 { 18 | margin: 0; 19 | padding: 0; 20 | font-size: 100%; 21 | } 22 | 23 | /* Lists 24 | ------------------------------*/ 25 | 26 | ul, ol, dl, li, dt, dd { 27 | margin: 0; 28 | padding: 0; 29 | } 30 | 31 | /* Links 32 | ------------------------------*/ 33 | 34 | a, a:link {} 35 | a:visited {} 36 | a:hover {} 37 | a:active {} 38 | 39 | /* Forms 40 | ------------------------------*/ 41 | 42 | form, fieldset { 43 | margin: 0; 44 | padding: 0; 45 | } 46 | 47 | fieldset { border: 1px solid #000; } 48 | 49 | legend { 50 | padding: 0; 51 | color: #000; 52 | } 53 | 54 | input, textarea, select { 55 | margin: 0; 56 | padding: 1px; 57 | font-size: 100%; 58 | font-family: inherit; 59 | } 60 | 61 | select { padding: 0; } -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/css/screen.css: -------------------------------------------------------------------------------- 1 | /********************************** 2 | 3 | Use: Main Screen Import 4 | 5 | ***********************************/ 6 | 7 | @import "reset.css"; 8 | @import "core.css"; 9 | @import "cmxformTemplate.css"; 10 | @import "cmxform.css"; -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/jquery.metadata.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Metadata - jQuery plugin for parsing metadata from elements 3 | * 4 | * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan 5 | * 6 | * Dual licensed under the MIT and GPL licenses: 7 | * http://www.opensource.org/licenses/mit-license.php 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer $ 11 | * 12 | */ 13 | 14 | /** 15 | * Sets the type of metadata to use. Metadata is encoded in JSON, and each property 16 | * in the JSON will become a property of the element itself. 17 | * 18 | * There are three supported types of metadata storage: 19 | * 20 | * attr: Inside an attribute. The name parameter indicates *which* attribute. 21 | * 22 | * class: Inside the class attribute, wrapped in curly braces: { } 23 | * 24 | * elem: Inside a child element (e.g. a script tag). The 25 | * name parameter indicates *which* element. 26 | * 27 | * The metadata for an element is loaded the first time the element is accessed via jQuery. 28 | * 29 | * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements 30 | * matched by expr, then redefine the metadata type and run another $(expr) for other elements. 31 | * 32 | * @name $.metadata.setType 33 | * 34 | * @example

This is a p

35 | * @before $.metadata.setType("class") 36 | * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" 37 | * @desc Reads metadata from the class attribute 38 | * 39 | * @example

This is a p

40 | * @before $.metadata.setType("attr", "data") 41 | * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" 42 | * @desc Reads metadata from a "data" attribute 43 | * 44 | * @example

This is a p

45 | * @before $.metadata.setType("elem", "script") 46 | * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" 47 | * @desc Reads metadata from a nested script element 48 | * 49 | * @param String type The encoding type 50 | * @param String name The name of the attribute to be used to get metadata (optional) 51 | * @cat Plugins/Metadata 52 | * @descr Sets the type of encoding to be used when loading metadata for the first time 53 | * @type undefined 54 | * @see metadata() 55 | */ 56 | 57 | (function($) { 58 | 59 | $.extend({ 60 | metadata : { 61 | defaults : { 62 | type: 'class', 63 | name: 'metadata', 64 | cre: /({.*})/, 65 | single: 'metadata' 66 | }, 67 | setType: function( type, name ){ 68 | this.defaults.type = type; 69 | this.defaults.name = name; 70 | }, 71 | get: function( elem, opts ){ 72 | var settings = $.extend({},this.defaults,opts); 73 | // check for empty string in single property 74 | if ( !settings.single.length ) settings.single = 'metadata'; 75 | 76 | var data = $.data(elem, settings.single); 77 | // returned cached data if it already exists 78 | if ( data ) return data; 79 | 80 | data = "{}"; 81 | 82 | if ( settings.type == "class" ) { 83 | var m = settings.cre.exec( elem.className ); 84 | if ( m ) 85 | data = m[1]; 86 | } else if ( settings.type == "elem" ) { 87 | if( !elem.getElementsByTagName ) 88 | return undefined; 89 | var e = elem.getElementsByTagName(settings.name); 90 | if ( e.length ) 91 | data = $.trim(e[0].innerHTML); 92 | } else if ( elem.getAttribute != undefined ) { 93 | var attr = elem.getAttribute( settings.name ); 94 | if ( attr ) 95 | data = attr; 96 | } 97 | 98 | if ( data.indexOf( '{' ) <0 ) 99 | data = "{" + data + "}"; 100 | 101 | data = eval("(" + data + ")"); 102 | 103 | $.data( elem, settings.single, data ); 104 | return data; 105 | } 106 | } 107 | }); 108 | 109 | /** 110 | * Returns the metadata object for the first member of the jQuery object. 111 | * 112 | * @name metadata 113 | * @descr Returns element's metadata object 114 | * @param Object opts An object contianing settings to override the defaults 115 | * @type jQuery 116 | * @cat Plugins/Metadata 117 | */ 118 | $.fn.metadata = function( opts ){ 119 | return $.metadata.get( this[0], opts ); 120 | }; 121 | 122 | })(jQuery); -------------------------------------------------------------------------------- /website/src/main/resources/static/scripts/validate/tooltip.slide.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * jQuery Tools @VERSION / Tooltip Slide Effect 4 | * 5 | * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE. 6 | * 7 | * http://flowplayer.org/tools/tooltip/slide.html 8 | * 9 | * Since: September 2009 10 | * Date: @DATE 11 | */ 12 | (function($) { 13 | 14 | // version number 15 | var t = $.tools.tooltip; 16 | 17 | // extend global configuragion with effect specific defaults 18 | $.extend(t.conf, { 19 | direction: 'up', // down, left, right 20 | bounce: false, 21 | slideOffset: 10, 22 | slideInSpeed: 200, 23 | slideOutSpeed: 200, 24 | slideFade: !$.browser.msie 25 | }); 26 | 27 | // directions for slide effect 28 | var dirs = { 29 | up: ['-', 'top'], 30 | down: ['+', 'top'], 31 | left: ['-', 'left'], 32 | right: ['+', 'left'] 33 | }; 34 | 35 | /* default effect: "slide" */ 36 | t.addEffect("slide", 37 | 38 | // show effect 39 | function(done) { 40 | 41 | // variables 42 | var conf = this.getConf(), 43 | tip = this.getTip(), 44 | params = conf.slideFade ? {opacity: conf.opacity} : {}, 45 | dir = dirs[conf.direction] || dirs.up; 46 | 47 | // direction 48 | params[dir[1]] = dir[0] +'='+ conf.slideOffset; 49 | 50 | // perform animation 51 | if (conf.slideFade) { tip.css({opacity:0}); } 52 | tip.show().animate(params, conf.slideInSpeed, done); 53 | }, 54 | 55 | // hide effect 56 | function(done) { 57 | 58 | // variables 59 | var conf = this.getConf(), 60 | offset = conf.slideOffset, 61 | params = conf.slideFade ? {opacity: 0} : {}, 62 | dir = dirs[conf.direction] || dirs.up; 63 | 64 | // direction 65 | var sign = "" + dir[0]; 66 | if (conf.bounce) { sign = sign == '+' ? '-' : '+'; } 67 | params[dir[1]] = sign +'='+ offset; 68 | 69 | // perform animation 70 | this.getTip().animate(params, conf.slideOutSpeed, function() { 71 | $(this).hide(); 72 | done.call(); 73 | }); 74 | } 75 | ); 76 | 77 | })(jQuery); 78 | 79 | -------------------------------------------------------------------------------- /website/src/main/resources/static/styles/imageselect.css: -------------------------------------------------------------------------------- 1 | .jqis{position: relative;} 2 | .jqis_header{background-image: url('/images/arrow.png');background-position: right center;background-repeat: no-repeat;cursor: pointer;} 3 | .jqis_header img{cursor: pointer;} 4 | .jqis_dropdown{padding: 5px;position: absolute;overflow-x: hidden;overflow-y: scroll;} 5 | .jqis_dropdown img{margin-right: 3px;cursor: pointer;float: left;} -------------------------------------------------------------------------------- /website/src/main/resources/templates/department/edit.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |

部门信息

6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 |
名称日期 12 | 13 |
16 |
17 | 确定 18 | 返回 19 |
20 |
21 | 22 |
-------------------------------------------------------------------------------- /website/src/main/resources/templates/department/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 部门管理 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 |
18 | 当前位置:首页 > 部门管理 19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
    27 |
  • 28 | 29 | 30 |
  • 31 |
  • 32 | 查询 33 |
  • 34 |
35 |
36 |
37 |
38 |
39 | 新增 40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
ID名称日期操作
54 |
55 | 57 |
58 | 59 |
60 | 61 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/department/new.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 10 | 11 | 14 | 15 |
名称 7 | 8 | * 9 | 日期 12 | 13 |
16 |
17 | 确定 18 | 返回 19 |
20 |
21 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/department/show.html: -------------------------------------------------------------------------------- 1 |
2 |

部门信息

3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 |
名称日期 9 | 10 |
13 |
14 | 返回 15 |
16 |
-------------------------------------------------------------------------------- /website/src/main/resources/templates/fragments/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/fragments/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 提升性能 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
23 | 26 |
27 |

管理后台

28 |
29 |
30 |
31 |
32 | 当前位置:首页 > 页面 33 |
34 | 35 | 36 | 39 | 40 | 43 | 44 |
37 |
38 |
41 |
42 |
45 | 46 |
47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/fragments/nav.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |
7 | 8 |
系统管理
9 | 14 | 15 |
16 |
17 | 18 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/role/edit.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |

角色信息

6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 |
名称日期 12 | 13 |
16 |
17 | 确定 18 | 返回 19 |
20 |
21 | 22 |
-------------------------------------------------------------------------------- /website/src/main/resources/templates/role/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 角色管理 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 |
18 | 当前位置:首页 > 角色管理 19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
    27 |
  • 28 | 29 | 30 |
  • 31 |
  • 32 | 查询 33 |
  • 34 |
35 |
36 |
37 |
38 |
39 | 新增 40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
ID名称日期操作
54 |
55 | 57 |
58 | 59 |
60 | 61 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/role/new.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 10 | 11 | 14 | 15 |
名称 7 | 8 | * 9 | 日期 12 | 13 |
16 |
17 | 确定 18 | 返回 19 |
20 |
21 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/role/show.html: -------------------------------------------------------------------------------- 1 |
2 |

角色信息

3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 |
名称日期 9 | 10 |
13 |
14 | 返回 15 |
16 |
-------------------------------------------------------------------------------- /website/src/main/resources/templates/user/edit.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |

用户信息

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | 29 | 41 | 42 | 43 | 44 | 54 | 55 | 58 | 59 |
名称邮箱
部门 16 |
17 | 18 | 19 | 26 |
27 |
性别 30 |
31 | 32 | 33 | 34 | 39 |
40 |
角色 45 |
46 | 52 |
53 |
日期 56 | 57 |
60 |
61 | 确定 62 | 返回 63 |
64 |
65 | 66 |
-------------------------------------------------------------------------------- /website/src/main/resources/templates/user/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 用户管理 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 |
18 | 当前位置:首页 > 用户管理 19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
    27 |
  • 28 | 29 | 30 |
  • 31 |
  • 32 | 33 | 34 | 35 | 36 | 查询 37 |
  • 38 |
39 |
40 |
41 |
42 |
43 |
44 | 新增 45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
ID名称email日期操作
60 |
61 | 63 |
64 |
65 | 66 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/user/new.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 10 | 11 | 15 | 16 | 17 | 18 | 29 | 30 | 40 | 41 | 42 | 43 | 52 | 53 | 56 | 57 |
名称 7 | 8 | * 9 | 邮箱 12 | 13 | * 14 |
部门 19 |
20 | 21 | 27 |
28 |
性别 31 |
32 | 33 | 38 |
39 |
角色 44 |
45 | 50 |
51 |
日期 54 | 55 |
58 |
59 | 确定 60 | 返回 61 |
62 |
63 | -------------------------------------------------------------------------------- /website/src/main/resources/templates/user/show.html: -------------------------------------------------------------------------------- 1 |
2 |

用户信息

3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 20 | 21 | 22 | 23 | 31 | 32 | 35 | 36 |
名称邮箱
部门 13 | 14 | 性别 17 | 18 | 19 |
角色 24 | 30 | 日期 33 | 34 |
37 |
38 | 返回 39 |
40 |
-------------------------------------------------------------------------------- /website/src/test/java/com/test/website/RedisConfig.java: -------------------------------------------------------------------------------- 1 | package com.test.website; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAutoDetect; 4 | import com.fasterxml.jackson.annotation.PropertyAccessor; 5 | import com.fasterxml.jackson.databind.ObjectMapper; 6 | import org.springframework.cache.annotation.CachingConfigurerSupport; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | import org.springframework.data.redis.connection.RedisConnectionFactory; 10 | import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; 11 | import org.springframework.data.redis.core.RedisTemplate; 12 | import org.springframework.data.redis.core.StringRedisTemplate; 13 | import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; 14 | 15 | @Configuration 16 | public class RedisConfig extends CachingConfigurerSupport { 17 | 18 | @Bean 19 | public JedisConnectionFactory jedisConnectionFactory(){ 20 | JedisConnectionFactory factory = new JedisConnectionFactory(); 21 | factory.setHostName("192.168.1.214"); 22 | factory.setPort(6379); 23 | return factory; 24 | } 25 | 26 | @Bean 27 | public RedisTemplate redisTemplate( 28 | RedisConnectionFactory factory) { 29 | StringRedisTemplate template = new StringRedisTemplate(factory); 30 | Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class); 31 | ObjectMapper om = new ObjectMapper(); 32 | om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); 33 | om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); 34 | jackson2JsonRedisSerializer.setObjectMapper(om); 35 | template.setValueSerializer(jackson2JsonRedisSerializer); 36 | template.afterPropertiesSet(); 37 | return template; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /website/src/test/java/com/test/website/RedisListTest.java: -------------------------------------------------------------------------------- 1 | package com.test.website; 2 | 3 | import com.test.mysql.entity.Department; 4 | import com.test.mysql.redis.DepartmentRedis; 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | import org.junit.runner.RunWith; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.test.context.ContextConfiguration; 12 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 13 | import org.springframework.util.Assert; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | 19 | @RunWith(SpringJUnit4ClassRunner.class) 20 | @ContextConfiguration(classes = {RedisConfig.class, DepartmentRedis.class}) 21 | public class RedisListTest { 22 | private static Logger logger = LoggerFactory.getLogger(RedisListTest.class); 23 | 24 | @Autowired 25 | DepartmentRedis deparmentRedis; 26 | 27 | @Before 28 | public void setup(){ 29 | Department deparment = new Department(); 30 | deparment.setName("开发部"); 31 | 32 | List deparments = new ArrayList<>(); 33 | deparments.add(deparment); 34 | 35 | 36 | deparmentRedis.delete(this.getClass().getName()+":deparmentAll:"); 37 | deparmentRedis.add(this.getClass().getName()+":deparmentAll:", 10L, deparments); 38 | 39 | } 40 | 41 | @Test 42 | public void get(){ 43 | List deparments = deparmentRedis.getList(this.getClass().getName() + ":deparmentAll:"); 44 | Assert.notNull(deparments); 45 | for(Department deparment : deparments) { 46 | logger.info("======deparment====== name:{}", 47 | deparment.getName()); 48 | } 49 | } 50 | } 51 | --------------------------------------------------------------------------------