├── src ├── main │ ├── resources │ │ ├── static │ │ │ ├── swagger │ │ │ │ ├── css │ │ │ │ │ ├── typography.css │ │ │ │ │ └── reset.css │ │ │ │ ├── swagger-ui.css.map │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── images │ │ │ │ │ ├── expand.gif │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── collapse.gif │ │ │ │ │ ├── throbber.gif │ │ │ │ │ ├── logo_small.png │ │ │ │ │ ├── wordnik_api.png │ │ │ │ │ ├── explorer_icons.png │ │ │ │ │ ├── favicon-16x16.png │ │ │ │ │ ├── favicon-32x32.png │ │ │ │ │ └── pet_store_api.png │ │ │ │ ├── fonts │ │ │ │ │ ├── DroidSans.ttf │ │ │ │ │ └── DroidSans-Bold.ttf │ │ │ │ ├── swagger-ui.js.map │ │ │ │ ├── swagger-ui-standalone-preset.js.map │ │ │ │ ├── lib │ │ │ │ │ ├── highlight.9.1.0.pack_extended.js │ │ │ │ │ ├── object-assign-pollyfill.js │ │ │ │ │ ├── jquery.slideto.min.js │ │ │ │ │ └── jquery.wiggle.min.js │ │ │ │ ├── swagger-ui-bundle.js.map │ │ │ │ ├── o2c.html │ │ │ │ └── lang │ │ │ │ │ └── translator.js │ │ │ ├── favicon.ico │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ ├── plugins │ │ │ │ ├── treegrid │ │ │ │ │ ├── img │ │ │ │ │ │ ├── expand.png │ │ │ │ │ │ ├── file.png │ │ │ │ │ │ ├── folder.png │ │ │ │ │ │ └── collapse.png │ │ │ │ │ ├── jquery.treegrid.bootstrap3.js │ │ │ │ │ └── jquery.treegrid.css │ │ │ │ ├── layer │ │ │ │ │ └── skin │ │ │ │ │ │ ├── default │ │ │ │ │ │ ├── icon.png │ │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ │ └── loading-2.gif │ │ │ │ │ │ └── moon │ │ │ │ │ │ └── default.png │ │ │ │ ├── ztree │ │ │ │ │ └── css │ │ │ │ │ │ ├── metroStyle │ │ │ │ │ │ └── img │ │ │ │ │ │ │ ├── metro.gif │ │ │ │ │ │ │ ├── metro.png │ │ │ │ │ │ │ ├── line_conn.png │ │ │ │ │ │ │ └── loading.gif │ │ │ │ │ │ ├── zTreeStyle │ │ │ │ │ │ └── img │ │ │ │ │ │ │ ├── diy │ │ │ │ │ │ │ ├── 2.png │ │ │ │ │ │ │ ├── 3.png │ │ │ │ │ │ │ ├── 4.png │ │ │ │ │ │ │ ├── 5.png │ │ │ │ │ │ │ ├── 6.png │ │ │ │ │ │ │ ├── 7.png │ │ │ │ │ │ │ ├── 8.png │ │ │ │ │ │ │ ├── 9.png │ │ │ │ │ │ │ ├── 1_close.png │ │ │ │ │ │ │ └── 1_open.png │ │ │ │ │ │ │ ├── line_conn.gif │ │ │ │ │ │ │ ├── loading.gif │ │ │ │ │ │ │ ├── zTreeStandard.gif │ │ │ │ │ │ │ └── zTreeStandard.png │ │ │ │ │ │ └── awesomeStyle │ │ │ │ │ │ └── img │ │ │ │ │ │ └── loading.gif │ │ │ │ └── jqgrid │ │ │ │ │ └── ui.jqgrid-bootstrap-ui.css │ │ │ └── css │ │ │ │ └── main.css │ │ ├── banner.txt │ │ ├── kettle.properties │ │ ├── mapper │ │ │ ├── sys │ │ │ │ ├── SysRoleMenuDao.xml │ │ │ │ ├── SysUserRoleDao.xml │ │ │ │ └── SysUserTokenDao.xml │ │ │ ├── app │ │ │ │ └── UserDao.xml │ │ │ └── job │ │ │ │ └── ScheduleJobLogDao.xml │ │ ├── logback-spring.xml │ │ ├── application.yml │ │ ├── views │ │ │ └── modules │ │ │ │ └── sys │ │ │ │ └── log.html │ │ ├── application-pro.yml │ │ └── application-test.yml │ └── java │ │ └── io │ │ └── renren │ │ ├── modules │ │ ├── kettle │ │ │ ├── engine │ │ │ │ ├── extend │ │ │ │ │ └── ReadMe.md │ │ │ │ ├── log │ │ │ │ │ └── Listener.java │ │ │ │ └── common │ │ │ │ │ └── TaskStatus.java │ │ │ └── sys │ │ │ │ ├── job │ │ │ │ ├── dao │ │ │ │ │ └── VJobDao.java │ │ │ │ └── service │ │ │ │ │ └── VJobService.java │ │ │ │ ├── log │ │ │ │ ├── dao │ │ │ │ │ └── JobLogDao.java │ │ │ │ └── service │ │ │ │ │ └── JobLogService.java │ │ │ │ └── task │ │ │ │ ├── dao │ │ │ │ └── CrTaskDao.java │ │ │ │ └── service │ │ │ │ └── CrTaskService.java │ │ ├── app │ │ │ ├── annotation │ │ │ │ ├── Login.java │ │ │ │ └── LoginUser.java │ │ │ ├── dao │ │ │ │ └── UserDao.java │ │ │ ├── service │ │ │ │ └── UserService.java │ │ │ ├── controller │ │ │ │ ├── ApiRegisterController.java │ │ │ │ └── ApiTestController.java │ │ │ └── config │ │ │ │ └── WebMvcConfig.java │ │ ├── sys │ │ │ ├── dao │ │ │ │ ├── SysLogDao.java │ │ │ │ ├── SysRoleDao.java │ │ │ │ ├── SysRoleMenuDao.java │ │ │ │ ├── SysUserRoleDao.java │ │ │ │ ├── SysUserTokenDao.java │ │ │ │ ├── SysConfigDao.java │ │ │ │ ├── SysMenuDao.java │ │ │ │ ├── SysUserDao.java │ │ │ │ └── BaseDao.java │ │ │ ├── service │ │ │ │ ├── SysRoleMenuService.java │ │ │ │ ├── SysUserRoleService.java │ │ │ │ ├── SysLogService.java │ │ │ │ ├── ShiroService.java │ │ │ │ ├── SysUserTokenService.java │ │ │ │ ├── SysRoleService.java │ │ │ │ ├── impl │ │ │ │ │ ├── SysLogServiceImpl.java │ │ │ │ │ ├── SysRoleMenuServiceImpl.java │ │ │ │ │ └── SysUserRoleServiceImpl.java │ │ │ │ ├── SysConfigService.java │ │ │ │ ├── SysUserService.java │ │ │ │ └── SysMenuService.java │ │ │ ├── oauth2 │ │ │ │ ├── OAuth2Token.java │ │ │ │ └── TokenGenerator.java │ │ │ ├── controller │ │ │ │ ├── AbstractController.java │ │ │ │ └── SysLogController.java │ │ │ ├── entity │ │ │ │ ├── SysConfigEntity.java │ │ │ │ ├── SysRoleMenuEntity.java │ │ │ │ ├── SysUserRoleEntity.java │ │ │ │ └── SysUserTokenEntity.java │ │ │ └── redis │ │ │ │ └── SysConfigRedis.java │ │ ├── oss │ │ │ ├── dao │ │ │ │ └── SysOssDao.java │ │ │ ├── service │ │ │ │ ├── SysOssService.java │ │ │ │ └── impl │ │ │ │ │ └── SysOssServiceImpl.java │ │ │ ├── entity │ │ │ │ └── SysOssEntity.java │ │ │ └── cloud │ │ │ │ └── OSSFactory.java │ │ └── job │ │ │ ├── dao │ │ │ ├── ScheduleJobLogDao.java │ │ │ └── ScheduleJobDao.java │ │ │ ├── service │ │ │ ├── ScheduleJobLogService.java │ │ │ ├── impl │ │ │ │ └── ScheduleJobLogServiceImpl.java │ │ │ └── ScheduleJobService.java │ │ │ ├── task │ │ │ └── TestTask.java │ │ │ └── utils │ │ │ └── ScheduleRunnable.java │ │ ├── common │ │ ├── validator │ │ │ ├── group │ │ │ │ ├── AddGroup.java │ │ │ │ ├── AliyunGroup.java │ │ │ │ ├── QcloudGroup.java │ │ │ │ ├── QiniuGroup.java │ │ │ │ ├── UpdateGroup.java │ │ │ │ └── Group.java │ │ │ ├── Assert.java │ │ │ └── ValidatorUtils.java │ │ ├── utils │ │ │ ├── RedisKeys.java │ │ │ ├── ConfigConstant.java │ │ │ ├── HttpContextUtils.java │ │ │ ├── DateUtils.java │ │ │ ├── R.java │ │ │ ├── SpringContextUtils.java │ │ │ └── ShiroUtils.java │ │ ├── annotation │ │ │ └── SysLog.java │ │ ├── xss │ │ │ ├── XssFilter.java │ │ │ └── SQLFilter.java │ │ ├── exception │ │ │ ├── RRException.java │ │ │ └── RRExceptionHandler.java │ │ └── aspect │ │ │ └── RedisAspect.java │ │ ├── datasources │ │ ├── DataSourceNames.java │ │ ├── annotation │ │ │ └── DataSource.java │ │ ├── DataSourceTestService.java │ │ └── DynamicDataSource.java │ │ ├── RenrenApplication.java │ │ └── config │ │ └── KaptchaConfig.java └── test │ └── java │ └── io │ └── renren │ ├── JwtTest.java │ ├── RedisTest.java │ └── DynamicDataSourceTest.java ├── kettle └── src │ └── main │ └── java │ ├── my │ └── study │ │ ├── utils │ │ ├── RarUtil.java │ │ ├── ZipUtil.java │ │ ├── RarUtilPwd.java │ │ ├── DruidCrypt.java │ │ ├── FileUtil.java │ │ └── HttpUtl.java │ │ ├── kettle │ │ ├── common │ │ │ ├── KuConst.java │ │ │ └── CommonUtil.java │ │ ├── KettleUtilData.java │ │ ├── demo │ │ │ └── JeurDemo.java │ │ └── jobentry │ │ │ └── JobEntryKettleUtilRunBase.java │ │ └── constants │ │ └── UtilConst.java │ └── org │ └── beetl │ └── sql │ └── core │ └── db │ ├── MyDBStyle.java │ ├── LowerCaseNameConversion.java │ └── PostgresStyleMineMine.java ├── doc ├── kettle.sql └── renren_fast.sql ├── Dockerfile ├── docker-compose.yml └── .idea └── libraries ├── Maven__xom_xom_1_1.xml ├── Maven__jdom_jdom_1_0.xml ├── Maven__oro_oro_2_0_8.xml ├── Maven__rhino_js_1_7R3.xml ├── Maven__ognl_ognl_2_6_9.xml ├── Maven__org_tukaani_xz_1_0.xml ├── Maven__dom4j_dom4j_1_6_1.xml ├── Maven__jaxen_jaxen_1_1_1.xml ├── Maven__xalan_xalan_2_6_0.xml ├── Maven__log4j_log4j_1_2_16.xml ├── Maven__javax_mail_mail_1_3_2.xml ├── Maven__org_apache_poi_poi_3_15.xml ├── Maven__stax_stax_api_1_0_1.xml ├── Maven__com_ibeetl_beetl_2_2_5.xml ├── Maven__com_jcraft_jsch_0_1_46.xml ├── Maven__jfree_jcommon_1_0_16.xml ├── Maven__com_alibaba_druid_1_0_28.xml ├── Maven__jug_lgpl_jug_lgpl_2_0_0.xml ├── Maven__com_google_guava_guava_17_0.xml ├── Maven__jfree_jfreechart_1_0_13.xml ├── Maven__xerces_xercesImpl_2_0_2.xml ├── Maven__xml_apis_xml_apis_1_0_b2.xml ├── Maven__commons_io_commons_io_1_4.xml ├── Maven__org_owasp_esapi_esapi_2_0_1.xml ├── Maven__org_samba_jcifs_jcifs_1_3_3.xml ├── Maven__org_slf4j_slf4j_api_1_6_1.xml ├── Maven__com_alibaba_fastjson_1_2_0.xml ├── Maven__com_ibeetl_beetlsql_2_8_13.xml ├── Maven__com_verhas_license3j_1_0_7.xml ├── Maven__com_alibaba_fastjson_1_1_43.xml ├── Maven__org_apache_xmlgraphics_fop_0_94.xml ├── Maven__org_eclipse_swt_3_3_0_v3346.xml ├── Maven__org_beanshell_bsh_core_2_0b4.xml ├── Maven__org_mortbay_jetty_jetty_6_1_21.xml ├── Maven__javax_ws_rs_jsr311_api_1_1_1.xml ├── Maven__org_apache_poi_poi_ooxml_3_15.xml ├── Maven__xerces_xmlParserAPIs_2_6_2.xml ├── Maven__commons_net_commons_net_1_4_1.xml ├── Maven__org_antlr_antlr4_runtime_4_2.xml ├── Maven__xml_apis_xml_apis_ext_1_3_04.xml ├── Maven__com_github_stuxuhai_jpinyin_1_1_8.xml ├── Maven__commons_codec_commons_codec_1_5.xml ├── Maven__javassist_javassist_3_12_1_GA.xml ├── Maven__org_slf4j_slf4j_log4j12_1_6_1.xml ├── Maven__simple_jndi_simple_jndi_0_11_3.xml ├── Maven__commons_dbcp_commons_dbcp_1_2_1.xml ├── Maven__commons_pool_commons_pool_1_5_7.xml ├── Maven__org_apache_xmlgraphics_batik_js_1_7.xml ├── Maven__org_owasp_antisamy_antisamy_1_4_3.xml ├── Maven__pentaho_metastore_5_4_1_8_209.xml ├── Maven__com_github_virtuald_curvesapi_1_04.xml ├── Maven__javax_activation_activation_1_0_2.xml ├── Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml ├── Maven__com_sun_jersey_jersey_core_1_19_1.xml ├── Maven__org_apache_xmlgraphics_batik_css_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_dom_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_ext_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_gvt_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_xml_1_7.xml ├── Maven__org_bouncycastle_bcpg_jdk15on_1_52.xml ├── Maven__org_antlr_antlr4_annotations_4_2.xml ├── Maven__org_apache_commons_commons_vfs2_2_2.xml ├── Maven__org_mortbay_jetty_jetty_util_6_1_21.xml ├── Maven__org_apache_commons_commons_lang3_3_4.xml ├── Maven__org_apache_xmlgraphics_batik_anim_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_util_1_7.xml ├── Maven__org_scannotation_scannotation_1_0_3.xml ├── Maven__com_sun_jersey_jersey_client_1_19_1.xml ├── Maven__org_apache_xmlgraphics_batik_codec_1_7.xml ├── Maven__secondstring_secondstring_20060615.xml ├── Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml ├── Maven__commons_digester_commons_digester_1_8.xml ├── Maven__net_sf_scannotation_scannotation_1_0_2.xml ├── Maven__net_sourceforge_nekohtml_nekohtml_1_9_12.xml ├── Maven__org_apache_xmlgraphics_batik_bridge_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_parser_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_script_1_7.xml ├── Maven__org_apache_xmlgraphics_batik_svggen_1_7.xml ├── Maven__org_apache_poi_poi_ooxml_schemas_3_15.xml ├── Maven__org_apache_xmlgraphics_batik_svg_dom_1_7.xml ├── Maven__org_apache_commons_commons_compress_1_4.xml ├── Maven__org_eclipse_swt_swt_linux_x86_64_4_3_2.xml ├── Maven__pentaho_pentaho_xul_swt_5_4_1_8_209.xml ├── Maven__org_apache_xmlgraphics_batik_awt_util_1_7.xml ├── Maven__pentaho_kettle_kettle_core_5_4_1_8_209.xml ├── Maven__pentaho_pentaho_xul_core_5_4_1_8_209.xml ├── Maven__commons_fileupload_commons_fileupload_1_2.xml ├── Maven__commons_httpclient_commons_httpclient_3_1.xml ├── Maven__org_eclipse_jface_3_3_0_I20070606_0010.xml ├── Maven__commons_beanutils_commons_beanutils_1_8_0.xml ├── Maven__org_apache_xmlgraphics_batik_transcoder_1_7.xml ├── Maven__org_eclipse_equinox_common_3_3_0_v20070426.xml ├── Maven__pentaho_kettle_kettle_engine_5_4_1_8_209.xml ├── Maven__pentaho_kettle_kettle_ui_swt_5_4_1_8_209.xml ├── Maven__pentaho_pentaho_xul_swing_5_4_1_8_209.xml ├── Maven__commons_vfs_commons_vfs_20100924_pentaho.xml ├── Maven__org_mortbay_jetty_servlet_api_2_5_20081211.xml ├── Maven__org_apache_commons_commons_collections4_4_1.xml ├── Maven__pentaho_kettle_kettle_dbdialog_5_4_1_8_209.xml ├── Maven__pentaho_pentaho_vfs_browser_5_4_1_8_209.xml ├── Maven__org_apache_xmlgraphics_xmlgraphics_commons_1_2.xml ├── Maven__commons_configuration_commons_configuration_1_5.xml ├── Maven__commons_beanutils_commons_beanutils_core_1_7_0.xml ├── Maven__org_eclipse_core_commands_3_3_0_I20070605_0010.xml ├── Maven__org_apache_avalon_framework_avalon_framework_api_4_3_1.xml ├── Maven__org_abego_treelayout_org_abego_treelayout_core_1_0_1.xml ├── Maven__org_apache_avalon_framework_avalon_framework_impl_4_3_1.xml └── Maven__org_eclipse_swt_org_eclipse_swt_win32_win32_x86_4_3.xml /src/main/resources/static/swagger/css/typography.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/utils/RarUtil.java: -------------------------------------------------------------------------------- 1 | package my.study.utils; -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/utils/ZipUtil.java: -------------------------------------------------------------------------------- 1 | package my.study.utils; -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/utils/RarUtilPwd.java: -------------------------------------------------------------------------------- 1 | package my.study.utils; -------------------------------------------------------------------------------- /doc/kettle.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/doc/kettle.sql -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/engine/extend/ReadMe.md: -------------------------------------------------------------------------------- 1 | 2 | - 这样的作业可以作为KM作业使用,也可以用于定时调度使用。 -------------------------------------------------------------------------------- /doc/renren_fast.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/doc/renren_fast.sql -------------------------------------------------------------------------------- /src/main/resources/static/swagger/swagger-ui.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui.css","sources":[],"mappings":"","sourceRoot":""} -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/static/swagger/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/favicon-16x16.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/favicon-32x32.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/expand.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/expand.gif -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/favicon.ico -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM java:8 2 | EXPOSE 8080 3 | 4 | VOLUME /tmp 5 | ADD renren-fast.jar /app.jar 6 | RUN bash -c 'touch /app.jar' 7 | ENTRYPOINT ["java","-jar","/app.jar"] 8 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/fonts/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/fonts/DroidSans.ttf -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/collapse.gif -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/throbber.gif -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/plugins/treegrid/img/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/treegrid/img/expand.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/treegrid/img/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/treegrid/img/file.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/treegrid/img/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/treegrid/img/folder.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/logo_small.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/wordnik_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/wordnik_api.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/treegrid/img/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/treegrid/img/collapse.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/fonts/DroidSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/fonts/DroidSans-Bold.ttf -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/explorer_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/explorer_icons.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/favicon-16x16.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/favicon-32x32.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/images/pet_store_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/swagger/images/pet_store_api.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/layer/skin/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/layer/skin/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/layer/skin/moon/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/layer/skin/moon/default.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | renren-fast: 4 | image: renren/fast 5 | ports: 6 | - "8080:8080" 7 | environment: 8 | - spring.profiles.active=dev -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/resources/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/plugins/layer/skin/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/layer/skin/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/layer/skin/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/layer/skin/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/layer/skin/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/layer/skin/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/layer/skin/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/layer/skin/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/metroStyle/img/metro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/metroStyle/img/metro.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/metroStyle/img/metro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/metroStyle/img/metro.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/2.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/3.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/4.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/5.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/6.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/7.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/8.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/9.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/awesomeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/awesomeStyle/img/loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/metroStyle/img/line_conn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/metroStyle/img/line_conn.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/metroStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/metroStyle/img/loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/line_conn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/line_conn.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/1_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/1_close.png -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/1_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/diy/1_open.png -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/kettle/common/KuConst.java: -------------------------------------------------------------------------------- 1 | package my.study.kettle.common; 2 | 3 | public class KuConst implements KuConstInterface { 4 | public static String DATASOURCE_KETTLE = "kettle"; 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/zTreeStandard.gif -------------------------------------------------------------------------------- /src/main/resources/static/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/konglinghai123/renren_kettle/HEAD/src/main/resources/static/plugins/ztree/css/zTreeStyle/img/zTreeStandard.png -------------------------------------------------------------------------------- /src/main/resources/static/swagger/swagger-ui.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AAylFA;;;;;;AAg5CA;AA2pHA;AA6qIA;AAi+FA;AAyvDA;AAmzCA;AA+xCA","sourceRoot":""} -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/engine/log/Listener.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.engine.log; 2 | 3 | import org.pentaho.di.job.Job; 4 | 5 | public interface Listener { 6 | void handleMsg(Job job, String msg); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/static/plugins/treegrid/jquery.treegrid.bootstrap3.js: -------------------------------------------------------------------------------- 1 | $.extend($.fn.treegrid.defaults, { 2 | expanderExpandedClass: 'glyphicon glyphicon-chevron-down', 3 | expanderCollapsedClass: 'glyphicon glyphicon-chevron-right' 4 | }); 5 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/validator/group/AddGroup.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.validator.group; 2 | 3 | /** 4 | * 新增数据 Group 5 | * @author chenshun 6 | * @email sunlightcs@gmail.com 7 | * @date 2017-03-16 0:04 8 | */ 9 | public interface AddGroup { 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/validator/group/AliyunGroup.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.validator.group; 2 | 3 | /** 4 | * 阿里云 5 | * @author chenshun 6 | * @email sunlightcs@gmail.com 7 | * @date 2017-03-28 13:51 8 | */ 9 | public interface AliyunGroup { 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/validator/group/QcloudGroup.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.validator.group; 2 | 3 | /** 4 | * 腾讯云 5 | * @author chenshun 6 | * @email sunlightcs@gmail.com 7 | * @date 2017-03-28 13:51 8 | */ 9 | public interface QcloudGroup { 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/validator/group/QiniuGroup.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.validator.group; 2 | 3 | /** 4 | * 七牛 5 | * @author chenshun 6 | * @email sunlightcs@gmail.com 7 | * @date 2017-03-28 13:51 8 | */ 9 | public interface QiniuGroup { 10 | } 11 | -------------------------------------------------------------------------------- /kettle/src/main/java/org/beetl/sql/core/db/MyDBStyle.java: -------------------------------------------------------------------------------- 1 | package org.beetl.sql.core.db; 2 | 3 | import org.beetl.sql.core.SQLSource; 4 | 5 | public interface MyDBStyle extends DBStyle{ 6 | 7 | SQLSource genSelectVal(String val); 8 | 9 | String Date14Exp(); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/swagger-ui-standalone-preset.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;AA+uFA;;;;;AAyOA;AAo7GA;AAw0FA;;;;;;AAmZA;AAivFA;AAu+CA;AAo+CA;AAirCA;AAuyEA","sourceRoot":""} -------------------------------------------------------------------------------- /src/main/java/io/renren/common/validator/group/UpdateGroup.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.validator.group; 2 | 3 | /** 4 | * 更新数据 Group 5 | * @author chenshun 6 | * @email sunlightcs@gmail.com 7 | * @date 2017-03-15 21:21 8 | */ 9 | 10 | public interface UpdateGroup { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/datasources/DataSourceNames.java: -------------------------------------------------------------------------------- 1 | package io.renren.datasources; 2 | 3 | /** 4 | * 增加多数据源,在此配置 5 | * 6 | * @author chenshun 7 | * @email sunlightcs@gmail.com 8 | * @date 2017/8/18 23:46 9 | */ 10 | public interface DataSourceNames { 11 | String FIRST = "first"; 12 | String SECOND = "second"; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ==================================================================================================================== 2 | 3 | 欢迎使用 renren-fast 人人快速开发平台 - Powered By http://www.renren.io/open/ 4 | 5 | ==================================================================================================================== -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/engine/common/TaskStatus.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.engine.common; 2 | 3 | public class TaskStatus { 4 | /** 暂停 **/ 5 | public static final int STATE_STOP = 0; 6 | /** 运行 **/ 7 | public static final int STATE_START = 1; 8 | /** 异常 **/ 9 | public static final int STATE_EXCEPTION = 2; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/lib/highlight.9.1.0.pack_extended.js: -------------------------------------------------------------------------------- 1 | "use strict";!function(){var h,l;h=hljs.configure,hljs.configure=function(l){var i=l.highlightSizeThreshold;hljs.highlightSizeThreshold=i===+i?i:null,h.call(this,l)},l=hljs.highlightBlock,hljs.highlightBlock=function(h){var i=h.innerHTML,g=hljs.highlightSizeThreshold;(null==g||g>i.length)&&l.call(hljs,h)}}(); -------------------------------------------------------------------------------- /src/main/java/io/renren/common/utils/RedisKeys.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.utils; 2 | 3 | /** 4 | * Redis所有Keys 5 | * 6 | * @author chenshun 7 | * @email sunlightcs@gmail.com 8 | * @date 2017-07-18 19:51 9 | */ 10 | public class RedisKeys { 11 | 12 | public static String getSysConfigKey(String key){ 13 | return "sys:config:" + key; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/kettle/KettleUtilData.java: -------------------------------------------------------------------------------- 1 | package my.study.kettle; 2 | 3 | import org.pentaho.di.core.row.RowMetaInterface; 4 | import org.pentaho.di.trans.step.BaseStepData; 5 | import org.pentaho.di.trans.step.StepDataInterface; 6 | 7 | public class KettleUtilData extends BaseStepData implements StepDataInterface { 8 | public RowMetaInterface outputRowMeta; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/utils/ConfigConstant.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.utils; 2 | 3 | /** 4 | * 系统参数相关Key 5 | * @author chenshun 6 | * @email sunlightcs@gmail.com 7 | * @date 2017-03-26 10:33 8 | */ 9 | public class ConfigConstant { 10 | /** 11 | * 云存储配置KEY 12 | */ 13 | public final static String CLOUD_STORAGE_CONFIG_KEY = "CLOUD_STORAGE_CONFIG_KEY"; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/app/annotation/Login.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.app.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * app登录效验 7 | * @author chenshun 8 | * @email sunlightcs@gmail.com 9 | * @date 2017/9/23 14:30 10 | */ 11 | @Target(ElementType.METHOD) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Documented 14 | public @interface Login { 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/lib/object-assign-pollyfill.js: -------------------------------------------------------------------------------- 1 | "function"!=typeof Object.assign&&!function(){Object.assign=function(n){"use strict";if(void 0===n||null===n)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(n),o=1;o { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/io/renren/datasources/annotation/DataSource.java: -------------------------------------------------------------------------------- 1 | package io.renren.datasources.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * 多数据源注解 7 | * @author chenshun 8 | * @email sunlightcs@gmail.com 9 | * @date 2017/9/16 22:16 10 | */ 11 | @Target(ElementType.METHOD) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Documented 14 | public @interface DataSource { 15 | String name() default ""; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/oss/dao/SysOssDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.oss.dao; 2 | 3 | import io.renren.modules.oss.entity.SysOssEntity; 4 | import io.renren.modules.sys.dao.BaseDao; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * 文件上传 9 | * 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2017-03-25 12:13:26 13 | */ 14 | @Mapper 15 | public interface SysOssDao extends BaseDao { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xom_xom_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/sys/job/dao/VJobDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.sys.job.dao; 2 | 3 | 4 | import io.renren.modules.kettle.sys.job.entity.VJobEntity; 5 | import io.renren.modules.sys.dao.BaseDao; 6 | import org.apache.ibatis.annotations.Mapper; 7 | 8 | /** 9 | * VIEW 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2018-01-20 13:52:22 14 | */ 15 | @Mapper 16 | public interface VJobDao extends BaseDao { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/swagger-ui-bundle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAitFA;;;;;;AAoIA;AAy2FA;AA8iCA;AA6lJA;AA8vIA;AA8iFA;AAi4GA;AA8jFA;AAu0FA;AA89CA;AAy9CA;AA+qCA;AAs0EA;;;;;AAw/CA;AA8zJA;;;;;;;;;;;;;;AAyoFA;AA+lIA;AA4oJA;AAqvHA;AAsvGA;AA2iEA;AAy5DA;AA65DA;AAAA;;;;;;AAk8GA;AA2nHA;;;;;AAkoDA;AAgsFA;AA6kDA;AAq3CA;AA4wFA;AAk3CA;AA8iFA;;;;;;;;;AA2qEA;AA2zIA;AAu7FA;AAmrFA;AAwiHA","sourceRoot":""} -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/job/dao/ScheduleJobLogDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.job.dao; 2 | 3 | import io.renren.modules.job.entity.ScheduleJobLogEntity; 4 | import io.renren.modules.sys.dao.BaseDao; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * 定时任务日志 9 | * 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2016年12月1日 下午10:30:02 13 | */ 14 | @Mapper 15 | public interface ScheduleJobLogDao extends BaseDao { 16 | 17 | } 18 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jdom_jdom_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/app/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.app.dao; 2 | 3 | import io.renren.modules.app.entity.UserEntity; 4 | import io.renren.modules.sys.dao.BaseDao; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * 用户 9 | * 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2017-03-23 15:22:06 13 | */ 14 | @Mapper 15 | public interface UserDao extends BaseDao { 16 | 17 | UserEntity queryByMobile(String mobile); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/sys/log/dao/JobLogDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.sys.log.dao; 2 | 3 | 4 | import io.renren.modules.kettle.sys.log.entity.JobLogEntity; 5 | import io.renren.modules.sys.dao.BaseDao; 6 | import org.apache.ibatis.annotations.Mapper; 7 | 8 | /** 9 | * 作业日志 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2018-01-20 13:52:11 14 | */ 15 | @Mapper 16 | public interface JobLogDao extends BaseDao { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__oro_oro_2_0_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__rhino_js_1_7R3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/sys/task/dao/CrTaskDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.sys.task.dao; 2 | 3 | 4 | import io.renren.modules.kettle.sys.task.entity.CrTaskEntity; 5 | import io.renren.modules.sys.dao.BaseDao; 6 | import org.apache.ibatis.annotations.Mapper; 7 | 8 | /** 9 | * km作业定时任务表 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2018-01-20 13:51:19 14 | */ 15 | @Mapper 16 | public interface CrTaskDao extends BaseDao { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysRoleMenuService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import java.util.List; 4 | 5 | 6 | 7 | /** 8 | * 角色与菜单对应关系 9 | * 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2016年9月18日 上午9:42:30 13 | */ 14 | public interface SysRoleMenuService { 15 | 16 | void saveOrUpdate(Long roleId, List menuIdList); 17 | 18 | /** 19 | * 根据角色ID,获取菜单ID列表 20 | */ 21 | List queryMenuIdList(Long roleId); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ognl_ognl_2_6_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/utils/HttpContextUtils.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.utils; 2 | 3 | import org.springframework.web.context.request.RequestContextHolder; 4 | import org.springframework.web.context.request.ServletRequestAttributes; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | public class HttpContextUtils { 9 | 10 | public static HttpServletRequest getHttpServletRequest() { 11 | return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_tukaani_xz_1_0.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__jaxen_jaxen_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xalan_xalan_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__log4j_log4j_1_2_16.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/app/annotation/LoginUser.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.app.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 登录用户信息 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2017-03-23 20:39 14 | */ 15 | @Target(ElementType.PARAMETER) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | public @interface LoginUser { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysUserRoleService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import java.util.List; 4 | 5 | 6 | 7 | /** 8 | * 用户与角色对应关系 9 | * 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2016年9月18日 上午9:43:24 13 | */ 14 | public interface SysUserRoleService { 15 | 16 | void saveOrUpdate(Long userId, List roleIdList); 17 | 18 | /** 19 | * 根据用户ID,获取角色ID列表 20 | */ 21 | List queryRoleIdList(Long userId); 22 | 23 | void delete(Long userId); 24 | } 25 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_mail_mail_1_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/SysRoleDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import io.renren.modules.sys.entity.SysRoleEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 角色管理 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年9月18日 上午9:33:33 14 | */ 15 | @Mapper 16 | public interface SysRoleDao extends BaseDao { 17 | 18 | /** 19 | * 查询用户创建的角色ID列表 20 | */ 21 | List queryRoleIdList(Long createUserId); 22 | } 23 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_3_15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__stax_stax_api_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_ibeetl_beetl_2_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_jcraft_jsch_0_1_46.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jfree_jcommon_1_0_16.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_alibaba_druid_1_0_28.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/SysRoleMenuDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import io.renren.modules.sys.entity.SysRoleMenuEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 角色与菜单对应关系 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年9月18日 上午9:33:46 14 | */ 15 | @Mapper 16 | public interface SysRoleMenuDao extends BaseDao { 17 | 18 | /** 19 | * 根据角色ID,获取菜单ID列表 20 | */ 21 | List queryMenuIdList(Long roleId); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/SysUserRoleDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import io.renren.modules.sys.entity.SysUserRoleEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 用户与角色对应关系 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年9月18日 上午9:34:46 14 | */ 15 | @Mapper 16 | public interface SysUserRoleDao extends BaseDao { 17 | 18 | /** 19 | * 根据用户ID,获取角色ID列表 20 | */ 21 | List queryRoleIdList(Long userId); 22 | } 23 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jug_lgpl_jug_lgpl_2_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/SysUserTokenDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import io.renren.modules.sys.entity.SysUserTokenEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | /** 7 | * 系统用户Token 8 | * 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2017-03-23 15:22:07 12 | */ 13 | @Mapper 14 | public interface SysUserTokenDao extends BaseDao { 15 | 16 | SysUserTokenEntity queryByUserId(Long userId); 17 | 18 | SysUserTokenEntity queryByToken(String token); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/lib/jquery.wiggle.min.js: -------------------------------------------------------------------------------- 1 | jQuery.fn.wiggle=function(e){var a={speed:50,wiggles:3,travel:5,callback:null},e=jQuery.extend(a,e);return this.each(function(){var a=this,l=(jQuery(this).wrap('
').css("position","relative"),0);for(i=1;i<=e.wiggles;i++)jQuery(this).animate({left:"-="+e.travel},e.speed).animate({left:"+="+2*e.travel},2*e.speed).animate({left:"-="+e.travel},e.speed,function(){l++,jQuery(a).parent().hasClass("wiggle-wrap")&&jQuery(a).parent().replaceWith(a),l==e.wiggles&&jQuery.isFunction(e.callback)&&e.callback()})})}; -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_guava_guava_17_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jfree_jfreechart_1_0_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xerces_xercesImpl_2_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xml_apis_xml_apis_1_0_b2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_io_commons_io_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_owasp_esapi_esapi_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_samba_jcifs_jcifs_1_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_alibaba_fastjson_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_ibeetl_beetlsql_2_8_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_verhas_license3j_1_0_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_alibaba_fastjson_1_1_43.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_fop_0_94.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_swt_3_3_0_v3346.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/kettle.properties: -------------------------------------------------------------------------------- 1 | #kettle资源库数据库连接地址 2 | kettle.url=jdbc:mysql://127.0.0.1:3306/kettle?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull 3 | #数据库用户名 4 | kettle.username=root 5 | #数据库密码 6 | kettle.password=123456 7 | #Kettle相关配置 8 | #本应用操作的作业视图 9 | job_view_name = v_job 10 | #本项目代码 11 | project_code = KM_LOCALHOST_82 12 | #kettle资源库登陆信息 13 | kettle_username=admin 14 | kettle_password=admin 15 | #资源库所在的数据库的连接信息在simple-jndi的jdbc.properties配置文件中的代码 16 | rep_jndi_code=kettle 17 | #kettle的data-integration目录 18 | kettle_home = D:/data-integration-5.4 19 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_beanshell_bsh_core_2_0b4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_jetty_6_1_21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/o2c.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_ws_rs_jsr311_api_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xerces_xmlParserAPIs_2_6_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/job/dao/ScheduleJobDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.job.dao; 2 | 3 | import io.renren.modules.job.entity.ScheduleJobEntity; 4 | import io.renren.modules.sys.dao.BaseDao; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.Map; 8 | 9 | /** 10 | * 定时任务 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2016年12月1日 下午10:29:57 15 | */ 16 | @Mapper 17 | public interface ScheduleJobDao extends BaseDao { 18 | 19 | /** 20 | * 批量更新状态 21 | */ 22 | int updateBatch(Map map); 23 | } 24 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_net_commons_net_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_antlr_antlr4_runtime_4_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xml_apis_xml_apis_ext_1_3_04.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_stuxuhai_jpinyin_1_1_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_codec_commons_codec_1_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javassist_javassist_3_12_1_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_log4j12_1_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__simple_jndi_simple_jndi_0_11_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/annotation/SysLog.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.annotation; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | /** 10 | * 系统日志注解 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2017年3月8日 上午10:19:56 15 | */ 16 | @Target(ElementType.METHOD) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Documented 19 | public @interface SysLog { 20 | 21 | String value() default ""; 22 | } 23 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_dbcp_commons_dbcp_1_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_pool_commons_pool_1_5_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_js_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_owasp_antisamy_antisamy_1_4_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_metastore_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_virtuald_curvesapi_1_04.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_activation_activation_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_jersey_core_1_19_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_css_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_dom_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_ext_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_gvt_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_xml_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_bouncycastle_bcpg_jdk15on_1_52.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_antlr_antlr4_annotations_4_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_vfs2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_jetty_util_6_1_21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/utils/DruidCrypt.java: -------------------------------------------------------------------------------- 1 | package my.study.utils; 2 | 3 | import com.alibaba.druid.filter.config.ConfigTools; 4 | 5 | public class DruidCrypt { 6 | 7 | public static String[] encrypt(String pwd) throws Exception { 8 | String[] result = new String[2]; 9 | String[] arr = ConfigTools.genKeyPair(512); 10 | result[0] = ConfigTools.encrypt(arr[0], pwd); 11 | result[1] = arr[1]; 12 | return result; 13 | } 14 | 15 | public static String decrypt(String crypt, String pk) throws Exception { 16 | return ConfigTools.decrypt(ConfigTools.getPublicKey(pk), crypt); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.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_xmlgraphics_batik_anim_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_util_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_scannotation_scannotation_1_0_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_jersey_client_1_19_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_codec_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__secondstring_secondstring_20060615.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_digester_commons_digester_1_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sf_scannotation_scannotation_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sourceforge_nekohtml_nekohtml_1_9_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_bridge_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_parser_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_script_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_svggen_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_svg_dom_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_compress_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_swt_swt_linux_x86_64_4_3_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_pentaho_xul_swt_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_awt_util_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_kettle_kettle_core_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_pentaho_xul_core_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_httpclient_commons_httpclient_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_jface_3_3_0_I20070606_0010.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysLogService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import io.renren.modules.sys.entity.SysLogEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 系统日志 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2017-03-08 10:40:56 14 | */ 15 | public interface SysLogService { 16 | 17 | SysLogEntity queryObject(Long id); 18 | 19 | List queryList(Map map); 20 | 21 | int queryTotal(Map map); 22 | 23 | void save(SysLogEntity sysLog); 24 | 25 | void delete(Long id); 26 | 27 | void deleteBatch(Long[] ids); 28 | } 29 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_batik_transcoder_1_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_equinox_common_3_3_0_v20070426.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_kettle_kettle_engine_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_kettle_kettle_ui_swt_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_pentaho_xul_swing_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/oauth2/OAuth2Token.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.oauth2; 2 | 3 | 4 | import org.apache.shiro.authc.AuthenticationToken; 5 | 6 | /** 7 | * token 8 | * 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2017-05-20 13:22 12 | */ 13 | public class OAuth2Token implements AuthenticationToken { 14 | private String token; 15 | 16 | public OAuth2Token(String token){ 17 | this.token = token; 18 | } 19 | 20 | @Override 21 | public String getPrincipal() { 22 | return token; 23 | } 24 | 25 | @Override 26 | public Object getCredentials() { 27 | return token; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/test/java/io/renren/JwtTest.java: -------------------------------------------------------------------------------- 1 | package io.renren; 2 | 3 | import io.renren.modules.app.utils.JwtUtils; 4 | import org.junit.Test; 5 | import org.junit.runner.RunWith; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | import org.springframework.test.context.junit4.SpringRunner; 9 | 10 | 11 | @RunWith(SpringRunner.class) 12 | @SpringBootTest 13 | public class JwtTest { 14 | @Autowired 15 | private JwtUtils jwtUtils; 16 | 17 | @Test 18 | public void test() { 19 | String token = jwtUtils.generateToken(1); 20 | 21 | System.out.println(token); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_vfs_commons_vfs_20100924_pentaho.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_servlet_api_2_5_20081211.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_kettle_kettle_dbdialog_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__pentaho_pentaho_vfs_browser_5_4_1_8_209.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/utils/FileUtil.java: -------------------------------------------------------------------------------- 1 | package my.study.utils; 2 | 3 | import org.apache.commons.io.FileUtils; 4 | import org.apache.commons.logging.Log; 5 | import org.apache.commons.logging.LogFactory; 6 | 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | 10 | public class FileUtil extends FileUtils { 11 | 12 | private static Log log = LogFactory.getLog(FileUtil.class); 13 | 14 | 15 | public static void closeInputStream(InputStream is) { 16 | try { 17 | if(is != null) { 18 | is.close(); 19 | } 20 | } catch (IOException var2) { 21 | log.error("关闭文件流失败:" + is.toString(), var2); 22 | } 23 | 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/ShiroService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import io.renren.modules.sys.entity.SysUserEntity; 4 | import io.renren.modules.sys.entity.SysUserTokenEntity; 5 | 6 | import java.util.Set; 7 | 8 | /** 9 | * shiro相关接口 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2017-06-06 8:49 13 | */ 14 | public interface ShiroService { 15 | /** 16 | * 获取用户权限列表 17 | */ 18 | Set getUserPermissions(long userId); 19 | 20 | SysUserTokenEntity queryByToken(String token); 21 | 22 | /** 23 | * 根据用户ID,查询用户 24 | * @param userId 25 | */ 26 | SysUserEntity queryUser(Long userId); 27 | } 28 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlgraphics_xmlgraphics_commons_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/SysConfigDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import io.renren.modules.sys.entity.SysConfigEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | /** 8 | * 系统配置信息 9 | * 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2016年12月4日 下午6:46:16 13 | */ 14 | @Mapper 15 | public interface SysConfigDao extends BaseDao { 16 | 17 | /** 18 | * 根据key,查询value 19 | */ 20 | SysConfigEntity queryByKey(String paramKey); 21 | 22 | /** 23 | * 根据key,更新value 24 | */ 25 | int updateValueByKey(@Param("key") String key, @Param("value") String value); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_configuration_commons_configuration_1_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_beanutils_commons_beanutils_core_1_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/validator/Assert.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.validator; 2 | 3 | import io.renren.common.exception.RRException; 4 | import org.apache.commons.lang.StringUtils; 5 | 6 | /** 7 | * 数据校验 8 | * @author chenshun 9 | * @email sunlightcs@gmail.com 10 | * @date 2017-03-23 15:50 11 | */ 12 | public abstract class Assert { 13 | 14 | public static void isBlank(String str, String message) { 15 | if (StringUtils.isBlank(str)) { 16 | throw new RRException(message); 17 | } 18 | } 19 | 20 | public static void isNull(Object object, String message) { 21 | if (object == null) { 22 | throw new RRException(message); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_core_commands_3_3_0_I20070605_0010.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/oss/service/SysOssService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.oss.service; 2 | 3 | import io.renren.modules.oss.entity.SysOssEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 文件上传 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2017-03-25 12:13:26 14 | */ 15 | public interface SysOssService { 16 | 17 | SysOssEntity queryObject(Long id); 18 | 19 | List queryList(Map map); 20 | 21 | int queryTotal(Map map); 22 | 23 | void save(SysOssEntity sysOss); 24 | 25 | void update(SysOssEntity sysOss); 26 | 27 | void delete(Long id); 28 | 29 | void deleteBatch(Long[] ids); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/sys/job/service/VJobService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.sys.job.service; 2 | 3 | import io.renren.modules.kettle.sys.job.entity.VJobEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * VIEW 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2018-01-20 13:52:22 14 | */ 15 | public interface VJobService { 16 | 17 | VJobEntity queryObject(Long idJob); 18 | 19 | List queryList(Map map); 20 | 21 | int queryTotal(Map map); 22 | 23 | void save(VJobEntity vJob); 24 | 25 | void update(VJobEntity vJob); 26 | 27 | void delete(Long idJob); 28 | 29 | void deleteBatch(Long[] idJobs); 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/controller/AbstractController.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.controller; 2 | 3 | import io.renren.modules.sys.entity.SysUserEntity; 4 | import org.apache.shiro.SecurityUtils; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | /** 9 | * Controller公共组件 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年11月9日 下午9:42:26 14 | */ 15 | public abstract class AbstractController { 16 | protected Logger logger = LoggerFactory.getLogger(getClass()); 17 | 18 | protected SysUserEntity getUser() { 19 | return (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); 20 | } 21 | 22 | protected Long getUserId() { 23 | return getUser().getUserId(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_api_4_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_abego_treelayout_org_abego_treelayout_core_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_avalon_framework_avalon_framework_impl_4_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysUserTokenService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import io.renren.modules.sys.entity.SysUserTokenEntity; 4 | import io.renren.common.utils.R; 5 | 6 | /** 7 | * 用户Token 8 | * 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2017-03-23 15:22:07 12 | */ 13 | public interface SysUserTokenService { 14 | 15 | SysUserTokenEntity queryByUserId(Long userId); 16 | 17 | void save(SysUserTokenEntity token); 18 | 19 | void update(SysUserTokenEntity token); 20 | 21 | /** 22 | * 生成token 23 | * @param userId 用户ID 24 | */ 25 | R createToken(long userId); 26 | 27 | /** 28 | * 退出,修改token值 29 | * @param userId 用户ID 30 | */ 31 | void logout(long userId); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_swt_org_eclipse_swt_win32_win32_x86_4_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/SysMenuDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import io.renren.modules.sys.entity.SysMenuEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * 菜单管理 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年9月18日 上午9:33:01 14 | */ 15 | @Mapper 16 | public interface SysMenuDao extends BaseDao { 17 | 18 | /** 19 | * 根据父菜单,查询子菜单 20 | * @param parentId 父菜单ID 21 | */ 22 | List queryListParentId(Long parentId); 23 | 24 | /** 25 | * 获取不包含按钮的菜单列表 26 | */ 27 | List queryNotButtonList(); 28 | 29 | /** 30 | * 查询用户的权限列表 31 | */ 32 | List queryUserList(Long userId); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/sys/log/service/JobLogService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.sys.log.service; 2 | 3 | 4 | 5 | import io.renren.modules.kettle.sys.log.entity.JobLogEntity; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * 作业日志 12 | * 13 | * @author chenshun 14 | * @email sunlightcs@gmail.com 15 | * @date 2018-01-20 13:52:11 16 | */ 17 | public interface JobLogService { 18 | 19 | JobLogEntity queryObject(String oid); 20 | 21 | List queryList(Map map); 22 | 23 | int queryTotal(Map map); 24 | 25 | void save(JobLogEntity jobLog); 26 | 27 | void update(JobLogEntity jobLog); 28 | 29 | void delete(String oid); 30 | 31 | void deleteBatch(String[] oids); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/kettle/sys/task/service/CrTaskService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.kettle.sys.task.service; 2 | 3 | 4 | 5 | import io.renren.modules.kettle.sys.task.entity.CrTaskEntity; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * km作业定时任务表 12 | * 13 | * @author chenshun 14 | * @email sunlightcs@gmail.com 15 | * @date 2018-01-20 13:51:19 16 | */ 17 | public interface CrTaskService { 18 | 19 | CrTaskEntity queryObject(Integer id); 20 | 21 | List queryList(Map map); 22 | 23 | int queryTotal(Map map); 24 | 25 | void save(CrTaskEntity crTask); 26 | 27 | void update(CrTaskEntity crTask); 28 | 29 | void delete(Integer id); 30 | 31 | void deleteBatch(Integer[] ids); 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/css/reset.css: -------------------------------------------------------------------------------- 1 | a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0} -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/job/service/ScheduleJobLogService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.job.service; 2 | 3 | import io.renren.modules.job.entity.ScheduleJobLogEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 定时任务日志 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年12月1日 下午10:34:48 14 | */ 15 | public interface ScheduleJobLogService { 16 | 17 | /** 18 | * 根据ID,查询定时任务日志 19 | */ 20 | ScheduleJobLogEntity queryObject(Long jobId); 21 | 22 | /** 23 | * 查询定时任务日志列表 24 | */ 25 | List queryList(Map map); 26 | 27 | /** 28 | * 查询总数 29 | */ 30 | int queryTotal(Map map); 31 | 32 | /** 33 | * 保存定时任务日志 34 | */ 35 | void save(ScheduleJobLogEntity log); 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysRoleService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import io.renren.modules.sys.entity.SysRoleEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | 9 | /** 10 | * 角色 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2016年9月18日 上午9:42:52 15 | */ 16 | public interface SysRoleService { 17 | 18 | SysRoleEntity queryObject(Long roleId); 19 | 20 | List queryList(Map map); 21 | 22 | int queryTotal(Map map); 23 | 24 | void save(SysRoleEntity role); 25 | 26 | void update(SysRoleEntity role); 27 | 28 | void deleteBatch(Long[] roleIds); 29 | 30 | /** 31 | * 查询用户创建的角色ID列表 32 | */ 33 | List queryRoleIdList(Long createUserId); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/mapper/sys/SysRoleMenuDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | insert into sys_role_menu 8 | ( 9 | `role_id`, 10 | `menu_id` 11 | ) 12 | values 13 | 14 | ( 15 | #{roleId}, 16 | #{item} 17 | ) 18 | 19 | 20 | 21 | 22 | delete from sys_role_menu where role_id = #{value} 23 | 24 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/xss/XssFilter.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.xss; 2 | 3 | import javax.servlet.*; 4 | import javax.servlet.http.HttpServletRequest; 5 | import java.io.IOException; 6 | 7 | /** 8 | * XSS过滤 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2017-04-01 10:20 12 | */ 13 | public class XssFilter implements Filter { 14 | 15 | @Override 16 | public void init(FilterConfig config) throws ServletException { 17 | } 18 | 19 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 20 | throws IOException, ServletException { 21 | XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper( 22 | (HttpServletRequest) request); 23 | chain.doFilter(xssRequest, response); 24 | } 25 | 26 | @Override 27 | public void destroy() { 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/main/resources/static/plugins/jqgrid/ui.jqgrid-bootstrap-ui.css: -------------------------------------------------------------------------------- 1 | /* 2 | To change this license header, choose License Headers in Project Properties. 3 | To change this template file, choose Tools | Templates 4 | and open the template in the editor. 5 | */ 6 | /* 7 | Created on : Mar 16, 2015, 10:24:01 AM 8 | Author : tony 9 | */ 10 | 11 | .ui-jqgrid tr.jqgrow td { height: 26px;} 12 | .ui-jqgrid .ui-pg-input,.ui-jqgrid .ui-jqgrid-toppager .ui-pg-input { height:20px } 13 | .ui-state-hover 14 | { 15 | border: .15em solid; 16 | border-color: inherit; 17 | 18 | } 19 | .ui-jqdialog .ui-jqdialog-titlebar { 20 | height:29px; 21 | border-color: inherit; 22 | } 23 | 24 | .ui-jqdialog-content input.FormElement { 25 | padding: 0.25em; 26 | } 27 | 28 | .fm-button { 29 | height:30px; 30 | } 31 | #nData, #pData { height:20px; width:18px; } -------------------------------------------------------------------------------- /src/main/resources/logback-spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/SysUserDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import io.renren.modules.sys.entity.SysUserEntity; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 系统用户 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2016年9月18日 上午9:34:11 15 | */ 16 | @Mapper 17 | public interface SysUserDao extends BaseDao { 18 | 19 | /** 20 | * 查询用户的所有权限 21 | * @param userId 用户ID 22 | */ 23 | List queryAllPerms(Long userId); 24 | 25 | /** 26 | * 查询用户的所有菜单ID 27 | */ 28 | List queryAllMenuId(Long userId); 29 | 30 | /** 31 | * 根据用户名,查询系统用户 32 | */ 33 | SysUserEntity queryByUserName(String username); 34 | 35 | /** 36 | * 修改密码 37 | */ 38 | int updatePassword(Map map); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/utils/DateUtils.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | /** 7 | * 日期处理 8 | * 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2016年12月21日 下午12:53:33 12 | */ 13 | public class DateUtils { 14 | /** 时间格式(yyyy-MM-dd) */ 15 | public final static String DATE_PATTERN = "yyyy-MM-dd"; 16 | /** 时间格式(yyyy-MM-dd HH:mm:ss) */ 17 | public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss"; 18 | 19 | public static String format(Date date) { 20 | return format(date, DATE_PATTERN); 21 | } 22 | 23 | public static String format(Date date, String pattern) { 24 | if(date != null){ 25 | SimpleDateFormat df = new SimpleDateFormat(pattern); 26 | return df.format(date); 27 | } 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/io/renren/datasources/DataSourceTestService.java: -------------------------------------------------------------------------------- 1 | package io.renren.datasources; 2 | 3 | import io.renren.datasources.annotation.DataSource; 4 | import io.renren.modules.app.entity.UserEntity; 5 | import io.renren.modules.app.service.UserService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * 测试 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2017/9/16 23:10 14 | */ 15 | @Service 16 | public class DataSourceTestService { 17 | @Autowired 18 | private UserService userService; 19 | 20 | public UserEntity queryObject(Long userId){ 21 | return userService.queryObject(userId); 22 | } 23 | 24 | @DataSource(name = DataSourceNames.SECOND) 25 | public UserEntity queryObject2(Long userId){ 26 | return userService.queryObject(userId); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/kettle/demo/JeurDemo.java: -------------------------------------------------------------------------------- 1 | package my.study.kettle.demo; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONArray; 5 | import com.alibaba.fastjson.JSONObject; 6 | import my.study.kettle.jobentry.JobEntryKettleUtilRunBase; 7 | 8 | 9 | public class JeurDemo extends JobEntryKettleUtilRunBase { 10 | protected boolean run() throws Exception { 11 | this.jeku.logBasic(this.jeku.getConfigInfo()); 12 | this.jeku.logBasic(this.configInfo.toJSONString()); 13 | return true; 14 | } 15 | 16 | public String getDefaultConfigInfo() throws Exception { 17 | JSONObject params = new JSONObject(); 18 | params.put("key1", ""); 19 | JSONArray arr = new JSONArray(); 20 | arr.add("arr1"); 21 | arr.add("arr2"); 22 | params.put("array", arr); 23 | return JSON.toJSONString(params, true); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/test/java/io/renren/RedisTest.java: -------------------------------------------------------------------------------- 1 | package io.renren; 2 | 3 | import io.renren.common.utils.RedisUtils; 4 | import io.renren.modules.sys.entity.SysUserEntity; 5 | import org.apache.commons.lang.builder.ToStringBuilder; 6 | import org.junit.Test; 7 | import org.junit.runner.RunWith; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.boot.test.context.SpringBootTest; 10 | import org.springframework.test.context.junit4.SpringRunner; 11 | 12 | @RunWith(SpringRunner.class) 13 | @SpringBootTest 14 | public class RedisTest { 15 | @Autowired 16 | private RedisUtils redisUtils; 17 | 18 | @Test 19 | public void contextLoads() { 20 | SysUserEntity user = new SysUserEntity(); 21 | user.setEmail("qqq@qq.com"); 22 | redisUtils.set("user", user); 23 | 24 | System.out.println(ToStringBuilder.reflectionToString(redisUtils.get("user", SysUserEntity.class))); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/dao/BaseDao.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.dao; 2 | 3 | import org.apache.ibatis.annotations.Mapper; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 基础Dao(还需在XML文件里,有对应的SQL语句) 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年9月18日 上午9:31:36 14 | */ 15 | public interface BaseDao { 16 | 17 | void save(T t); 18 | 19 | void save(Map map); 20 | 21 | void saveBatch(List list); 22 | 23 | int update(T t); 24 | 25 | int update(Map map); 26 | 27 | int delete(Object id); 28 | 29 | int delete(Map map); 30 | 31 | int deleteBatch(Object[] id); 32 | 33 | T queryObject(Object id); 34 | 35 | List queryList(Map map); 36 | 37 | List queryList(Object id); 38 | 39 | int queryTotal(Map map); 40 | 41 | int queryTotal(); 42 | } 43 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/constants/UtilConst.java: -------------------------------------------------------------------------------- 1 | package my.study.constants; 2 | 3 | 4 | public interface UtilConst { 5 | 6 | String DATASOURCE_METL = "metl"; 7 | String NULL_STR = ""; 8 | String BLANK_SPACE = " "; 9 | String SBC_BLANK_SPACE = " "; 10 | String FXG = "/"; 11 | String DYH = "\'"; 12 | String BFH = "%"; 13 | String SSX = "||"; 14 | String TSLJF1 = "TSLJF1"; 15 | String TSLJF2 = "TSLJF2"; 16 | String TEMP_ = "TEMP_"; 17 | String TEMP_TABLE = "TEMP_TABLE"; 18 | String CACHE_DICT = "dict"; 19 | String WHETHER_TRUE = "1"; 20 | String WHETHER_FALSE = "0"; 21 | String LINK_STATUS_UNKNOW = "0"; 22 | String LINK_STATUS_SUCCESS = "1"; 23 | String LINK_STATUS_FAILED = "2"; 24 | String SUCCESS_FAILED_NUKNOW = "unknow"; 25 | String SUCCESS_FAILED_SUCCESS = "success"; 26 | String SUCCESS_FAILED_FAILED = "failed"; 27 | String EXCEL_XLS = "xls"; 28 | String EXCEL_XLSX = "xlsx"; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/mapper/app/UserDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | insert into tb_user 8 | ( 9 | `username`, 10 | `mobile`, 11 | `password`, 12 | `create_time` 13 | ) 14 | values 15 | ( 16 | #{username}, 17 | #{mobile}, 18 | #{password}, 19 | #{createTime} 20 | ) 21 | 22 | 23 | 26 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/app/service/UserService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.app.service; 2 | 3 | 4 | import io.renren.modules.app.entity.UserEntity; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * 用户 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2017-03-23 15:22:06 15 | */ 16 | public interface UserService { 17 | 18 | UserEntity queryObject(Long userId); 19 | 20 | List queryList(Map map); 21 | 22 | int queryTotal(Map map); 23 | 24 | void save(String mobile, String password); 25 | 26 | void update(UserEntity user); 27 | 28 | void delete(Long userId); 29 | 30 | void deleteBatch(Long[] userIds); 31 | 32 | UserEntity queryByMobile(String mobile); 33 | 34 | /** 35 | * 用户登录 36 | * @param mobile 手机号 37 | * @param password 密码 38 | * @return 返回用户ID 39 | */ 40 | long login(String mobile, String password); 41 | } 42 | -------------------------------------------------------------------------------- /kettle/src/main/java/org/beetl/sql/core/db/LowerCaseNameConversion.java: -------------------------------------------------------------------------------- 1 | package org.beetl.sql.core.db; 2 | 3 | import org.beetl.sql.core.NameConversion; 4 | import org.beetl.sql.core.annotatoin.Table; 5 | import org.beetl.sql.core.kit.StringKit; 6 | 7 | public class LowerCaseNameConversion extends NameConversion { 8 | 9 | public String getTableName(Class c) { 10 | Table table = (Table)c.getAnnotation(Table.class); 11 | return table != null?table.name(): StringKit.enCodeUnderlined(c.getSimpleName()); 12 | } 13 | 14 | public String getClassName(String tableName) { 15 | String temp = StringKit.deCodeUnderlined(tableName.toLowerCase()); 16 | return StringKit.toUpperCaseFirstOne(temp); 17 | } 18 | 19 | public String getColName(Class c, String attrName) { 20 | return attrName.toLowerCase(); 21 | } 22 | 23 | public String getPropertyName(Class c, String colName) { 24 | return colName.toLowerCase().toLowerCase(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /kettle/src/main/java/org/beetl/sql/core/db/PostgresStyleMineMine.java: -------------------------------------------------------------------------------- 1 | package org.beetl.sql.core.db; 2 | 3 | import java.util.Map; 4 | 5 | public class PostgresStyleMineMine extends AbstractMyDBStyleMine { 6 | 7 | public String getPageSQL(String sql) { 8 | String pageSql = "select _a.* from ( \n" + sql + this.getOrderBy() + " \n) _a " + " limit " + this.HOLDER_START + "_pageSize" + this.HOLDER_END + " offset " + this.HOLDER_START + "_pageOffset" + this.HOLDER_END; 9 | return pageSql; 10 | } 11 | 12 | public void initPagePara(Map paras, long start, long size) { 13 | paras.put("_pageOffset", Long.valueOf(start - (long)(this.offsetStartZero?0:1))); 14 | paras.put("_pageSize", Long.valueOf(size)); 15 | } 16 | 17 | public String getName() { 18 | return "postgres"; 19 | } 20 | 21 | public int getDBType() { 22 | return 3; 23 | } 24 | 25 | public String Date14Exp() { 26 | return "to_char(now(),\'YYYYMMDDHH24MISS\')"; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/io/renren/RenrenApplication.java: -------------------------------------------------------------------------------- 1 | package io.renren; 2 | 3 | import io.renren.datasources.DynamicDataSourceConfig; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 7 | import org.springframework.boot.builder.SpringApplicationBuilder; 8 | import org.springframework.boot.web.support.SpringBootServletInitializer; 9 | import org.springframework.context.annotation.Import; 10 | 11 | 12 | @SpringBootApplication(exclude={DataSourceAutoConfiguration.class}) 13 | @Import({DynamicDataSourceConfig.class}) 14 | public class RenrenApplication extends SpringBootServletInitializer { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(RenrenApplication.class, args); 18 | } 19 | 20 | @Override 21 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 22 | return application.sources(RenrenApplication.class); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/entity/SysConfigEntity.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.entity; 2 | 3 | 4 | import org.hibernate.validator.constraints.NotBlank; 5 | 6 | /** 7 | * 系统配置信息 8 | * 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2016年12月4日 下午6:43:36 12 | */ 13 | public class SysConfigEntity { 14 | private Long id; 15 | @NotBlank(message="参数名不能为空") 16 | private String key; 17 | @NotBlank(message="参数值不能为空") 18 | private String value; 19 | private String remark; 20 | 21 | public Long getId() { 22 | return id; 23 | } 24 | public void setId(Long id) { 25 | this.id = id; 26 | } 27 | public String getKey() { 28 | return key; 29 | } 30 | public void setKey(String key) { 31 | this.key = key; 32 | } 33 | public String getValue() { 34 | return value; 35 | } 36 | public void setValue(String value) { 37 | this.value = value; 38 | } 39 | public String getRemark() { 40 | return remark; 41 | } 42 | public void setRemark(String remark) { 43 | this.remark = remark; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/io/renren/config/KaptchaConfig.java: -------------------------------------------------------------------------------- 1 | package io.renren.config; 2 | 3 | import com.google.code.kaptcha.impl.DefaultKaptcha; 4 | import com.google.code.kaptcha.util.Config; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | import java.util.Properties; 9 | 10 | 11 | /** 12 | * 生成验证码配置 13 | * 14 | * @author chenshun 15 | * @email sunlightcs@gmail.com 16 | * @date 2017-04-20 19:22 17 | */ 18 | @Configuration 19 | public class KaptchaConfig { 20 | 21 | @Bean 22 | public DefaultKaptcha producer() { 23 | Properties properties = new Properties(); 24 | properties.put("kaptcha.border", "no"); 25 | properties.put("kaptcha.textproducer.font.color", "black"); 26 | properties.put("kaptcha.textproducer.char.space", "5"); 27 | Config config = new Config(properties); 28 | DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); 29 | defaultKaptcha.setConfig(config); 30 | return defaultKaptcha; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/mapper/sys/SysUserRoleDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 | insert into sys_user_role 17 | ( 18 | `user_id`, 19 | `role_id` 20 | ) 21 | values 22 | 23 | ( 24 | #{userId}, 25 | #{item} 26 | ) 27 | 28 | 29 | 30 | 31 | delete from sys_user_role where user_id = #{value} 32 | 33 | 34 | 37 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/kettle/common/CommonUtil.java: -------------------------------------------------------------------------------- 1 | package my.study.kettle.common; 2 | 3 | 4 | 5 | import org.beetl.sql.core.db.Db; 6 | import org.pentaho.di.core.database.DatabaseMeta; 7 | import org.pentaho.di.core.exception.KettleException; 8 | import org.pentaho.di.repository.ObjectId; 9 | import org.pentaho.di.repository.Repository; 10 | import my.study.utils.KettleUtils; 11 | 12 | public class CommonUtil { 13 | public static DatabaseMeta getOrCreateDB(String dbCode) throws KettleException { 14 | Repository repository = KettleUtils.getInstanceRep(); 15 | ObjectId dbId = repository.getDatabaseID(dbCode); 16 | if (dbId == null) { 17 | KettleUtils.saveRepositoryElement(new DatabaseMeta(dbCode, KettleUtils.dbTypeToKettle(Db.use("metl").findFirst("select * from metl_database db where db.ocode=?", new Object[]{dbCode}).getString("type")), DatabaseMeta.dbAccessTypeCode[4], null, dbCode, null, null, null)); 18 | dbId = repository.getDatabaseID(dbCode); 19 | } 20 | return repository.loadDatabaseMeta(dbId, null); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/oss/entity/SysOssEntity.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.oss.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | 7 | 8 | /** 9 | * 文件上传 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2017-03-25 12:13:26 14 | */ 15 | public class SysOssEntity implements Serializable { 16 | private static final long serialVersionUID = 1L; 17 | 18 | // 19 | private Long id; 20 | //URL地址 21 | private String url; 22 | //创建时间 23 | private Date createDate; 24 | 25 | /** 26 | * 设置: 27 | */ 28 | public void setId(Long id) { 29 | this.id = id; 30 | } 31 | /** 32 | * 获取: 33 | */ 34 | public Long getId() { 35 | return id; 36 | } 37 | /** 38 | * 设置:URL地址 39 | */ 40 | public void setUrl(String url) { 41 | this.url = url; 42 | } 43 | /** 44 | * 获取:URL地址 45 | */ 46 | public String getUrl() { 47 | return url; 48 | } 49 | /** 50 | * 设置:创建时间 51 | */ 52 | public void setCreateDate(Date createDate) { 53 | this.createDate = createDate; 54 | } 55 | /** 56 | * 获取:创建时间 57 | */ 58 | public Date getCreateDate() { 59 | return createDate; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/exception/RRException.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.exception; 2 | 3 | /** 4 | * 自定义异常 5 | * 6 | * @author chenshun 7 | * @email sunlightcs@gmail.com 8 | * @date 2016年10月27日 下午10:11:27 9 | */ 10 | public class RRException extends RuntimeException { 11 | private static final long serialVersionUID = 1L; 12 | 13 | private String msg; 14 | private int code = 500; 15 | 16 | public RRException(String msg) { 17 | super(msg); 18 | this.msg = msg; 19 | } 20 | 21 | public RRException(String msg, Throwable e) { 22 | super(msg, e); 23 | this.msg = msg; 24 | } 25 | 26 | public RRException(String msg, int code) { 27 | super(msg); 28 | this.msg = msg; 29 | this.code = code; 30 | } 31 | 32 | public RRException(String msg, int code, Throwable e) { 33 | super(msg, e); 34 | this.msg = msg; 35 | this.code = code; 36 | } 37 | 38 | public String getMsg() { 39 | return msg; 40 | } 41 | 42 | public void setMsg(String msg) { 43 | this.msg = msg; 44 | } 45 | 46 | public int getCode() { 47 | return code; 48 | } 49 | 50 | public void setCode(int code) { 51 | this.code = code; 52 | } 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/job/service/impl/ScheduleJobLogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.job.service.impl; 2 | 3 | import io.renren.modules.job.dao.ScheduleJobLogDao; 4 | import io.renren.modules.job.entity.ScheduleJobLogEntity; 5 | import io.renren.modules.job.service.ScheduleJobLogService; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | @Service("scheduleJobLogService") 14 | public class ScheduleJobLogServiceImpl implements ScheduleJobLogService { 15 | @Autowired 16 | private ScheduleJobLogDao scheduleJobLogDao; 17 | 18 | @Override 19 | public ScheduleJobLogEntity queryObject(Long jobId) { 20 | return scheduleJobLogDao.queryObject(jobId); 21 | } 22 | 23 | @Override 24 | public List queryList(Map map) { 25 | return scheduleJobLogDao.queryList(map); 26 | } 27 | 28 | @Override 29 | public int queryTotal(Map map) { 30 | return scheduleJobLogDao.queryTotal(map); 31 | } 32 | 33 | @Override 34 | public void save(ScheduleJobLogEntity log) { 35 | scheduleJobLogDao.save(log); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/app/controller/ApiRegisterController.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.app.controller; 2 | 3 | 4 | import io.renren.common.utils.R; 5 | import io.renren.common.validator.Assert; 6 | import io.renren.modules.app.service.UserService; 7 | import io.swagger.annotations.Api; 8 | import io.swagger.annotations.ApiOperation; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | /** 15 | * 注册 16 | * @author chenshun 17 | * @email sunlightcs@gmail.com 18 | * @date 2017-03-26 17:27 19 | */ 20 | @RestController 21 | @RequestMapping("/app") 22 | @Api("APP注册接口") 23 | public class ApiRegisterController { 24 | @Autowired 25 | private UserService userService; 26 | 27 | @PostMapping("register") 28 | @ApiOperation("注册") 29 | public R register(String mobile, String password){ 30 | Assert.isBlank(mobile, "手机号不能为空"); 31 | Assert.isBlank(password, "密码不能为空"); 32 | 33 | userService.save(mobile, password); 34 | 35 | return R.ok(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/redis/SysConfigRedis.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.redis; 2 | 3 | import io.renren.common.utils.RedisKeys; 4 | import io.renren.common.utils.RedisUtils; 5 | import io.renren.modules.sys.entity.SysConfigEntity; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * 系统配置Redis 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2017/7/18 21:08 15 | */ 16 | @Component 17 | public class SysConfigRedis { 18 | @Autowired 19 | private RedisUtils redisUtils; 20 | 21 | public void saveOrUpdate(SysConfigEntity config) { 22 | if(config == null){ 23 | return ; 24 | } 25 | String key = RedisKeys.getSysConfigKey(config.getKey()); 26 | redisUtils.set(key, config); 27 | } 28 | 29 | public void delete(String configKey) { 30 | String key = RedisKeys.getSysConfigKey(configKey); 31 | redisUtils.delete(key); 32 | } 33 | 34 | public SysConfigEntity get(String configKey){ 35 | String key = RedisKeys.getSysConfigKey(configKey); 36 | return redisUtils.get(key, SysConfigEntity.class); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/static/plugins/treegrid/jquery.treegrid.css: -------------------------------------------------------------------------------- 1 | .treegrid-indent {width:16px; height: 16px; display: inline-block; position: relative;} 2 | 3 | .treegrid-expander {width:16px; height: 16px; display: inline-block; position: relative; cursor: pointer;} 4 | 5 | .treegrid-expander-expanded{background-image: url(img/collapse.png); } 6 | .treegrid-expander-collapsed{background-image: url(img/expand.png);} 7 | .treegrid-selected{background: #f5f5f5 !important;} 8 | .treegrid-table{border:0 !important;margin-bottom:0} 9 | .treegrid-table tbody {display:block;height:auto;overflow-y:auto;} 10 | .treegrid-table thead, .treegrid-table tbody tr {display:table;width:100%;table-layout:fixed;} 11 | .treegrid-thead th{line-height:40px;border: 0 !important;background:#fff !important;border-radius: 4px;border-left:1px solid #e7eaec !important;border-bottom:2px solid #e7eaec !important;text-align: center;} 12 | .treegrid-thead tr :first-child{border-left:0 !important} 13 | .treegrid-tbody td{border: 0 !important;border-left:1px solid #e7eaec !important;border-bottom:1px solid #e7eaec !important;overflow: hidden; 14 | white-space: nowrap; 15 | text-overflow: ellipsis;} 16 | .treegrid-tbody tr :first-child{border-left:0 !important} 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/xss/SQLFilter.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.xss; 2 | 3 | import io.renren.common.exception.RRException; 4 | import org.apache.commons.lang.StringUtils; 5 | 6 | /** 7 | * SQL过滤 8 | * @author chenshun 9 | * @email sunlightcs@gmail.com 10 | * @date 2017-04-01 16:16 11 | */ 12 | public class SQLFilter { 13 | 14 | /** 15 | * SQL注入过滤 16 | * @param str 待验证的字符串 17 | */ 18 | public static String sqlInject(String str){ 19 | if(StringUtils.isBlank(str)){ 20 | return null; 21 | } 22 | //去掉'|"|;|\字符 23 | str = StringUtils.replace(str, "'", ""); 24 | str = StringUtils.replace(str, "\"", ""); 25 | str = StringUtils.replace(str, ";", ""); 26 | str = StringUtils.replace(str, "\\", ""); 27 | 28 | //转换成小写 29 | str = str.toLowerCase(); 30 | 31 | //非法字符 32 | String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alert", "drop"}; 33 | 34 | //判断是否包含非法字符 35 | for(String keyword : keywords){ 36 | if(str.indexOf(keyword) != -1){ 37 | throw new RRException("包含非法字符"); 38 | } 39 | } 40 | 41 | return str; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/test/java/io/renren/DynamicDataSourceTest.java: -------------------------------------------------------------------------------- 1 | package io.renren; 2 | 3 | 4 | import io.renren.datasources.DataSourceTestService; 5 | import io.renren.modules.app.entity.UserEntity; 6 | import org.apache.commons.lang.builder.ToStringBuilder; 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | import org.springframework.test.context.junit4.SpringRunner; 12 | 13 | 14 | @RunWith(SpringRunner.class) 15 | @SpringBootTest 16 | public class DynamicDataSourceTest { 17 | @Autowired 18 | private DataSourceTestService dataSourceTestService; 19 | 20 | @Test 21 | public void test(){ 22 | //数据源1 23 | UserEntity user = dataSourceTestService.queryObject(1L); 24 | System.out.println(ToStringBuilder.reflectionToString(user)); 25 | 26 | //数据源2 27 | UserEntity user2 = dataSourceTestService.queryObject2(1L); 28 | System.out.println(ToStringBuilder.reflectionToString(user2)); 29 | 30 | //数据源1 31 | UserEntity user3 = dataSourceTestService.queryObject(1L); 32 | System.out.println(ToStringBuilder.reflectionToString(user3)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/job/service/ScheduleJobService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.job.service; 2 | 3 | import io.renren.modules.job.entity.ScheduleJobEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 定时任务 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年11月28日 上午9:55:32 14 | */ 15 | public interface ScheduleJobService { 16 | 17 | /** 18 | * 根据ID,查询定时任务 19 | */ 20 | ScheduleJobEntity queryObject(Long jobId); 21 | 22 | /** 23 | * 查询定时任务列表 24 | */ 25 | List queryList(Map map); 26 | 27 | /** 28 | * 查询总数 29 | */ 30 | int queryTotal(Map map); 31 | 32 | /** 33 | * 保存定时任务 34 | */ 35 | void save(ScheduleJobEntity scheduleJob); 36 | 37 | /** 38 | * 更新定时任务 39 | */ 40 | void update(ScheduleJobEntity scheduleJob); 41 | 42 | /** 43 | * 批量删除定时任务 44 | */ 45 | void deleteBatch(Long[] jobIds); 46 | 47 | /** 48 | * 批量更新定时任务状态 49 | */ 50 | int updateBatch(Long[] jobIds, int status); 51 | 52 | /** 53 | * 立即执行 54 | */ 55 | void run(Long[] jobIds); 56 | 57 | /** 58 | * 暂停运行 59 | */ 60 | void pause(Long[] jobIds); 61 | 62 | /** 63 | * 恢复运行 64 | */ 65 | void resume(Long[] jobIds); 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/impl/SysLogServiceImpl.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service.impl; 2 | 3 | import io.renren.modules.sys.dao.SysLogDao; 4 | import io.renren.modules.sys.entity.SysLogEntity; 5 | import io.renren.modules.sys.service.SysLogService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | 13 | 14 | @Service("sysLogService") 15 | public class SysLogServiceImpl implements SysLogService { 16 | @Autowired 17 | private SysLogDao sysLogDao; 18 | 19 | @Override 20 | public SysLogEntity queryObject(Long id){ 21 | return sysLogDao.queryObject(id); 22 | } 23 | 24 | @Override 25 | public List queryList(Map map){ 26 | return sysLogDao.queryList(map); 27 | } 28 | 29 | @Override 30 | public int queryTotal(Map map){ 31 | return sysLogDao.queryTotal(map); 32 | } 33 | 34 | @Override 35 | public void save(SysLogEntity sysLog){ 36 | sysLogDao.save(sysLog); 37 | } 38 | 39 | @Override 40 | public void delete(Long id){ 41 | sysLogDao.delete(id); 42 | } 43 | 44 | @Override 45 | public void deleteBatch(Long[] ids){ 46 | sysLogDao.deleteBatch(ids); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/utils/R.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.utils; 2 | 3 | import org.apache.http.HttpStatus; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * 返回数据 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年10月27日 下午9:59:27 14 | */ 15 | public class R extends HashMap { 16 | private static final long serialVersionUID = 1L; 17 | 18 | public R() { 19 | put("code", 0); 20 | put("msg", "success"); 21 | } 22 | 23 | public static R error() { 24 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员"); 25 | } 26 | 27 | public static R error(String msg) { 28 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg); 29 | } 30 | 31 | public static R error(int code, String msg) { 32 | R r = new R(); 33 | r.put("code", code); 34 | r.put("msg", msg); 35 | return r; 36 | } 37 | 38 | public static R ok(String msg) { 39 | R r = new R(); 40 | r.put("msg", msg); 41 | return r; 42 | } 43 | 44 | public static R ok(Map map) { 45 | R r = new R(); 46 | r.putAll(map); 47 | return r; 48 | } 49 | 50 | public static R ok() { 51 | return new R(); 52 | } 53 | 54 | public R put(String key, Object value) { 55 | super.put(key, value); 56 | return this; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/io/renren/datasources/DynamicDataSource.java: -------------------------------------------------------------------------------- 1 | package io.renren.datasources; 2 | 3 | import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; 4 | 5 | import javax.sql.DataSource; 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | /** 10 | * 动态数据源 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2017/8/19 1:03 14 | */ 15 | public class DynamicDataSource extends AbstractRoutingDataSource { 16 | private static final ThreadLocal contextHolder = new ThreadLocal<>(); 17 | 18 | public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) { 19 | super.setDefaultTargetDataSource(defaultTargetDataSource); 20 | super.setTargetDataSources(new HashMap<>(targetDataSources)); 21 | super.afterPropertiesSet(); 22 | } 23 | 24 | @Override 25 | protected Object determineCurrentLookupKey() { 26 | return getDataSource(); 27 | } 28 | 29 | public static void setDataSource(String dataSource) { 30 | contextHolder.set(dataSource); 31 | } 32 | 33 | public static String getDataSource() { 34 | return contextHolder.get(); 35 | } 36 | 37 | public static void clearDataSource() { 38 | contextHolder.remove(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/static/css/main.css: -------------------------------------------------------------------------------- 1 | html { overflow-x:hidden; } 2 | .content-header { 3 | position: relative; 4 | padding: 0 0 3px 8px 5 | } 6 | 7 | .content-header>.breadcrumb { 8 | position: relative; 9 | top: 0; 10 | right: 0; 11 | float: none; 12 | margin-top: 0px; 13 | padding-left: 10px; 14 | background: #ecf0f5; 15 | } 16 | 17 | .main-footer { 18 | padding: 7px; 19 | color: #444; 20 | border-top: 1px solid #eee; 21 | } 22 | 23 | [v-cloak] { 24 | display: none; 25 | } 26 | 27 | .grid-btn{ 28 | margin-bottom:12px; 29 | } 30 | .grid-btn .btn{ 31 | margin-right:10px; 32 | } 33 | .pointer{cursor: pointer;} 34 | 35 | .ml-10 { margin-left:0 !important; } 36 | @media (min-width: 768px) { 37 | .ml-10 { margin-left:10px !important; } 38 | .col-sm-10 {width: 70%;padding-left: 0px;} 39 | .col-sm-2 {width: 24%;} 40 | } 41 | tbody > tr > th {font-weight: normal; } 42 | .panel .table { margin:0 0; } 43 | .panel .pagination { margin:0; } 44 | .panel-default>.panel-heading {background-color: #f5f5f5;} 45 | .row{ 46 | border-top: 1px solid #ddd; 47 | margin:0; 48 | padding:20px 2px 0px 2px; 49 | } 50 | .col-xs-6{padding-left: 0px;padding-right: 0px;} 51 | .form-horizontal .form-group {margin-left:0px;margin-right:0px;} 52 | .form-horizontal{ 53 | width:550px;padding-top:20px; 54 | } -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/job/task/TestTask.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.job.task; 2 | 3 | import io.renren.modules.sys.entity.SysUserEntity; 4 | import io.renren.modules.sys.service.SysUserService; 5 | 6 | import org.apache.commons.lang.builder.ToStringBuilder; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Component; 11 | 12 | /** 13 | * 测试定时任务(演示Demo,可删除) 14 | * 15 | * testTask为spring bean的名称 16 | * 17 | * @author chenshun 18 | * @email sunlightcs@gmail.com 19 | * @date 2016年11月30日 下午1:34:24 20 | */ 21 | @Component("testTask") 22 | public class TestTask { 23 | private Logger logger = LoggerFactory.getLogger(getClass()); 24 | 25 | @Autowired 26 | private SysUserService sysUserService; 27 | 28 | //定时任务只能接受一个参数;如果有多个参数,使用json数据即可 29 | public void test(String params){ 30 | logger.info("我是带参数的test方法,正在被执行,参数为:" + params); 31 | 32 | try { 33 | Thread.sleep(1000L); 34 | } catch (InterruptedException e) { 35 | e.printStackTrace(); 36 | } 37 | 38 | SysUserEntity user = sysUserService.queryObject(1L); 39 | System.out.println(ToStringBuilder.reflectionToString(user)); 40 | 41 | } 42 | 43 | 44 | public void test2(){ 45 | logger.info("我是不带参数的test2方法,正在被执行"); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/kettle/jobentry/JobEntryKettleUtilRunBase.java: -------------------------------------------------------------------------------- 1 | package my.study.kettle.jobentry; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONObject; 5 | import org.apache.commons.logging.Log; 6 | import org.apache.commons.logging.LogFactory; 7 | 8 | public abstract class JobEntryKettleUtilRunBase { 9 | protected JSONObject configInfo; 10 | protected JobEntryKettleUtil jeku; 11 | protected Log log = LogFactory.getLog(getClass()); 12 | 13 | protected abstract boolean run() throws Exception; 14 | 15 | public String getDefaultConfigInfo() throws Exception { 16 | return "{}"; 17 | } 18 | 19 | public JSONObject getConfigInfo() { 20 | return this.configInfo; 21 | } 22 | 23 | public void setConfigInfo(JSONObject configInfo) { 24 | this.configInfo = configInfo; 25 | } 26 | 27 | public JobEntryKettleUtil getJeku() { 28 | return this.jeku; 29 | } 30 | 31 | public void setJeku(JobEntryKettleUtil jeku) { 32 | this.jeku = jeku; 33 | try { 34 | this.configInfo = JSON.parseObject(jeku.environmentSubstitute(jeku.getConfigInfo())); 35 | } catch (Exception e) { 36 | this.log.debug("配置信息不能转换为JSON对象", e); 37 | this.configInfo = new JSONObject(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/entity/SysRoleMenuEntity.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.entity; 2 | 3 | 4 | import java.io.Serializable; 5 | 6 | /** 7 | * 角色与菜单对应关系 8 | * 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2016年9月18日 上午9:28:13 12 | */ 13 | public class SysRoleMenuEntity implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | 16 | private Long id; 17 | 18 | /** 19 | * 角色ID 20 | */ 21 | private Long roleId; 22 | 23 | /** 24 | * 菜单ID 25 | */ 26 | private Long menuId; 27 | 28 | /** 29 | * 设置: 30 | * @param id 31 | */ 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | /** 37 | * 获取: 38 | * @return Long 39 | */ 40 | public Long getId() { 41 | return id; 42 | } 43 | 44 | /** 45 | * 设置:角色ID 46 | * @param roleId 角色ID 47 | */ 48 | public void setRoleId(Long roleId) { 49 | this.roleId = roleId; 50 | } 51 | 52 | /** 53 | * 获取:角色ID 54 | * @return Long 55 | */ 56 | public Long getRoleId() { 57 | return roleId; 58 | } 59 | 60 | /** 61 | * 设置:菜单ID 62 | * @param menuId 菜单ID 63 | */ 64 | public void setMenuId(Long menuId) { 65 | this.menuId = menuId; 66 | } 67 | 68 | /** 69 | * 获取:菜单ID 70 | * @return Long 71 | */ 72 | public Long getMenuId() { 73 | return menuId; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/entity/SysUserRoleEntity.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.entity; 2 | 3 | 4 | import java.io.Serializable; 5 | 6 | /** 7 | * 用户与角色对应关系 8 | * 9 | * @author chenshun 10 | * @email sunlightcs@gmail.com 11 | * @date 2016年9月18日 上午9:28:39 12 | */ 13 | public class SysUserRoleEntity implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | 16 | private Long id; 17 | 18 | /** 19 | * 用户ID 20 | */ 21 | private Long userId; 22 | 23 | /** 24 | * 角色ID 25 | */ 26 | private Long roleId; 27 | 28 | /** 29 | * 设置: 30 | * @param id 31 | */ 32 | public void setId(Long id) { 33 | this.id = id; 34 | } 35 | 36 | /** 37 | * 获取: 38 | * @return Long 39 | */ 40 | public Long getId() { 41 | return id; 42 | } 43 | 44 | /** 45 | * 设置:用户ID 46 | * @param userId 用户ID 47 | */ 48 | public void setUserId(Long userId) { 49 | this.userId = userId; 50 | } 51 | 52 | /** 53 | * 获取:用户ID 54 | * @return Long 55 | */ 56 | public Long getUserId() { 57 | return userId; 58 | } 59 | 60 | /** 61 | * 设置:角色ID 62 | * @param roleId 角色ID 63 | */ 64 | public void setRoleId(Long roleId) { 65 | this.roleId = roleId; 66 | } 67 | 68 | /** 69 | * 获取:角色ID 70 | * @return Long 71 | */ 72 | public Long getRoleId() { 73 | return roleId; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/aspect/RedisAspect.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.aspect; 2 | 3 | import io.renren.common.exception.RRException; 4 | import org.aspectj.lang.ProceedingJoinPoint; 5 | import org.aspectj.lang.annotation.Around; 6 | import org.aspectj.lang.annotation.Aspect; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.beans.factory.annotation.Value; 10 | import org.springframework.context.annotation.Configuration; 11 | 12 | /** 13 | * Redis切面处理类 14 | * 15 | * @author chenshun 16 | * @email sunlightcs@gmail.com 17 | * @date 2017-07-17 23:30 18 | */ 19 | @Aspect 20 | @Configuration 21 | public class RedisAspect { 22 | private Logger logger = LoggerFactory.getLogger(getClass()); 23 | //是否开启redis缓存 true开启 false关闭 24 | @Value("${spring.redis.open: false}") 25 | private boolean open; 26 | 27 | @Around("execution(* io.renren.common.utils.RedisUtils.*(..))") 28 | public Object around(ProceedingJoinPoint point) throws Throwable { 29 | Object result = null; 30 | if(open){ 31 | try{ 32 | result = point.proceed(); 33 | }catch (Exception e){ 34 | logger.error("redis error", e); 35 | throw new RRException("Redis服务异常"); 36 | } 37 | } 38 | return result; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysConfigService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import io.renren.modules.sys.entity.SysConfigEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * 系统配置信息 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年12月4日 下午6:49:01 14 | */ 15 | public interface SysConfigService { 16 | 17 | /** 18 | * 保存配置信息 19 | */ 20 | public void save(SysConfigEntity config); 21 | 22 | /** 23 | * 更新配置信息 24 | */ 25 | public void update(SysConfigEntity config); 26 | 27 | /** 28 | * 根据key,更新value 29 | */ 30 | public void updateValueByKey(String key, String value); 31 | 32 | /** 33 | * 删除配置信息 34 | */ 35 | public void deleteBatch(Long[] ids); 36 | 37 | /** 38 | * 获取List列表 39 | */ 40 | public List queryList(Map map); 41 | /** 42 | * 获取总记录数 43 | */ 44 | public int queryTotal(Map map); 45 | 46 | public SysConfigEntity queryObject(Long id); 47 | 48 | /** 49 | * 根据key,获取配置的value值 50 | * 51 | * @param key key 52 | */ 53 | public String getValue(String key); 54 | 55 | /** 56 | * 根据key,获取value的Object对象 57 | * @param key key 58 | * @param clazz Object对象 59 | */ 60 | public T getConfigObject(String key, Class clazz); 61 | 62 | } 63 | -------------------------------------------------------------------------------- /kettle/src/main/java/my/study/utils/HttpUtl.java: -------------------------------------------------------------------------------- 1 | package my.study.utils; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.sun.jersey.api.client.Client; 6 | import com.sun.jersey.api.client.WebResource; 7 | import com.sun.jersey.api.client.config.DefaultClientConfig; 8 | import org.apache.commons.logging.Log; 9 | import org.apache.commons.logging.LogFactory; 10 | 11 | import java.net.URI; 12 | 13 | public class HttpUtl { 14 | 15 | public static Log log = LogFactory.getLog(HttpUtl.class); 16 | 17 | 18 | public static String doUrlStr(String url) throws Exception { 19 | DefaultClientConfig config = new DefaultClientConfig(); 20 | Client client = Client.create(config); 21 | WebResource webResource = client.resource(new URI(url)); 22 | String result = (String)webResource.get(String.class); 23 | return result; 24 | } 25 | 26 | public static JSONObject doUrl(String url) throws Exception { 27 | String result = doUrlStr(url); 28 | JSONObject json = JSON.parseObject(result); 29 | return json; 30 | } 31 | 32 | public static JSONObject createResult(boolean success, String msg) { 33 | JSONObject result = new JSONObject(); 34 | result.put("success", Boolean.valueOf(success)); 35 | result.put("msg", msg); 36 | return result; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/sys/SysUserTokenDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 13 | 14 | 15 | insert into sys_user_token 16 | ( 17 | `user_id`, 18 | `token`, 19 | `expire_time`, 20 | `update_time` 21 | ) 22 | values 23 | ( 24 | #{userId}, 25 | #{token}, 26 | #{expireTime}, 27 | #{updateTime} 28 | ) 29 | 30 | 31 | 32 | update sys_user_token 33 | 34 | `token` = #{token}, 35 | `expire_time` = #{expireTime}, 36 | `update_time` = #{updateTime} 37 | 38 | where user_id = #{userId} 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/oss/cloud/OSSFactory.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.oss.cloud; 2 | 3 | import io.renren.modules.sys.service.SysConfigService; 4 | import io.renren.common.utils.ConfigConstant; 5 | import io.renren.common.utils.Constant; 6 | import io.renren.common.utils.SpringContextUtils; 7 | 8 | /** 9 | * 文件上传Factory 10 | * @author chenshun 11 | * @email sunlightcs@gmail.com 12 | * @date 2017-03-26 10:18 13 | */ 14 | public final class OSSFactory { 15 | private static SysConfigService sysConfigService; 16 | 17 | static { 18 | OSSFactory.sysConfigService = (SysConfigService) SpringContextUtils.getBean("sysConfigService"); 19 | } 20 | 21 | public static CloudStorageService build(){ 22 | //获取云存储配置信息 23 | CloudStorageConfig config = sysConfigService.getConfigObject(ConfigConstant.CLOUD_STORAGE_CONFIG_KEY, CloudStorageConfig.class); 24 | 25 | if(config.getType() == Constant.CloudService.QINIU.getValue()){ 26 | return new QiniuCloudStorageService(config); 27 | }else if(config.getType() == Constant.CloudService.ALIYUN.getValue()){ 28 | return new AliyunCloudStorageService(config); 29 | }else if(config.getType() == Constant.CloudService.QCLOUD.getValue()){ 30 | return new QcloudCloudStorageService(config); 31 | } 32 | 33 | return null; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/entity/SysUserTokenEntity.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | 7 | /** 8 | * 系统用户Token 9 | */ 10 | public class SysUserTokenEntity implements Serializable { 11 | private static final long serialVersionUID = 1L; 12 | 13 | //用户ID 14 | private Long userId; 15 | //token 16 | private String token; 17 | //过期时间 18 | private Date expireTime; 19 | //更新时间 20 | private Date updateTime; 21 | 22 | /** 23 | * 设置:用户ID 24 | */ 25 | public void setUserId(Long userId) { 26 | this.userId = userId; 27 | } 28 | /** 29 | * 获取:用户ID 30 | */ 31 | public Long getUserId() { 32 | return userId; 33 | } 34 | /** 35 | * 设置:token 36 | */ 37 | public void setToken(String token) { 38 | this.token = token; 39 | } 40 | /** 41 | * 获取:token 42 | */ 43 | public String getToken() { 44 | return token; 45 | } 46 | /** 47 | * 设置:过期时间 48 | */ 49 | public void setExpireTime(Date expireTime) { 50 | this.expireTime = expireTime; 51 | } 52 | /** 53 | * 获取:过期时间 54 | */ 55 | public Date getExpireTime() { 56 | return expireTime; 57 | } 58 | /** 59 | * 设置:更新时间 60 | */ 61 | public void setUpdateTime(Date updateTime) { 62 | this.updateTime = updateTime; 63 | } 64 | /** 65 | * 获取:更新时间 66 | */ 67 | public Date getUpdateTime() { 68 | return updateTime; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/impl/SysRoleMenuServiceImpl.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service.impl; 2 | 3 | import io.renren.modules.sys.dao.SysRoleMenuDao; 4 | import io.renren.modules.sys.service.SysRoleMenuService; 5 | 6 | import java.util.HashMap; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | import org.springframework.transaction.annotation.Transactional; 13 | 14 | 15 | 16 | /** 17 | * 角色与菜单对应关系 18 | * 19 | * @author chenshun 20 | * @email sunlightcs@gmail.com 21 | * @date 2016年9月18日 上午9:44:35 22 | */ 23 | @Service("sysRoleMenuService") 24 | public class SysRoleMenuServiceImpl implements SysRoleMenuService { 25 | @Autowired 26 | private SysRoleMenuDao sysRoleMenuDao; 27 | 28 | @Override 29 | @Transactional 30 | public void saveOrUpdate(Long roleId, List menuIdList) { 31 | //先删除角色与菜单关系 32 | sysRoleMenuDao.delete(roleId); 33 | 34 | if(menuIdList.size() == 0){ 35 | return ; 36 | } 37 | 38 | //保存角色与菜单关系 39 | Map map = new HashMap<>(); 40 | map.put("roleId", roleId); 41 | map.put("menuIdList", menuIdList); 42 | sysRoleMenuDao.save(map); 43 | } 44 | 45 | @Override 46 | public List queryMenuIdList(Long roleId) { 47 | return sysRoleMenuDao.queryMenuIdList(roleId); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/oss/service/impl/SysOssServiceImpl.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.oss.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | import io.renren.modules.oss.dao.SysOssDao; 10 | import io.renren.modules.oss.entity.SysOssEntity; 11 | import io.renren.modules.oss.service.SysOssService; 12 | 13 | 14 | 15 | @Service("sysOssService") 16 | public class SysOssServiceImpl implements SysOssService { 17 | @Autowired 18 | private SysOssDao sysOssDao; 19 | 20 | @Override 21 | public SysOssEntity queryObject(Long id){ 22 | return sysOssDao.queryObject(id); 23 | } 24 | 25 | @Override 26 | public List queryList(Map map){ 27 | return sysOssDao.queryList(map); 28 | } 29 | 30 | @Override 31 | public int queryTotal(Map map){ 32 | return sysOssDao.queryTotal(map); 33 | } 34 | 35 | @Override 36 | public void save(SysOssEntity sysOss){ 37 | sysOssDao.save(sysOss); 38 | } 39 | 40 | @Override 41 | public void update(SysOssEntity sysOss){ 42 | sysOssDao.update(sysOss); 43 | } 44 | 45 | @Override 46 | public void delete(Long id){ 47 | sysOssDao.delete(id); 48 | } 49 | 50 | @Override 51 | public void deleteBatch(Long[] ids){ 52 | sysOssDao.deleteBatch(ids); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/impl/SysUserRoleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service.impl; 2 | 3 | import io.renren.modules.sys.dao.SysUserRoleDao; 4 | import io.renren.modules.sys.service.SysUserRoleService; 5 | 6 | import java.util.HashMap; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | 14 | 15 | /** 16 | * 用户与角色对应关系 17 | * 18 | * @author chenshun 19 | * @email sunlightcs@gmail.com 20 | * @date 2016年9月18日 上午9:45:48 21 | */ 22 | @Service("sysUserRoleService") 23 | public class SysUserRoleServiceImpl implements SysUserRoleService { 24 | @Autowired 25 | private SysUserRoleDao sysUserRoleDao; 26 | 27 | @Override 28 | public void saveOrUpdate(Long userId, List roleIdList) { 29 | if(roleIdList.size() == 0){ 30 | return ; 31 | } 32 | 33 | //先删除用户与角色关系 34 | sysUserRoleDao.delete(userId); 35 | 36 | //保存用户与角色关系 37 | Map map = new HashMap<>(); 38 | map.put("userId", userId); 39 | map.put("roleIdList", roleIdList); 40 | sysUserRoleDao.save(map); 41 | } 42 | 43 | @Override 44 | public List queryRoleIdList(Long userId) { 45 | return sysUserRoleDao.queryRoleIdList(userId); 46 | } 47 | 48 | @Override 49 | public void delete(Long userId) { 50 | sysUserRoleDao.delete(userId); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/job/utils/ScheduleRunnable.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.job.utils; 2 | 3 | import io.renren.common.exception.RRException; 4 | import io.renren.common.utils.SpringContextUtils; 5 | import org.apache.commons.lang.StringUtils; 6 | import org.springframework.util.ReflectionUtils; 7 | 8 | import java.lang.reflect.Method; 9 | 10 | /** 11 | * 执行定时任务 12 | * 13 | * @author chenshun 14 | * @email sunlightcs@gmail.com 15 | * @date 2016年11月30日 下午12:49:33 16 | */ 17 | public class ScheduleRunnable implements Runnable { 18 | private Object target; 19 | private Method method; 20 | private String params; 21 | 22 | public ScheduleRunnable(String beanName, String methodName, String params) throws NoSuchMethodException, SecurityException { 23 | this.target = SpringContextUtils.getBean(beanName); 24 | this.params = params; 25 | 26 | if(StringUtils.isNotBlank(params)){ 27 | this.method = target.getClass().getDeclaredMethod(methodName, String.class); 28 | }else{ 29 | this.method = target.getClass().getDeclaredMethod(methodName); 30 | } 31 | } 32 | 33 | @Override 34 | public void run() { 35 | try { 36 | ReflectionUtils.makeAccessible(method); 37 | if(StringUtils.isNotBlank(params)){ 38 | method.invoke(target, params); 39 | }else{ 40 | method.invoke(target); 41 | } 42 | }catch (Exception e) { 43 | throw new RRException("执行定时任务失败", e); 44 | } 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/utils/SpringContextUtils.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.utils; 2 | 3 | import org.springframework.beans.BeansException; 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.ApplicationContextAware; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * Spring Context 工具类 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2016年11月29日 下午11:45:51 14 | */ 15 | @Component 16 | public class SpringContextUtils implements ApplicationContextAware { 17 | public static ApplicationContext applicationContext; 18 | 19 | @Override 20 | public void setApplicationContext(ApplicationContext applicationContext) 21 | throws BeansException { 22 | SpringContextUtils.applicationContext = applicationContext; 23 | } 24 | 25 | public static Object getBean(String name) { 26 | return applicationContext.getBean(name); 27 | } 28 | 29 | public static T getBean(String name, Class requiredType) { 30 | return applicationContext.getBean(name, requiredType); 31 | } 32 | 33 | public static boolean containsBean(String name) { 34 | return applicationContext.containsBean(name); 35 | } 36 | 37 | public static boolean isSingleton(String name) { 38 | return applicationContext.isSingleton(name); 39 | } 40 | 41 | public static Class getType(String name) { 42 | return applicationContext.getType(name); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/app/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.app.config; 2 | 3 | import io.renren.modules.app.interceptor.AuthorizationInterceptor; 4 | import io.renren.modules.app.resolver.LoginUserHandlerMethodArgumentResolver; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.web.method.support.HandlerMethodArgumentResolver; 8 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 9 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * MVC配置 15 | * 16 | * @author chenshun 17 | * @email sunlightcs@gmail.com 18 | * @date 2017-04-20 22:30 19 | */ 20 | @Configuration 21 | public class WebMvcConfig extends WebMvcConfigurerAdapter { 22 | @Autowired 23 | private AuthorizationInterceptor authorizationInterceptor; 24 | @Autowired 25 | private LoginUserHandlerMethodArgumentResolver loginUserHandlerMethodArgumentResolver; 26 | 27 | @Override 28 | public void addInterceptors(InterceptorRegistry registry) { 29 | registry.addInterceptor(authorizationInterceptor).addPathPatterns("/app/**"); 30 | } 31 | 32 | @Override 33 | public void addArgumentResolvers(List argumentResolvers) { 34 | argumentResolvers.add(loginUserHandlerMethodArgumentResolver); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/oauth2/TokenGenerator.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.oauth2; 2 | 3 | import io.renren.common.exception.RRException; 4 | 5 | import java.security.MessageDigest; 6 | import java.util.UUID; 7 | 8 | /** 9 | * 生成token 10 | * 11 | * @author chenshun 12 | * @email sunlightcs@gmail.com 13 | * @date 2017-05-20 14:41 14 | */ 15 | public class TokenGenerator { 16 | 17 | public static String generateValue() { 18 | return generateValue(UUID.randomUUID().toString()); 19 | } 20 | 21 | private static final char[] hexCode = "0123456789abcdef".toCharArray(); 22 | 23 | public static String toHexString(byte[] data) { 24 | if(data == null) { 25 | return null; 26 | } 27 | StringBuilder r = new StringBuilder(data.length*2); 28 | for ( byte b : data) { 29 | r.append(hexCode[(b >> 4) & 0xF]); 30 | r.append(hexCode[(b & 0xF)]); 31 | } 32 | return r.toString(); 33 | } 34 | 35 | public static String generateValue(String param) { 36 | try { 37 | MessageDigest algorithm = MessageDigest.getInstance("MD5"); 38 | algorithm.reset(); 39 | algorithm.update(param.getBytes()); 40 | byte[] messageDigest = algorithm.digest(); 41 | return toHexString(messageDigest); 42 | } catch (Exception e) { 43 | throw new RRException("生成Token失败", e); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysUserService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import io.renren.modules.sys.entity.SysUserEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | 9 | /** 10 | * 系统用户 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2016年9月18日 上午9:43:39 15 | */ 16 | public interface SysUserService { 17 | 18 | /** 19 | * 查询用户的所有权限 20 | * @param userId 用户ID 21 | */ 22 | List queryAllPerms(Long userId); 23 | 24 | /** 25 | * 查询用户的所有菜单ID 26 | */ 27 | List queryAllMenuId(Long userId); 28 | 29 | /** 30 | * 根据用户名,查询系统用户 31 | */ 32 | SysUserEntity queryByUserName(String username); 33 | 34 | /** 35 | * 根据用户ID,查询用户 36 | * @param userId 37 | * @return 38 | */ 39 | SysUserEntity queryObject(Long userId); 40 | 41 | /** 42 | * 查询用户列表 43 | */ 44 | List queryList(Map map); 45 | 46 | /** 47 | * 查询总数 48 | */ 49 | int queryTotal(Map map); 50 | 51 | /** 52 | * 保存用户 53 | */ 54 | void save(SysUserEntity user); 55 | 56 | /** 57 | * 修改用户 58 | */ 59 | void update(SysUserEntity user); 60 | 61 | /** 62 | * 删除用户 63 | */ 64 | void deleteBatch(Long[] userIds); 65 | 66 | /** 67 | * 修改密码 68 | * @param userId 用户ID 69 | * @param password 原密码 70 | * @param newPassword 新密码 71 | */ 72 | int updatePassword(Long userId, String password, String newPassword); 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/app/controller/ApiTestController.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.app.controller; 2 | 3 | 4 | import io.renren.common.utils.R; 5 | import io.renren.modules.app.annotation.Login; 6 | import io.renren.modules.app.annotation.LoginUser; 7 | import io.renren.modules.app.entity.UserEntity; 8 | import io.swagger.annotations.Api; 9 | import io.swagger.annotations.ApiOperation; 10 | import org.springframework.web.bind.annotation.GetMapping; 11 | import org.springframework.web.bind.annotation.RequestAttribute; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | /** 16 | * APP测试接口 17 | * 18 | * @author chenshun 19 | * @email sunlightcs@gmail.com 20 | * @date 2017-03-23 15:47 21 | */ 22 | @RestController 23 | @RequestMapping("/app") 24 | @Api("APP测试接口") 25 | public class ApiTestController { 26 | 27 | @Login 28 | @GetMapping("userInfo") 29 | @ApiOperation("获取用户信息") 30 | public R userInfo(@LoginUser UserEntity user){ 31 | return R.ok().put("user", user); 32 | } 33 | 34 | @Login 35 | @GetMapping("userId") 36 | @ApiOperation("获取用户ID") 37 | public R userInfo(@RequestAttribute("userId") Integer userId){ 38 | return R.ok().put("userId", userId); 39 | } 40 | 41 | @GetMapping("notToken") 42 | @ApiOperation("忽略Token验证测试") 43 | public R notToken(){ 44 | return R.ok().put("msg", "无需token也能访问。。。"); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/validator/ValidatorUtils.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.validator; 2 | 3 | import io.renren.common.exception.RRException; 4 | 5 | import javax.validation.ConstraintViolation; 6 | import javax.validation.Validation; 7 | import javax.validation.Validator; 8 | import java.util.Set; 9 | 10 | /** 11 | * hibernate-validator校验工具类 12 | * 13 | * 参考文档:http://docs.jboss.org/hibernate/validator/5.4/reference/en-US/html_single/ 14 | * 15 | * @author chenshun 16 | * @email sunlightcs@gmail.com 17 | * @date 2017-03-15 10:50 18 | */ 19 | public class ValidatorUtils { 20 | private static Validator validator; 21 | 22 | static { 23 | validator = Validation.buildDefaultValidatorFactory().getValidator(); 24 | } 25 | 26 | /** 27 | * 校验对象 28 | * @param object 待校验对象 29 | * @param groups 待校验的组 30 | * @throws RRException 校验不通过,则报RRException异常 31 | */ 32 | public static void validateEntity(Object object, Class... groups) 33 | throws RRException { 34 | Set> constraintViolations = validator.validate(object, groups); 35 | if (!constraintViolations.isEmpty()) { 36 | StringBuilder msg = new StringBuilder(); 37 | for(ConstraintViolation constraint: constraintViolations){ 38 | msg.append(constraint.getMessage()).append("
"); 39 | } 40 | throw new RRException(msg.toString()); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/service/SysMenuService.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.service; 2 | 3 | import io.renren.modules.sys.entity.SysMenuEntity; 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | 9 | /** 10 | * 菜单管理 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2016年9月18日 上午9:42:16 15 | */ 16 | public interface SysMenuService { 17 | 18 | /** 19 | * 根据父菜单,查询子菜单 20 | * @param parentId 父菜单ID 21 | * @param menuIdList 用户菜单ID 22 | */ 23 | List queryListParentId(Long parentId, List menuIdList); 24 | 25 | /** 26 | * 根据父菜单,查询子菜单 27 | * @param parentId 父菜单ID 28 | */ 29 | List queryListParentId(Long parentId); 30 | 31 | /** 32 | * 获取不包含按钮的菜单列表 33 | */ 34 | List queryNotButtonList(); 35 | 36 | /** 37 | * 获取用户菜单列表 38 | */ 39 | List getUserMenuList(Long userId); 40 | 41 | /** 42 | * 查询菜单 43 | */ 44 | SysMenuEntity queryObject(Long menuId); 45 | 46 | /** 47 | * 查询菜单列表 48 | */ 49 | List queryList(Map map); 50 | 51 | /** 52 | * 查询总数 53 | */ 54 | int queryTotal(Map map); 55 | 56 | /** 57 | * 保存菜单 58 | */ 59 | void save(SysMenuEntity menu); 60 | 61 | /** 62 | * 修改 63 | */ 64 | void update(SysMenuEntity menu); 65 | 66 | /** 67 | * 删除 68 | */ 69 | void deleteBatch(Long[] menuIds); 70 | 71 | /** 72 | * 查询用户的权限列表 73 | */ 74 | List queryUserList(Long userId); 75 | } 76 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # Tomcat 2 | server: 3 | tomcat: 4 | uri-encoding: UTF-8 5 | max-threads: 1000 6 | min-spare-threads: 30 7 | port: 8080 8 | connection-timeout: 5000 9 | context-path: /renren-fast 10 | 11 | spring: 12 | # 环境 dev|test|pro 13 | profiles: 14 | active: dev 15 | # jackson时间格式化 16 | jackson: 17 | time-zone: GMT+8 18 | date-format: yyyy-MM-dd HH:mm:ss 19 | http: 20 | multipart: 21 | max-file-size: 100MB 22 | max-request-size: 100MB 23 | enabled: true 24 | resources: # 指定静态资源的路径 25 | static-locations: classpath:/static/,classpath:/views/ 26 | redis: 27 | open: false # 是否开启redis缓存 true开启 false关闭 28 | database: 0 29 | host: localhost 30 | port: 16379 31 | password: # 密码(默认为空) 32 | timeout: 6000 # 连接超时时长(毫秒) 33 | pool: 34 | max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) 35 | max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) 36 | max-idle: 10 # 连接池中的最大空闲连接 37 | min-idle: 5 # 连接池中的最小空闲连接 38 | 39 | # Mybatis配置 40 | mybatis: 41 | mapperLocations: classpath:mapper/**/*.xml 42 | configuration: 43 | map-underscore-to-camel-case: true 44 | 45 | renren: 46 | # APP模块,是通过jwt认证的,如果要使用APP模块,则需要修改【加密秘钥】 47 | jwt: 48 | # 加密秘钥 49 | secret: f4e2e52034348f86b67cde581c0f9eb5[www.renren.io] 50 | # token有效时长,7天,单位秒 51 | expire: 604800 52 | header: token 53 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/exception/RRExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.exception; 2 | 3 | import io.renren.common.utils.R; 4 | import org.apache.shiro.authz.AuthorizationException; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.dao.DuplicateKeyException; 8 | import org.springframework.web.bind.annotation.ExceptionHandler; 9 | import org.springframework.web.bind.annotation.RestControllerAdvice; 10 | 11 | /** 12 | * 异常处理器 13 | * 14 | * @author chenshun 15 | * @email sunlightcs@gmail.com 16 | * @date 2016年10月27日 下午10:16:19 17 | */ 18 | @RestControllerAdvice 19 | public class RRExceptionHandler { 20 | private Logger logger = LoggerFactory.getLogger(getClass()); 21 | 22 | /** 23 | * 处理自定义异常 24 | */ 25 | @ExceptionHandler(RRException.class) 26 | public R handleRRException(RRException e){ 27 | R r = new R(); 28 | r.put("code", e.getCode()); 29 | r.put("msg", e.getMessage()); 30 | 31 | return r; 32 | } 33 | 34 | @ExceptionHandler(DuplicateKeyException.class) 35 | public R handleDuplicateKeyException(DuplicateKeyException e){ 36 | logger.error(e.getMessage(), e); 37 | return R.error("数据库中已存在该记录"); 38 | } 39 | 40 | @ExceptionHandler(AuthorizationException.class) 41 | public R handleAuthorizationException(AuthorizationException e){ 42 | logger.error(e.getMessage(), e); 43 | return R.error("没有权限,请联系管理员授权"); 44 | } 45 | 46 | @ExceptionHandler(Exception.class) 47 | public R handleException(Exception e){ 48 | logger.error(e.getMessage(), e); 49 | return R.error(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/io/renren/common/utils/ShiroUtils.java: -------------------------------------------------------------------------------- 1 | package io.renren.common.utils; 2 | 3 | import io.renren.common.exception.RRException; 4 | import io.renren.modules.sys.entity.SysUserEntity; 5 | import org.apache.shiro.SecurityUtils; 6 | import org.apache.shiro.session.Session; 7 | import org.apache.shiro.subject.Subject; 8 | 9 | /** 10 | * Shiro工具类 11 | * 12 | * @author chenshun 13 | * @email sunlightcs@gmail.com 14 | * @date 2016年11月12日 上午9:49:19 15 | */ 16 | public class ShiroUtils { 17 | 18 | public static Session getSession() { 19 | return SecurityUtils.getSubject().getSession(); 20 | } 21 | 22 | public static Subject getSubject() { 23 | return SecurityUtils.getSubject(); 24 | } 25 | 26 | public static SysUserEntity getUserEntity() { 27 | return (SysUserEntity)SecurityUtils.getSubject().getPrincipal(); 28 | } 29 | 30 | public static Long getUserId() { 31 | return getUserEntity().getUserId(); 32 | } 33 | 34 | public static void setSessionAttribute(Object key, Object value) { 35 | getSession().setAttribute(key, value); 36 | } 37 | 38 | public static Object getSessionAttribute(Object key) { 39 | return getSession().getAttribute(key); 40 | } 41 | 42 | public static boolean isLogin() { 43 | return SecurityUtils.getSubject().getPrincipal() != null; 44 | } 45 | 46 | public static String getKaptcha(String key) { 47 | Object kaptcha = getSessionAttribute(key); 48 | if(kaptcha == null){ 49 | throw new RRException("验证码已失效"); 50 | } 51 | getSession().removeAttribute(key); 52 | return kaptcha.toString(); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/io/renren/modules/sys/controller/SysLogController.java: -------------------------------------------------------------------------------- 1 | package io.renren.modules.sys.controller; 2 | 3 | import io.renren.modules.sys.entity.SysLogEntity; 4 | import io.renren.modules.sys.service.SysLogService; 5 | import io.renren.common.utils.PageUtils; 6 | import io.renren.common.utils.Query; 7 | import io.renren.common.utils.R; 8 | import org.apache.shiro.authz.annotation.RequiresPermissions; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestParam; 13 | import org.springframework.web.bind.annotation.ResponseBody; 14 | 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | 19 | /** 20 | * 系统日志 21 | * 22 | * @author chenshun 23 | * @email sunlightcs@gmail.com 24 | * @date 2017-03-08 10:40:56 25 | */ 26 | @Controller 27 | @RequestMapping("/sys/log") 28 | public class SysLogController { 29 | @Autowired 30 | private SysLogService sysLogService; 31 | 32 | /** 33 | * 列表 34 | */ 35 | @ResponseBody 36 | @RequestMapping("/list") 37 | @RequiresPermissions("sys:log:list") 38 | public R list(@RequestParam Map params){ 39 | //查询列表数据 40 | Query query = new Query(params); 41 | List sysLogList = sysLogService.queryList(query); 42 | int total = sysLogService.queryTotal(query); 43 | 44 | PageUtils pageUtil = new PageUtils(sysLogList, total, query.getLimit(), query.getPage()); 45 | return R.ok().put("page", pageUtil); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/resources/mapper/job/ScheduleJobLogDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 21 | 22 | 30 | 31 | 32 | insert into schedule_job_log 33 | ( 34 | `job_id`, 35 | `bean_name`, 36 | `method_name`, 37 | `params`, 38 | `status`, 39 | `error`, 40 | `times`, 41 | `create_time` 42 | ) 43 | values 44 | ( 45 | #{jobId}, 46 | #{beanName}, 47 | #{methodName}, 48 | #{params}, 49 | #{status}, 50 | #{error}, 51 | #{times}, 52 | #{createTime} 53 | ) 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/main/resources/static/swagger/lang/translator.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Translator for documentation pages. 5 | * 6 | * To enable translation you should include one of language-files in your index.html 7 | * after . 8 | * For example - 9 | * 10 | * If you wish to translate some new texts you should do two things: 11 | * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. 12 | * 2. Mark that text it templates this way New Phrase or . 13 | * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. 14 | * 15 | */ 16 | window.SwaggerTranslator = { 17 | 18 | _words:[], 19 | 20 | translate: function(sel) { 21 | var $this = this; 22 | sel = sel || '[data-sw-translate]'; 23 | 24 | $(sel).each(function() { 25 | $(this).html($this._tryTranslate($(this).html())); 26 | 27 | $(this).val($this._tryTranslate($(this).val())); 28 | $(this).attr('title', $this._tryTranslate($(this).attr('title'))); 29 | }); 30 | }, 31 | 32 | _tryTranslate: function(word) { 33 | return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; 34 | }, 35 | 36 | learn: function(wordsMap) { 37 | this._words = wordsMap; 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /src/main/resources/views/modules/sys/log.html: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /src/main/resources/application-pro.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | type: com.alibaba.druid.pool.DruidDataSource 4 | driverClassName: com.mysql.jdbc.Driver 5 | druid: 6 | first: 7 | url: jdbc:mysql://localhost:3306/renren_fast?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 8 | username: renren 9 | password: 123456 10 | second: 11 | url: jdbc:mysql://localhost:3306/renren_fast?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 12 | username: renren 13 | password: 123456 14 | initial-size: 10 15 | max-active: 100 16 | min-idle: 10 17 | max-wait: 60000 18 | pool-prepared-statements: true 19 | max-pool-prepared-statement-per-connection-size: 20 20 | time-between-eviction-runs-millis: 60000 21 | min-evictable-idle-time-millis: 300000 22 | validation-query: SELECT 1 FROM DUAL 23 | test-while-idle: true 24 | test-on-borrow: false 25 | test-on-return: false 26 | stat-view-servlet: 27 | enabled: true 28 | url-pattern: /druid/* 29 | #login-username: admin 30 | #login-password: admin 31 | filter: 32 | stat: 33 | log-slow-sql: true 34 | slow-sql-millis: 1000 35 | merge-sql: true 36 | wall: 37 | config: 38 | multi-statement-allow: true 39 | -------------------------------------------------------------------------------- /src/main/resources/application-test.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | type: com.alibaba.druid.pool.DruidDataSource 4 | driverClassName: com.mysql.jdbc.Driver 5 | druid: 6 | first: 7 | url: jdbc:mysql://localhost:3306/renren_fast?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 8 | username: renren 9 | password: 123456 10 | second: 11 | url: jdbc:mysql://localhost:3306/renren_fast?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 12 | username: renren 13 | password: 123456 14 | initial-size: 10 15 | max-active: 100 16 | min-idle: 10 17 | max-wait: 60000 18 | pool-prepared-statements: true 19 | max-pool-prepared-statement-per-connection-size: 20 20 | time-between-eviction-runs-millis: 60000 21 | min-evictable-idle-time-millis: 300000 22 | validation-query: SELECT 1 FROM DUAL 23 | test-while-idle: true 24 | test-on-borrow: false 25 | test-on-return: false 26 | stat-view-servlet: 27 | enabled: true 28 | url-pattern: /druid/* 29 | #login-username: admin 30 | #login-password: admin 31 | filter: 32 | stat: 33 | log-slow-sql: true 34 | slow-sql-millis: 1000 35 | merge-sql: true 36 | wall: 37 | config: 38 | multi-statement-allow: true 39 | --------------------------------------------------------------------------------