├── .gitignore ├── .mvn └── wrapper │ └── maven-wrapper.properties ├── LICENSE ├── README.md ├── jeebiz-boot-sample-flowable-app └── pom.xml ├── jeebiz-boot-sample-flowable └── pom.xml ├── mvnw ├── mvnw.cmd ├── pom.xml ├── spring-boot-sample-axis2 └── pom.xml ├── spring-boot-sample-casclient └── pom.xml ├── spring-boot-sample-cxf └── pom.xml ├── spring-boot-sample-disruptor ├── pom.xml └── src │ ├── main │ ├── docker │ │ └── Dockerfile │ ├── java │ │ └── com │ │ │ └── lmax │ │ │ └── disruptor │ │ │ └── spring │ │ │ └── boot │ │ │ ├── DisruptorApplication.java │ │ │ ├── config │ │ │ └── DisruptorConfig.java │ │ │ └── handlers │ │ │ ├── EmailDisruptorHandler.java │ │ │ └── SmsDisruptorHandler.java │ └── resources │ │ ├── application.properties │ │ ├── application.yml │ │ └── log4j2.xml │ └── test │ └── java │ └── com │ └── lmax │ └── disruptor │ └── spring │ └── boot │ └── DisruptorApplicationTests.java ├── spring-boot-sample-druid-shiro ├── pom.xml ├── runenv │ ├── jeebiz-boot │ ├── setenv │ └── setenv.bat └── src │ └── main │ ├── java │ └── net │ │ └── jeebiz │ │ └── boot │ │ └── demo │ │ ├── DemoApplication.java │ │ ├── dao │ │ ├── IAuthzLoginDao.java │ │ ├── IDemoDao.java │ │ └── entities │ │ │ ├── AuthzLoginModel.java │ │ │ └── DemoModel.java │ │ ├── service │ │ ├── IAuthzLoginService.java │ │ ├── IDemoService.java │ │ └── impl │ │ │ ├── AuthzLoginServiceImpl.java │ │ │ ├── AuthzPrincipalRepositoryImpl.java │ │ │ └── DemoServiceImpl.java │ │ ├── setup │ │ ├── config │ │ │ ├── BootWebMvcConfig.java │ │ │ ├── DataSourceConfig.java │ │ │ ├── MybatisPlusConfig.java │ │ │ └── ShiroConfig.java │ │ ├── data │ │ │ └── LogConstant.java │ │ └── shiro │ │ │ └── LoginAuthorizingRealm.java │ │ └── web │ │ ├── mvc │ │ ├── AuthzLoginController.java │ │ ├── DemoController.java │ │ └── IndexController.java │ │ └── vo │ │ └── DemoVo.java │ └── resources │ ├── application.properties │ ├── application.yml │ ├── banner.txt │ ├── conf │ ├── ehcache │ │ ├── ehcache-metrics.xml │ │ └── ehcache.xml │ ├── log4j2-dev.xml │ ├── log4j2.xml │ ├── mybatis │ │ └── sqlMapConfig.xml │ └── security │ │ └── jeebiz-antixss-policy.xml │ ├── db │ └── migration │ │ ├── mysql │ │ ├── V1_0_0__初始化.sql │ │ └── V1_0_1__升级.sql │ │ └── oracle │ │ ├── V1_0_0__初始化.sql │ │ └── V1_0_1__升级.sql │ ├── i18n │ ├── messages.properties │ ├── messages_en_US.properties │ └── messages_zh_CN.properties │ ├── net │ └── jeebiz │ │ └── boot │ │ └── demo │ │ └── dao │ │ └── sqlmap │ │ ├── mysql │ │ ├── AuthzLoginMapper.xml │ │ └── DemoMapper.xml │ │ └── oracle │ │ ├── AuthzLoginMapper.xml │ │ └── DemoMapper.xml │ └── templates │ └── html │ ├── demo │ ├── edit-demo.html │ ├── index.html │ └── new-demo.html │ ├── footer.html │ └── index.html ├── spring-boot-sample-druid ├── pom.xml └── src │ ├── main │ ├── docker │ │ └── Dockerfile │ ├── java │ │ └── com │ │ │ └── alibaba │ │ │ └── druid │ │ │ └── spring │ │ │ └── boot │ │ │ ├── DruidApplication.java │ │ │ ├── dao │ │ │ ├── daointerface │ │ │ │ └── IUuidDao.java │ │ │ └── impl │ │ │ │ └── UuidDaoImpl.java │ │ │ ├── service │ │ │ ├── impl │ │ │ │ └── IUuidServiceImpl.java │ │ │ └── svcinterface │ │ │ │ └── IUuidService.java │ │ │ └── web │ │ │ └── controller │ │ │ └── HelloWorldController.java │ └── resources │ │ ├── application.properties │ │ ├── application.yml │ │ └── log4j2.xml │ └── test │ └── java │ └── com │ └── alibaba │ └── druid │ └── spring │ └── boot │ └── DruidApplicationTests.java ├── spring-boot-sample-ehcache3 ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── ehcache │ │ └── spring │ │ └── boot │ │ └── Ehcache3Application.java │ └── resources │ ├── application.yml │ └── log4j2.xml ├── spring-boot-sample-flyway ├── pom.xml └── src │ ├── main │ ├── docker │ │ └── Dockerfile │ ├── java │ │ └── org │ │ │ └── mybatis │ │ │ └── spring │ │ │ └── boot │ │ │ ├── MybatisApplication.java │ │ │ ├── dao │ │ │ └── daointerface │ │ │ │ └── IUuidDao.java │ │ │ ├── service │ │ │ ├── impl │ │ │ │ └── IUuidServiceImpl.java │ │ │ └── svcinterface │ │ │ │ └── IUuidService.java │ │ │ └── web │ │ │ └── controller │ │ │ └── HelloWorldController.java │ └── resources │ │ ├── application.yml │ │ ├── conf │ │ └── mybatis │ │ │ └── sqlMapConfig.xml │ │ └── log4j2.xml │ └── test │ └── java │ └── org │ └── mybatis │ └── spring │ └── boot │ └── MybatisApplicationTests.java ├── spring-boot-sample-hikaricp-shiro ├── pom.xml ├── runenv │ ├── jeebiz-boot │ ├── setenv │ └── setenv.bat └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── net │ │ └── jeebiz │ │ └── boot │ │ └── demo │ │ ├── DemoApplication.java │ │ ├── dao │ │ ├── IAuthzLoginDao.java │ │ ├── IDemoDao.java │ │ └── entities │ │ │ ├── AuthzLoginModel.java │ │ │ └── DemoModel.java │ │ ├── service │ │ ├── IAuthzLoginService.java │ │ ├── IDemoService.java │ │ └── impl │ │ │ ├── AuthzLoginServiceImpl.java │ │ │ ├── AuthzPrincipalRepositoryImpl.java │ │ │ └── DemoServiceImpl.java │ │ ├── setup │ │ ├── config │ │ │ ├── BootWebMvcConfig.java │ │ │ ├── DataSourceConfig.java │ │ │ ├── MybatisPlusConfig.java │ │ │ └── ShiroConfig.java │ │ ├── data │ │ │ └── LogConstant.java │ │ └── shiro │ │ │ └── LoginAuthorizingRealm.java │ │ └── web │ │ ├── mvc │ │ ├── AuthzLoginController.java │ │ ├── DemoController.java │ │ └── IndexController.java │ │ └── vo │ │ └── DemoVo.java │ └── resources │ ├── application.properties │ ├── application.yml │ ├── banner.txt │ ├── conf │ ├── ehcache │ │ ├── ehcache-metrics.xml │ │ └── ehcache.xml │ ├── log4j2-dev.xml │ ├── log4j2.xml │ ├── mybatis │ │ └── sqlMapConfig.xml │ └── security │ │ └── jeebiz-antixss-policy.xml │ ├── db │ └── migration │ │ ├── mysql │ │ ├── V1_0_0_10__初始化.sql │ │ └── V1_0_0_11__升级.sql │ │ └── oracle │ │ ├── V1_0_0_10__初始化.sql │ │ └── V1_0_0_11__升级.sql │ ├── i18n │ ├── messages.properties │ ├── messages_en_US.properties │ └── messages_zh_CN.properties │ ├── net │ └── jeebiz │ │ └── boot │ │ └── demo │ │ └── dao │ │ └── sqlmap │ │ ├── mysql │ │ ├── AuthzLoginMapper.xml │ │ └── DemoMapper.xml │ │ └── oracle │ │ ├── AuthzLoginMapper.xml │ │ └── DemoMapper.xml │ └── templates │ └── html │ ├── demo │ ├── edit-demo.html │ ├── index.html │ └── new-demo.html │ ├── footer.html │ └── index.html ├── spring-boot-sample-hikaricp ├── pom.xml └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── com │ │ └── zaxxer │ │ └── hikari │ │ └── spring │ │ └── boot │ │ └── HikariCPApplication.java │ └── resources │ ├── application.properties │ ├── application.yml │ └── log4j2.xml ├── spring-boot-sample-jetbrick ├── pom.xml └── src │ ├── main │ └── resources │ │ └── application.yml │ └── test │ └── resources │ └── application.yml ├── spring-boot-sample-kaptcha ├── pom.xml └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── com │ │ └── google │ │ └── code │ │ └── kaptcha │ │ └── spring │ │ └── boot │ │ └── KaptchaApplication.java │ └── resources │ ├── application.yml │ └── log4j2.xml ├── spring-boot-sample-log4j2 ├── pom.xml └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── org │ │ └── apache │ │ └── logging │ │ └── log4j │ │ └── spring │ │ └── boot │ │ └── Log4j2Application.java │ └── resources │ ├── application.yml │ └── log4j2.xml ├── spring-boot-sample-pf4j ├── pf4j-plugin-sample │ ├── README.md │ ├── pf4j-plugin-api │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── pf4j │ │ │ └── plugin │ │ │ └── api │ │ │ ├── AuthcExtensionPoint.java │ │ │ ├── AuthcExtensionPointAdepter.java │ │ │ ├── annotation │ │ │ ├── ApiExtensionMapping.java │ │ │ ├── ExtensionMapping.java │ │ │ └── PluginMapping.java │ │ │ └── exception │ │ │ └── PluginInvokeException.java │ ├── pf4j-plugin-impl1 │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── assembly │ │ │ └── assembly.xml │ │ │ └── java │ │ │ └── pf4j │ │ │ └── plugin │ │ │ └── impl │ │ │ ├── AuthcPluginImpl1.java │ │ │ ├── extensions │ │ │ └── AuthcExtensionPointImpl1.java │ │ │ └── utils │ │ │ └── Constant.java │ ├── pf4j-plugin-impl2 │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── assembly │ │ │ └── assembly.xml │ │ │ └── java │ │ │ └── pf4j │ │ │ └── plugin │ │ │ └── impl │ │ │ ├── AuthcPluginImpl2.java │ │ │ ├── extensions │ │ │ └── AuthcExtensionPointImpl2.java │ │ │ └── utils │ │ │ └── Constant.java │ ├── pf4j-plugin-test │ │ ├── plugins │ │ │ └── README.md │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── pf4j │ │ │ │ └── plugin │ │ │ │ └── test │ │ │ │ └── AuthcPluginTest.java │ │ │ └── resources │ │ │ ├── README.md │ │ │ ├── log4j-参数意义说明.properties │ │ │ └── log4j.properties │ └── pom.xml ├── plugins │ └── README.md ├── pom.xml └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── ro │ │ └── fortsoft │ │ └── pf4j │ │ └── spring │ │ └── boot │ │ └── Pf4jApplication.java │ └── resources │ ├── application.yml │ └── log4j2.xml ├── spring-boot-sample-pf4j2 ├── pf4j2-plugin-sample │ ├── README.md │ ├── pf4j2-plugin-api │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── pf4j2 │ │ │ └── plugin │ │ │ └── api │ │ │ ├── AuthcExtensionPoint.java │ │ │ ├── AuthcExtensionPointAdepter.java │ │ │ ├── annotation │ │ │ ├── ApiExtensionMapping.java │ │ │ ├── ExtensionMapping.java │ │ │ └── PluginMapping.java │ │ │ └── exception │ │ │ └── PluginInvokeException.java │ ├── pf4j2-plugin-impl1 │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── assembly │ │ │ └── assembly.xml │ │ │ └── java │ │ │ └── pf4j2 │ │ │ └── plugin │ │ │ └── impl │ │ │ ├── AuthcPluginImpl1.java │ │ │ ├── extensions │ │ │ └── AuthcExtensionPointImpl1.java │ │ │ └── utils │ │ │ └── Constant.java │ ├── pf4j2-plugin-impl2 │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── assembly │ │ │ └── assembly.xml │ │ │ └── java │ │ │ └── pf4j2 │ │ │ └── plugin │ │ │ └── impl │ │ │ ├── AuthcPluginImpl2.java │ │ │ ├── extensions │ │ │ └── AuthcExtensionPointImpl2.java │ │ │ └── utils │ │ │ └── Constant.java │ ├── pf4j2-plugin-test │ │ ├── plugins │ │ │ └── README.md │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── pf4j2 │ │ │ │ └── plugin │ │ │ │ └── test │ │ │ │ └── AuthcPluginTest.java │ │ │ └── resources │ │ │ ├── README.md │ │ │ ├── log4j-参数意义说明.properties │ │ │ └── log4j.properties │ └── pom.xml ├── plugins │ └── README.md ├── pom.xml └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── org │ │ └── pf4j │ │ └── spring │ │ └── boot │ │ └── Pf4jApplication.java │ └── resources │ ├── application.yml │ └── log4j2.xml ├── spring-boot-sample-rocketmq ├── pom.xml └── src │ ├── main │ ├── docker │ │ └── Dockerfile │ ├── java │ │ └── org │ │ │ └── apache │ │ │ └── rocketmq │ │ │ └── spring │ │ │ └── boot │ │ │ ├── RocketmqApplication.java │ │ │ ├── consumer │ │ │ └── pull │ │ │ │ ├── PullMessageQueueListener.java │ │ │ │ └── PullTaskCallbackImpl.java │ │ │ ├── event │ │ │ └── listener │ │ │ │ └── ConsumerListen.java │ │ │ ├── setup │ │ │ ├── LogProducer.java │ │ │ ├── Producer.java │ │ │ ├── QueueName.java │ │ │ ├── RocketmqDataInDbHandler.java │ │ │ └── RocketmqDataSmsHandler.java │ │ │ └── web │ │ │ └── controller │ │ │ ├── ProducerController.java │ │ │ ├── RocketMQController.java │ │ │ └── UserController.java │ └── resources │ │ ├── application.properties │ │ ├── application.yml │ │ └── log4j2.xml │ └── test │ └── java │ └── org │ └── apache │ └── rocketmq │ └── spring │ └── boot │ ├── RocketmqApplicationTests.java │ ├── org │ ├── BatchProducer.java │ ├── BroadcastConsumer.java │ ├── BroadcastProducer.java │ ├── ListSplitter.java │ ├── OrderedConsumer.java │ ├── OrderedProducer.java │ ├── ScheduledMessageConsumer.java │ ├── ScheduledMessageProducer.java │ ├── SimpleAsyncProducer.java │ ├── SimpleOnewayProducer.java │ └── SimpleSyncProducer.java │ └── quick-start.md ├── spring-boot-sample-sharding-jdbc └── pom.xml ├── spring-boot-sample-socketio ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── corundumstudio │ │ └── socketio │ │ └── spring │ │ └── boot │ │ ├── SocketioApplication.java │ │ ├── SocketioIndeController.java │ │ ├── config │ │ └── SocketioConfig.java │ │ ├── handler │ │ ├── MessageInfo.java │ │ └── SocketEventHandler.java │ │ └── listener │ │ ├── SocketConnectListener.java │ │ ├── SocketDataListener.java │ │ ├── SocketDisconnectListener.java │ │ ├── SocketExceptionListener.java │ │ └── SocketPingListener.java │ └── resources │ ├── application.yml │ ├── log4j2.xml │ └── templates │ └── html │ └── socketio │ ├── index.html │ └── tmp.js ├── spring-boot-sample-swagger2 ├── pom.xml └── src │ ├── main │ ├── docker │ │ └── Dockerfile │ ├── java │ │ └── io │ │ │ └── swagger2 │ │ │ └── spring │ │ │ └── boot │ │ │ ├── SwaggerApplication.java │ │ │ ├── dao │ │ │ ├── Result.java │ │ │ └── UserDto.java │ │ │ ├── setup │ │ │ └── config │ │ │ │ └── HttpStatus.java │ │ │ └── web │ │ │ └── controller │ │ │ ├── HelloWorldController.java │ │ │ └── UserController.java │ └── resources │ │ ├── application.yml │ │ └── log4j2.xml │ └── test │ └── java │ └── swagger2 │ └── spring │ └── boot │ └── DemoApplicationTests.java └── spring-boot-sample-websocket ├── pom.xml └── src └── main ├── java └── com │ └── github │ └── vindell │ └── websocket │ ├── HandshakeInterceptor.java │ ├── Monitor.java │ ├── WebSocketConfig.java │ ├── WebSocketHandshakeInterceptor.java │ ├── WebSocketTest.java │ ├── config │ ├── DefaultWebSocketBrokerConfig.java │ ├── DefaultWebSocketConfig.java │ └── WebSocketConfig.java │ ├── handler │ ├── ChatWebSocketHandler.java │ └── WebsocketEndPoint.java │ └── sd.java └── resources ├── static └── assets │ └── js │ ├── sockjs-pull-demo.js │ ├── sockjs-push-demo.js │ └── sockjs-stomp-demo.js └── templates └── html └── sockets ├── echo.ftl ├── index.ftl ├── reverse.ftl ├── snake.ftl ├── test.ftl ├── test2.ftl └── test3.ftl /.gitignore: -------------------------------------------------------------------------------- 1 | *# 2 | *.iml 3 | *.ipr 4 | *.iws 5 | *.jar 6 | *.sw? 7 | *~ 8 | .#* 9 | .*.md.html 10 | .apt_generated 11 | .DS_Store 12 | .classpath 13 | .factorypath 14 | .gradle 15 | .idea 16 | .metadata 17 | .project 18 | .recommenders 19 | .settings 20 | .springBeans 21 | .sts4-cache 22 | /build 23 | /code 24 | MANIFEST.MF 25 | _site/ 26 | activemq-data 27 | bin 28 | build 29 | build.log 30 | dependency-reduced-pom.xml 31 | dump.rdb 32 | interpolated*.xml 33 | lib/ 34 | manifest.yml 35 | overridedb.* 36 | settings.xml 37 | target 38 | transaction-logs 39 | .flattened-pom.xml 40 | secrets.yml 41 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spring-boot-starter-samples 2 | spring-boot-starter-samples 3 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 10 | 11 | net.jeebiz 12 | jeebiz-boot-parent 13 | 1.0.2-SNAPSHOT 14 | 15 | 16 | 17 | com.github.hiwepy 18 | spring-boot-starter-samples 19 | 1.0.0-SNAPSHOT 20 | 21 | pom 22 | Spring Boot Starter Samples 23 | Spring Boot Starter Samples 24 | 25 | 26 | spring-boot-sample-axis2 27 | spring-boot-sample-casclient 28 | spring-boot-sample-cxf 29 | spring-boot-sample-disruptor 30 | spring-boot-sample-druid 31 | spring-boot-sample-ehcache3 32 | spring-boot-sample-flyway 33 | spring-boot-sample-hikaricp 34 | spring-boot-sample-jetbrick 35 | spring-boot-sample-kaptcha 36 | spring-boot-sample-log4j2 37 | spring-boot-sample-pf4j 38 | spring-boot-sample-rocketmq 39 | spring-boot-sample-swagger2 40 | spring-boot-sample-websocket 41 | spring-boot-sample-sharding-jdbc 42 | spring-boot-sample-pf4j2 43 | spring-boot-sample-socketio 44 | 45 | 46 | -------------------------------------------------------------------------------- /spring-boot-sample-axis2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | com.github.hiwepy 8 | spring-boot-starter-samples 9 | 1.0.0-SNAPSHOT 10 | 11 | 12 | spring-boot-sample-axis2 13 | Spring Boot Axis2 Sample 14 | Spring Boot Axis2 Sample 15 | 16 | 17 | 18 | 19 | 20 | org.springframework.boot 21 | spring-boot-starter 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-logging 26 | 27 | 28 | 29 | 30 | com.github.hiwepy 31 | spring-boot-starter-axis2 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-web 36 | 37 | 38 | 39 | org.springframework.boot 40 | spring-boot-starter-test 41 | test 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-maven-plugin 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /spring-boot-sample-casclient/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | 8 | com.github.hiwepy 9 | spring-boot-starter-samples 10 | 1.0.0-SNAPSHOT 11 | 12 | 13 | spring-boot-sample-casclient 14 | Spring Boot CasClient Sample 15 | Spring Boot CasClient Sample 16 | 17 | 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-logging 27 | 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-web 33 | 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-starter-test 38 | test 39 | 40 | 41 | 42 | com.github.hiwepy 43 | spring-boot-starter-casclient 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-maven-plugin 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /spring-boot-sample-cxf/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | 8 | com.github.hiwepy 9 | spring-boot-starter-samples 10 | 1.0.0-SNAPSHOT 11 | 12 | 13 | spring-boot-sample-cxf 14 | Spring Boot Cxf Sample 15 | Spring Boot Cxf Sample 16 | 17 | 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-logging 27 | 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-web 33 | 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-starter-test 38 | test 39 | 40 | 41 | 42 | com.github.hiwepy 43 | spring-boot-starter-cxf-jaxws-plus 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-maven-plugin 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /spring-boot-sample-disruptor/src/main/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM 10.71.33.155/zfsoft/openjdk:1.8 2 | ENV LC_ALL en_US.UTF-8 3 | ENV TZ 'Asia/Shanghai' 4 | 5 | #创建日志目录和临时目录 6 | RUN mkdir -p /u01/boot/{logs,tmp} 7 | 8 | #拷贝本地文件到指定目录 9 | ADD /lib $BOOT/lib 10 | ADD /conf $BOOT/conf 11 | 12 | #ENV JAVA_HOME /opt/jdk 13 | #ENV PATH $PATH:$JAVA_HOME/bin 14 | 15 | EXPOSE 8081 16 | CMD ["java", "-classpath", "/u01/boot/conf:/u01/boot/lib/zftal-boot-datay.jar", "org.springframework.boot.loader.JarLauncher"] 17 | -------------------------------------------------------------------------------- /spring-boot-sample-disruptor/src/main/java/com/lmax/disruptor/spring/boot/DisruptorApplication.java: -------------------------------------------------------------------------------- 1 | package com.lmax.disruptor.spring.boot; 2 | 3 | import org.springframework.boot.ApplicationArguments; 4 | import org.springframework.boot.ApplicationRunner; 5 | import org.springframework.boot.CommandLineRunner; 6 | import org.springframework.boot.SpringApplication; 7 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 8 | import org.springframework.boot.autoconfigure.SpringBootApplication; 9 | import org.springframework.context.annotation.Configuration; 10 | import org.springframework.scheduling.annotation.EnableScheduling; 11 | 12 | @Configuration // 配置控制 13 | @EnableScheduling 14 | @EnableAutoConfiguration // 启用自动配置 15 | @SpringBootApplication 16 | public class DisruptorApplication implements ApplicationRunner, CommandLineRunner { 17 | 18 | public static void main(String[] args) throws Exception { 19 | SpringApplication.run(DisruptorApplication.class, args); 20 | } 21 | 22 | @Override 23 | public void run(ApplicationArguments args) throws Exception { 24 | 25 | } 26 | 27 | @Override 28 | public void run(String... args) throws Exception { 29 | 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-boot-sample-disruptor/src/main/java/com/lmax/disruptor/spring/boot/handlers/EmailDisruptorHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, hiwepy (https://github.com/hiwepy). 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.lmax.disruptor.spring.boot.handlers; 17 | 18 | import org.springframework.stereotype.Component; 19 | 20 | import com.lmax.disruptor.spring.boot.annotation.EventRule; 21 | import com.lmax.disruptor.spring.boot.event.DisruptorBindEvent; 22 | import com.lmax.disruptor.spring.boot.event.handler.DisruptorHandler; 23 | import com.lmax.disruptor.spring.boot.event.handler.chain.HandlerChain; 24 | 25 | @EventRule("/Event-Output/TagA-Output/**") 26 | @Component("emailHandler") 27 | public class EmailDisruptorHandler implements DisruptorHandler { 28 | 29 | @Override 30 | public void doHandler(DisruptorBindEvent event, HandlerChain handlerChain) throws Exception { 31 | System.out.println(event.toString()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-boot-sample-disruptor/src/main/java/com/lmax/disruptor/spring/boot/handlers/SmsDisruptorHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, hiwepy (https://github.com/hiwepy). 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.lmax.disruptor.spring.boot.handlers; 17 | 18 | import org.springframework.stereotype.Component; 19 | 20 | import com.lmax.disruptor.spring.boot.annotation.EventRule; 21 | import com.lmax.disruptor.spring.boot.event.DisruptorBindEvent; 22 | import com.lmax.disruptor.spring.boot.event.handler.DisruptorHandler; 23 | import com.lmax.disruptor.spring.boot.event.handler.chain.HandlerChain; 24 | 25 | @EventRule("/Event-Output/TagB-Output/**") 26 | @Component("smsHandler") 27 | public class SmsDisruptorHandler implements DisruptorHandler { 28 | 29 | @Override 30 | public void doHandler(DisruptorBindEvent event, HandlerChain handlerChain) throws Exception { 31 | System.out.println(event.toString()); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-boot-sample-disruptor/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiwepy/spring-boot-starter-samples/76d0df029b3b8f9d00b23f5aefdd394cc92869ae/spring-boot-sample-disruptor/src/main/resources/application.properties -------------------------------------------------------------------------------- /spring-boot-sample-disruptor/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8085 3 | 4 | spring: 5 | output: 6 | ansi: 7 | enabled: always 8 | messages: 9 | basename: /i18n/message 10 | profiles: 11 | active: dev 12 | 13 | ################################################################################################################ 14 | ###Disruptor (DisruptorProperties) 基本配置: 15 | ################################################################################################################ 16 | disruptor: 17 | enabled: true 18 | multi-producer: false 19 | ring-buffer-size: 1024 20 | ring-thread-numbers: 4 21 | #handler-definitions: 22 | # - /Event-DC-Output/TagA-Output/** = emailHandler 23 | # - /Event-DC-Output/TagB-Output/** = smsHandler 24 | 25 | #日志级别 26 | logging: 27 | config: classpath:log4j2.xml 28 | -------------------------------------------------------------------------------- /spring-boot-sample-disruptor/src/test/java/com/lmax/disruptor/spring/boot/DisruptorApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.lmax.disruptor.spring.boot; 2 | import org.junit.Test; 3 | import org.junit.runner.RunWith; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | import org.springframework.test.context.junit4.SpringRunner; 6 | 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) 10 | public class DisruptorApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/runenv/jeebiz-boot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #chkconfig: 2345 80 90 3 | #description:jeebiz-boot-app server 4 | #processname:jeebiz-boot-app 5 | 6 | #source function library 7 | #. /etc/rc.d/init.d/functions 8 | 9 | #application home 10 | export APP_HOME=/u01/jeebiz-boot-app 11 | 12 | #Document the app path 13 | echo document the curren path: "$APP_HOME" 14 | 15 | #Java environment 16 | #export JAVA_HOME="$APP_HOME/jre" 17 | #export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH 18 | #export PATH=$JAVA_HOME/bin:$PATH 19 | 20 | start() 21 | { 22 | echo -n $"Starting $prog:" 23 | $APP_HOME/bin/jeebiz-boot.sh & 24 | } 25 | 26 | stop() 27 | { 28 | echo -n $"Stopping $prog:" 29 | pid=$(ps x | grep jeebiz-boot-app | grep -v grep | awk '{print $1}') 30 | echo pid = "$pid" 31 | kill -9 $pid 32 | 33 | } 34 | 35 | case "$1" in 36 | start) 37 | start 38 | ;; 39 | stop) 40 | stop 41 | ;; 42 | *) 43 | echo $"Usage: $0 {start|stop}" 44 | RETVAL=1 45 | esac 46 | exit $RETVAL -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/runenv/setenv: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ -r "$BASEDIR/jre" ]; 3 | then 4 | #Java environment 5 | export JAVA_HOME=$BASEDIR/jre 6 | export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH 7 | export PATH=$JAVA_HOME/bin:$PATH 8 | echo "JAVA_HOME $JAVA_HOME" 9 | echo "CLASSPATH $CLASSPATH" 10 | else 11 | echo "JAVA_HOME $JAVA_HOME" 12 | echo "CLASSPATH $CLASSPATH" 13 | fi 14 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/runenv/setenv.bat: -------------------------------------------------------------------------------- 1 | :: 关闭终端回显 2 | @echo off 3 | setlocal enabledelayedexpansion 4 | 5 | if exist "%BASEDIR%\jre" goto setenv 6 | echo JAVA_HOME %JAVA_HOME% 7 | echo CLASSPATH %CLASSPATH% 8 | goto end 9 | 10 | :: Set Java environment 11 | :setenv 12 | SET "JAVA_HOME=%BASEDIR%\jre" 13 | SET "CLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;" 14 | SET "Path=%JAVA_HOME%\bin;%path%" 15 | echo JAVA_HOME %JAVA_HOME% 16 | echo CLASSPATH %CLASSPATH% 17 | goto end 18 | 19 | :end 20 | exit /b 0 -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package net.jeebiz.boot.demo; 2 | 3 | import javax.sql.DataSource; 4 | 5 | import org.dozer.spring.boot.EnableDozerMapper; 6 | import org.springframework.boot.CommandLineRunner; 7 | import org.springframework.boot.SpringApplication; 8 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; 10 | import org.springframework.cache.annotation.EnableCaching; 11 | import org.springframework.context.annotation.Bean; 12 | import org.springframework.jdbc.datasource.DataSourceTransactionManager; 13 | import org.springframework.scheduling.annotation.EnableScheduling; 14 | import org.springframework.transaction.PlatformTransactionManager; 15 | import org.springframework.transaction.annotation.EnableTransactionManagement; 16 | 17 | import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; 18 | import com.spring4all.swagger.EnableSwagger2Doc; 19 | 20 | import net.jeebiz.boot.autoconfigure.EnableServiceConfiguration; 21 | import net.jeebiz.boot.autoconfigure.EnableWebMvcConfiguration; 22 | 23 | // 这里特别注意排除Druid的默认初始化对象 24 | @EnableAutoConfiguration(exclude={DruidDataSourceAutoConfigure.class}) 25 | @EnableCaching(proxyTargetClass = true) 26 | @EnableSwagger2Doc 27 | @EnableDozerMapper 28 | @EnableScheduling 29 | @EnableServiceConfiguration 30 | @EnableWebMvcConfiguration 31 | @EnableTransactionManagement 32 | @SpringBootApplication 33 | public class DemoApplication implements CommandLineRunner { 34 | 35 | // 其中 dataSource 框架会自动为我们注入 36 | @Bean 37 | public PlatformTransactionManager txManager(DataSource dataSource) { 38 | return new DataSourceTransactionManager(dataSource); 39 | } 40 | 41 | public static void main(String[] args) throws Exception { 42 | SpringApplication.run(DemoApplication.class, args); 43 | } 44 | 45 | @Override 46 | public void run(String... args) throws Exception { 47 | System.err.println("Spring Boot Application(Jeebiz-Demo) Started !"); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/dao/IAuthzLoginDao.java: -------------------------------------------------------------------------------- 1 | package net.jeebiz.boot.demo.dao; 2 | 3 | import java.util.Map; 4 | 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import net.jeebiz.boot.api.dao.BaseDao; 9 | import net.jeebiz.boot.demo.dao.entities.AuthzLoginModel; 10 | 11 | /** 12 | * 登录查询Dao 13 | * 14 | * @author hiwepy 15 | */ 16 | @Mapper 17 | public interface IAuthzLoginDao extends BaseDao { 18 | 19 | /** 20 | * 根据用户ID和密码查询用户可否登录,角色数量等信息 21 | * @param username : 用户名 22 | * @param password : 密码,可不填 23 | * @return 用户账号状态信息 24 | */ 25 | public Map getAccountStatus(@Param(value = "username") String username, 26 | @Param(value = "password") String password); 27 | 28 | /*** 29 | * 根据用户ID和密码查询用户信息 30 | * @param username : 用户名 31 | * @param password : 密码,可不填 32 | * @return 用户登录信息 33 | */ 34 | public AuthzLoginModel getAccount(@Param(value = "username") String username, 35 | @Param(value = "password") String password); 36 | 37 | /*** 38 | * 根据用户ID无密码查询用户信息;用于单点登录 39 | * @param username : 用户名 40 | * @return 用户登录信息 41 | */ 42 | public AuthzLoginModel getAccountWithoutPwd(@Param(value = "username") String username); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/dao/IDemoDao.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.dao; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.apache.ibatis.annotations.Mapper; 11 | 12 | import net.jeebiz.boot.api.dao.BaseDao; 13 | import net.jeebiz.boot.demo.dao.entities.DemoModel; 14 | 15 | @Mapper 16 | public interface IDemoDao extends BaseDao{ 17 | 18 | /** 19 | * 获取指定ID关联的信息,以便进行删除前的逻辑检查 20 | * @param list 21 | * @return 22 | */ 23 | List> getDependencies(List list); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/dao/entities/DemoModel.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.dao.entities; 6 | 7 | import net.jeebiz.boot.api.dao.entities.BaseModel; 8 | 9 | public class DemoModel extends BaseModel{ 10 | 11 | private static final long serialVersionUID = 6189820231775242317L; 12 | 13 | private String id; 14 | 15 | private String name; 16 | 17 | private String text; 18 | 19 | public String getId() { 20 | return id; 21 | } 22 | 23 | public void setId(String id) { 24 | this.id = id; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | 35 | public String getText() { 36 | return text; 37 | } 38 | 39 | public void setText(String text) { 40 | this.text = text; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/service/IAuthzLoginService.java: -------------------------------------------------------------------------------- 1 | package net.jeebiz.boot.demo.service; 2 | 3 | import java.security.GeneralSecurityException; 4 | import java.security.interfaces.RSAPublicKey; 5 | import java.util.Map; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import net.jeebiz.boot.api.service.BaseService; 10 | import net.jeebiz.boot.demo.dao.entities.AuthzLoginModel; 11 | 12 | public interface IAuthzLoginService extends BaseService{ 13 | 14 | RSAPublicKey genPublicKey(HttpServletRequest request) throws GeneralSecurityException; 15 | 16 | /** 17 | * 根据用户ID和密码查询用户可否登录,角色数量等信息 18 | * @param username : 用户名 19 | * @param password : 密码,可不填 20 | * @return 用户账号状态信息 21 | */ 22 | Map getAccountStatus(String username, String password); 23 | 24 | /*** 25 | * 根据用户ID和密码查询用户信息 26 | * @param username : 用户名 27 | * @param password : 密码,可不填 28 | * @return 用户登录信息 29 | */ 30 | AuthzLoginModel getAccount(String username, String password); 31 | 32 | /*** 33 | * 根据用户ID无密码查询用户信息;用于单点登录 34 | * @param username : 用户名 35 | * @return 用户登录信息 36 | */ 37 | AuthzLoginModel getAccountWithoutPwd(String username); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/service/IDemoService.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.service; 6 | 7 | import net.jeebiz.boot.api.service.BaseService; 8 | import net.jeebiz.boot.demo.dao.entities.DemoModel; 9 | 10 | public interface IDemoService extends BaseService{ 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/service/impl/AuthzLoginServiceImpl.java: -------------------------------------------------------------------------------- 1 | package net.jeebiz.boot.demo.service.impl; 2 | 3 | 4 | import java.security.GeneralSecurityException; 5 | import java.security.interfaces.RSAPublicKey; 6 | import java.util.Map; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | 10 | import org.springframework.stereotype.Service; 11 | 12 | import net.jeebiz.boot.api.service.BaseServiceImpl; 13 | import net.jeebiz.boot.demo.dao.IAuthzLoginDao; 14 | import net.jeebiz.boot.demo.dao.entities.AuthzLoginModel; 15 | import net.jeebiz.boot.demo.service.IAuthzLoginService; 16 | 17 | @Service 18 | public class AuthzLoginServiceImpl extends BaseServiceImpl 19 | implements IAuthzLoginService { 20 | 21 | public static final String PRIVATE_KEY_ATTRIBUTE_NAME = "privateKey"; 22 | 23 | @Override 24 | public Map getAccountStatus(String username, String password) { 25 | return getDao().getAccountStatus(username, password); 26 | } 27 | 28 | @Override 29 | public AuthzLoginModel getAccount(String username, String password) { 30 | return getDao().getAccount(username, password); 31 | } 32 | 33 | @Override 34 | public AuthzLoginModel getAccountWithoutPwd(String username) { 35 | return getDao().getAccountWithoutPwd(username); 36 | } 37 | 38 | @Override 39 | public RSAPublicKey genPublicKey(HttpServletRequest request) throws GeneralSecurityException { 40 | 41 | /*KeyPair keyPair = SecretKeyUtils.genKeyPair("RSA"); 42 | RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); 43 | RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); 44 | 45 | SubjectUtils.getSession().setAttribute(PRIVATE_KEY_ATTRIBUTE_NAME, privateKey); 46 | 47 | return publicKey;*/ 48 | 49 | return null; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/service/impl/DemoServiceImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.service.impl; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import net.jeebiz.boot.api.service.BaseServiceImpl; 10 | import net.jeebiz.boot.demo.dao.IDemoDao; 11 | import net.jeebiz.boot.demo.dao.entities.DemoModel; 12 | import net.jeebiz.boot.demo.service.IDemoService; 13 | 14 | @Service 15 | public class DemoServiceImpl extends BaseServiceImpl implements IDemoService{ 16 | 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/setup/config/BootWebMvcConfig.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.setup.config; 6 | 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.web.servlet.config.annotation.EnableWebMvc; 9 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 10 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 11 | import org.springframework.web.servlet.resource.PathResourceResolver; 12 | import org.springframework.web.servlet.resource.WebJarsResourceResolver; 13 | 14 | @Configuration 15 | @EnableWebMvc 16 | public class BootWebMvcConfig implements WebMvcConfigurer { 17 | 18 | 19 | @Override 20 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 21 | registry.addResourceHandler("/assets/**").addResourceLocations("classpath:/static/assets/"); 22 | registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); 23 | registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/") 24 | .resourceChain(false).addResolver(new WebJarsResourceResolver()) 25 | .addResolver(new PathResourceResolver()); 26 | } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/setup/config/DataSourceConfig.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.setup.config; 6 | 7 | import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 9 | import org.springframework.context.annotation.Configuration; 10 | 11 | @Configuration 12 | @EnableConfigurationProperties(LiquibaseProperties.class) 13 | public class DataSourceConfig { 14 | 15 | /*@Bean 16 | * 17 | * https://www.cnblogs.com/jin-zhe/p/8203890.html 18 | public DataSource dragonHADataSource() throws Exception { 19 | return new DragonHADatasourceBuilder().build("dragon/dragon-ha-config.xml"); 20 | }*/ 21 | 22 | } -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/setup/data/LogConstant.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.setup.data; 6 | 7 | public class LogConstant { 8 | 9 | public static class Module{ 10 | 11 | public static final String N01 = "Demo模块"; 12 | } 13 | 14 | public static class BUSINESS { 15 | public static final String N010001 = "Demo业务"; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/setup/shiro/LoginAuthorizingRealm.java: -------------------------------------------------------------------------------- 1 | package net.jeebiz.boot.demo.setup.shiro; 2 | 3 | import org.apache.shiro.authc.UsernamePasswordToken; 4 | import org.apache.shiro.biz.realm.AbstractAuthorizingRealm; 5 | 6 | /** 7 | * Login AuthorizingRealm 8 | */ 9 | public class LoginAuthorizingRealm extends AbstractAuthorizingRealm { 10 | 11 | @Override 12 | public Class getAuthenticationTokenClass() { 13 | return UsernamePasswordToken.class;// 此Realm只支持UsernamePasswordToken 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/web/mvc/IndexController.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.web.mvc; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | 13 | /** 14 | * 系统默认的重定向地址 15 | */ 16 | @Controller 17 | public class IndexController { 18 | 19 | /** 20 | * 登录成功后的默认重定向地址:可重写返回的路径进行业务系统定制 21 | */ 22 | @RequestMapping("/index") 23 | public String index(HttpServletRequest request, Model model) { 24 | return "html/index"; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/java/net/jeebiz/boot/demo/web/vo/DemoVo.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jeebiz (http://jeebiz.net). 3 | * All Rights Reserved. 4 | */ 5 | package net.jeebiz.boot.demo.web.vo; 6 | 7 | import javax.validation.constraints.NotBlank; 8 | 9 | import org.hibernate.validator.constraints.SafeHtml; 10 | import org.springframework.web.multipart.MultipartFile; 11 | 12 | import io.swagger.annotations.ApiModel; 13 | import io.swagger.annotations.ApiModelProperty; 14 | 15 | @ApiModel(value = "DemoVo", description = "xxx数据传输对象") 16 | public class DemoVo { 17 | 18 | @ApiModelProperty(value = "xxID", required = true) 19 | private String id; 20 | @ApiModelProperty(value = "xx名称", required = true) 21 | @NotBlank(message = "名称必填") 22 | @SafeHtml(whitelistType = SafeHtml.WhiteListType.NONE) 23 | private String name; 24 | @ApiModelProperty(value = "xx描述", required = true) 25 | @NotBlank(message = "描述必填") 26 | @SafeHtml(whitelistType = SafeHtml.WhiteListType.NONE) 27 | private String text; 28 | @ApiModelProperty(value = "文件") 29 | //@StrictMimeTypeCheck 30 | private MultipartFile file; 31 | 32 | public String getId() { 33 | return id; 34 | } 35 | 36 | public void setId(String id) { 37 | this.id = id; 38 | } 39 | 40 | public String getName() { 41 | return name; 42 | } 43 | 44 | public void setName(String name) { 45 | this.name = name; 46 | } 47 | 48 | public String getText() { 49 | return text; 50 | } 51 | 52 | public void setText(String text) { 53 | this.text = text; 54 | } 55 | 56 | public MultipartFile getFile() { 57 | return file; 58 | } 59 | 60 | public void setFile(MultipartFile file) { 61 | this.file = file; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.main.allow-bean-definition-overriding=true -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ___ _ _ ______ _ 2 | |_ | | | (_) | ___ \ | | 3 | | | ___ ___| |__ _ ____ | |_/ / ___ ___ | |_ 4 | | |/ _ \/ _ \ '_ \| |_ / | ___ \/ _ \ / _ \| __| 5 | /\__/ / __/ __/ |_) | |/ / | |_/ / (_) | (_) | |_ 6 | \____/ \___|\___|_.__/|_/___| \____/ \___/ \___/ \__| 7 | 8 | Application Version: ${info.app.version} 9 | Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version} -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/db/migration/mysql/V1_0_0__初始化.sql: -------------------------------------------------------------------------------- 1 | 2 | SET FOREIGN_KEY_CHECKS=0; 3 | 4 | -- ---------------------------- 5 | -- Table structure for JEEBIZ_DEMO 6 | -- ---------------------------- 7 | DROP TABLE IF EXISTS `JEEBIZ_DEMO`; 8 | CREATE TABLE `JEEBIZ_DEMO` ( 9 | `ID` int(11) NOT NULL COMMENT 'ID', 10 | `NAME` varchar(50) DEFAULT NULL COMMENT '名称', 11 | `TEXT` varchar(255) DEFAULT NULL COMMENT '简述' 12 | PRIMARY KEY (`M_ID`) 13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Demo示例表'; 14 | 15 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/db/migration/mysql/V1_0_1__升级.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiwepy/spring-boot-starter-samples/76d0df029b3b8f9d00b23f5aefdd394cc92869ae/spring-boot-sample-druid-shiro/src/main/resources/db/migration/mysql/V1_0_1__升级.sql -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/db/migration/oracle/V1_0_0__初始化.sql: -------------------------------------------------------------------------------- 1 | -- Create table 2 | create table JEEBIZ_DEMO ( 3 | ID VARCHAR2(32) default sys_guid() not null, 4 | NAME VARCHAR2(100), 5 | TEXT CLOB null 6 | ); 7 | -- Add comments to the table 8 | comment on table JEEBIZ_DEMO is 'Demo示例表'; 9 | -- Add comments to the columns 10 | comment on column JEEBIZ_DEMO.ID is 'ID'; 11 | comment on column JEEBIZ_DEMO.NAME is '名称'; 12 | comment on column JEEBIZ_DEMO.TEXT is '简述'; 13 | -- Create/Recreate primary, unique and foreign key constraints 14 | alter table ZFTAL_SIMPLE_SIMPLE add constraint PK_JEEBIZ_DEMO primary key (ID); 15 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/db/migration/oracle/V1_0_1__升级.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiwepy/spring-boot-starter-samples/76d0df029b3b8f9d00b23f5aefdd394cc92869ae/spring-boot-sample-druid-shiro/src/main/resources/db/migration/oracle/V1_0_1__升级.sql -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/i18n/messages.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiwepy/spring-boot-starter-samples/76d0df029b3b8f9d00b23f5aefdd394cc92869ae/spring-boot-sample-druid-shiro/src/main/resources/i18n/messages.properties -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/i18n/messages_en_US.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiwepy/spring-boot-starter-samples/76d0df029b3b8f9d00b23f5aefdd394cc92869ae/spring-boot-sample-druid-shiro/src/main/resources/i18n/messages_en_US.properties -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/i18n/messages_zh_CN.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiwepy/spring-boot-starter-samples/76d0df029b3b8f9d00b23f5aefdd394cc92869ae/spring-boot-sample-druid-shiro/src/main/resources/i18n/messages_zh_CN.properties -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/net/jeebiz/boot/demo/dao/sqlmap/mysql/DemoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | insert into BIZ_SIMPLE(NAME,TEXT) values(#{name},#{text}) 14 | 15 | 16 | 17 | delete from BIZ_SIMPLE t where t.id = #{id} 18 | 19 | 20 | 21 | delete from BIZ_SIMPLE where id in 22 | 23 | #{ids} 24 | 25 | 26 | 27 | 28 | update BIZ_SIMPLE 29 | 30 | name = #{name}, 31 | text = #{text}, 32 | 33 | where id = #{id} 34 | 35 | 36 | 47 | 48 | 51 | 52 | 58 | 59 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/net/jeebiz/boot/demo/dao/sqlmap/oracle/DemoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | insert into BIZ_SIMPLE(NAME,TEXT) values(#{name},#{text}) 14 | 15 | 16 | 17 | delete from BIZ_SIMPLE t where t.id = #{id} 18 | 19 | 20 | 21 | delete from BIZ_SIMPLE where id in 22 | 23 | #{ids} 24 | 25 | 26 | 27 | 28 | update BIZ_SIMPLE 29 | 30 | name = #{name}, 31 | text = #{text}, 32 | 33 | where id = #{id} 34 | 35 | 36 | 47 | 48 | 51 | 52 | 58 | 59 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/templates/html/demo/edit-demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 |
9 |
10 |
11 | 12 |
13 | 14 |
15 |
16 |
17 |
18 |
19 | 20 |
21 | 23 |
24 |
25 |
26 |
27 |
28 | 29 | -------------------------------------------------------------------------------- /spring-boot-sample-druid-shiro/src/main/resources/templates/html/demo/new-demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
10 | 11 |
12 | 13 |
14 |
15 |
16 |
17 |
18 | 19 |
20 | 23 |
24 |
25 |
26 |
27 |
28 | 29 | -------------------------------------------------------------------------------- /spring-boot-sample-hikaricp-shiro/src/main/resources/templates/html/demo/new-demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 |
10 | 11 |
12 | 13 |
14 |
15 |
16 |
17 |
18 | 19 |
20 |