├── demo-pay ├── README.md ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── pay │ │ │ └── SpringBootDemoPayApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── pay │ │ └── SpringBootDemoPayApplicationTests.java └── .gitignore ├── demo-mq-rocketmq ├── README.md ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── mq │ │ │ └── rocketmq │ │ │ └── SpringBootDemoMqRocketmqApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── mq │ │ └── rocketmq │ │ └── SpringBootDemoMqRocketmqApplicationTests.java └── .gitignore ├── demo-tio ├── README.md ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── springbootdemotio │ │ │ └── SpringBootDemoTioApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── springbootdemotio │ │ └── SpringBootDemoTioApplicationTests.java └── .gitignore ├── demo-oauth ├── README.md ├── oauth-authorization-server │ ├── image │ │ ├── Code.png │ │ ├── Login.png │ │ ├── Confirm.png │ │ └── Logout.png │ └── src │ │ ├── main │ │ ├── resources │ │ │ ├── oauth2.jks │ │ │ ├── public.txt │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── oauth │ │ │ ├── service │ │ │ └── package-info.java │ │ │ ├── controller │ │ │ └── package-info.java │ │ │ ├── SpringBootDemoOauthApplication.java │ │ │ └── repostiory │ │ │ └── SysUserRepository.java │ │ └── test │ │ └── resources │ │ └── application.yml └── .gitignore ├── demo-uflo ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── uflo │ │ │ └── SpringBootDemoUfloApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── uflo │ │ └── SpringBootDemoUfloApplicationTests.java └── .gitignore ├── demo-urule ├── src │ ├── main │ │ ├── resources │ │ │ └── application.properties │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── urule │ │ │ └── SpringBootDemoUruleApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── urule │ │ └── SpringBootDemoUruleApplicationTests.java └── .gitignore ├── .github ├── FUNDING.yml ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── workflows │ └── maven.yml ├── demo-admin ├── admin-server │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── application.yml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── xkcoding │ │ │ │ └── admin │ │ │ │ └── server │ │ │ │ └── SpringBootDemoAdminServerApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── admin │ │ │ └── server │ │ │ └── SpringBootDemoAdminServerApplicationTests.java │ └── .gitignore └── admin-client │ ├── .gitignore │ └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── admin │ │ └── client │ │ └── SpringBootDemoAdminClientApplicationTests.java │ └── main │ └── java │ └── com │ └── xkcoding │ └── admin │ └── client │ ├── controller │ └── IndexController.java │ └── SpringBootDemoAdminClientApplication.java ├── demo-flyway ├── src │ ├── main │ │ ├── resources │ │ │ ├── db │ │ │ │ └── migration │ │ │ │ │ └── V1_1__ALTER.sql │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── flyway │ │ │ └── SpringBootDemoFlywayApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── AppTest.java └── .gitignore ├── demo-graylog ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── graylog │ │ │ └── SpringBootDemoGraylogApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── graylog │ │ └── SpringBootDemoGraylogApplicationTests.java └── .gitignore ├── demo-https ├── ssl.png ├── src │ ├── main │ │ ├── resources │ │ │ ├── server.keystore │ │ │ ├── static │ │ │ │ └── index.html │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── https │ │ │ └── SpringBootDemoHttpsApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── https │ │ └── SpringBootDemoHttpsApplicationTests.java └── .gitignore ├── demo-docker ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── docker │ │ │ ├── SpringBootDemoDockerApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── docker │ │ └── SpringBootDemoDockerApplicationTests.java ├── .gitignore └── Dockerfile ├── demo-war ├── src │ ├── main │ │ └── resources │ │ │ └── application.yml │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── war │ │ └── SpringBootDemoWarApplicationTests.java └── .gitignore ├── demo-codegen ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ ├── static │ │ │ │ └── libs │ │ │ │ │ └── iview │ │ │ │ │ └── fonts │ │ │ │ │ ├── ionicons.ttf │ │ │ │ │ └── ionicons.woff │ │ │ ├── template │ │ │ │ ├── Service.java.vm │ │ │ │ ├── Mapper.java.vm │ │ │ │ ├── Mapper.xml.vm │ │ │ │ └── ServiceImpl.java.vm │ │ │ └── jdbc_type.properties │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── codegen │ │ │ ├── constants │ │ │ └── GenConstants.java │ │ │ ├── common │ │ │ ├── IResultCode.java │ │ │ └── PageResult.java │ │ │ └── SpringBootDemoCodegenApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── codegen │ │ └── SpringBootDemoCodegenApplicationTests.java └── .gitignore ├── demo-helloworld ├── src │ ├── main │ │ └── resources │ │ │ └── application.yml │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── helloworld │ │ └── SpringBootDemoHelloworldApplicationTests.java └── .gitignore ├── demo-sharding-jdbc ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── sharding │ │ └── jdbc │ │ └── mapper │ │ └── OrderMapper.java └── .gitignore ├── demo-swagger ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── swagger │ │ │ ├── common │ │ │ └── ParamType.java │ │ │ └── SpringBootDemoSwaggerApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── swagger │ │ └── SpringBootDemoSwaggerApplicationTests.java └── .gitignore ├── demo-websocket ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── websocket │ │ │ ├── common │ │ │ └── WebSocketConsts.java │ │ │ ├── payload │ │ │ └── KV.java │ │ │ └── SpringBootDemoWebsocketApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── websocket │ │ └── SpringBootDemoWebsocketApplicationTests.java └── .gitignore ├── demo-log-aop ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── log │ │ │ └── aop │ │ │ └── SpringBootDemoLogAopApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── log │ │ └── aop │ │ └── SpringBootDemoLogAopApplicationTests.java └── .gitignore ├── demo-logback ├── src │ ├── main │ │ └── resources │ │ │ └── application.yml │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── logback │ │ └── SpringBootDemoLogbackApplicationTests.java └── .gitignore ├── demo-template-beetl ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── templates │ │ │ │ ├── page │ │ │ │ ├── index.btl │ │ │ │ └── login.btl │ │ │ │ └── common │ │ │ │ └── head.html │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── template │ │ │ └── beetl │ │ │ ├── model │ │ │ └── User.java │ │ │ └── SpringBootDemoTemplateBeetlApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── template │ │ └── beetl │ │ └── SpringBootDemoTemplateBeetlApplicationTests.java └── .gitignore ├── demo-template-enjoy ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── templates │ │ │ │ ├── page │ │ │ │ ├── index.html │ │ │ │ └── login.html │ │ │ │ └── common │ │ │ │ └── head.html │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── template │ │ │ └── enjoy │ │ │ ├── model │ │ │ └── User.java │ │ │ └── SpringBootDemoTemplateEnjoyApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── template │ │ └── enjoy │ │ └── SpringBootDemoTemplateEnjoyApplicationTests.java └── .gitignore ├── demo-email ├── src │ ├── main │ │ ├── resources │ │ │ ├── static │ │ │ │ └── xkcoding.png │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── email │ │ │ └── SpringBootDemoEmailApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── email │ │ └── SpringBootDemoEmailApplicationTests.java └── .gitignore ├── demo-properties ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ ├── application-dev.yml │ │ │ └── application-prod.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── properties │ │ │ ├── property │ │ │ ├── ApplicationProperty.java │ │ │ └── DeveloperProperty.java │ │ │ └── SpringBootDemoPropertiesApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── properties │ │ └── SpringBootDemoPropertiesApplicationTests.java └── .gitignore ├── demo-elasticsearch ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── elasticsearch │ │ │ ├── constants │ │ │ └── EsConsts.java │ │ │ ├── SpringBootDemoElasticsearchApplication.java │ │ │ └── repository │ │ │ └── PersonRepository.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── elasticsearch │ │ └── SpringBootDemoElasticsearchApplicationTests.java └── .gitignore ├── demo-ratelimit-guava ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── ratelimit │ │ │ └── guava │ │ │ ├── SpringBootDemoRatelimitGuavaApplication.java │ │ │ └── handler │ │ │ └── GlobalExceptionHandler.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── ratelimit │ │ └── guava │ │ └── SpringBootDemoRatelimitGuavaApplicationTests.java └── .gitignore ├── .codacy.yml ├── demo-neo4j ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── neo4j │ │ │ ├── repository │ │ │ ├── LessonRepository.java │ │ │ ├── TeacherRepository.java │ │ │ └── ClassRepository.java │ │ │ ├── config │ │ │ └── CustomIdStrategy.java │ │ │ ├── SpringBootDemoNeo4jApplication.java │ │ │ ├── payload │ │ │ ├── TeacherStudent.java │ │ │ └── ClassmateInfoGroupByLesson.java │ │ │ └── constants │ │ │ └── NeoConsts.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── neo4j │ │ └── SpringBootDemoNeo4jApplicationTests.java └── .gitignore ├── demo-websocket-socketio ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── websocket │ │ │ └── socketio │ │ │ ├── payload │ │ │ ├── BroadcastMessageRequest.java │ │ │ ├── JoinRequest.java │ │ │ ├── GroupMessageRequest.java │ │ │ └── SingleMessageRequest.java │ │ │ ├── config │ │ │ ├── Event.java │ │ │ └── WsConfig.java │ │ │ └── SpringBootDemoWebsocketSocketioApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── websocket │ │ └── socketio │ │ └── SpringBootDemoWebsocketSocketioApplicationTests.java └── .gitignore ├── demo-cache-ehcache ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── cache │ │ │ └── ehcache │ │ │ ├── entity │ │ │ └── User.java │ │ │ ├── SpringBootDemoCacheEhcacheApplication.java │ │ │ └── service │ │ │ └── UserService.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── cache │ │ └── ehcache │ │ └── SpringBootDemoCacheEhcacheApplicationTests.java └── .gitignore ├── demo-ldap ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── ldap │ │ ├── request │ │ └── LoginRequest.java │ │ ├── LdapDemoApplication.java │ │ ├── api │ │ └── ResultCode.java │ │ └── repository │ │ └── PersonRepository.java └── .gitignore ├── demo-zookeeper ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── zookeeper │ │ ├── SpringBootDemoZookeeperApplication.java │ │ └── config │ │ └── props │ │ └── ZkProps.java └── .gitignore ├── demo-template-freemarker ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── templates │ │ │ │ ├── page │ │ │ │ ├── index.ftl │ │ │ │ └── login.ftl │ │ │ │ └── common │ │ │ │ └── head.ftl │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── template │ │ │ └── freemarker │ │ │ ├── model │ │ │ └── User.java │ │ │ └── SpringBootDemoTemplateFreemarkerApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── template │ │ └── freemarker │ │ └── SpringBootDemoTemplateFreemarkerApplicationTests.java └── .gitignore ├── demo-mongodb ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── mongodb │ │ │ └── repository │ │ │ └── ArticleRepository.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── mongodb │ │ └── SpringBootDemoMongodbApplicationTests.java └── .gitignore ├── demo-task ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── task │ │ │ └── SpringBootDemoTaskApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── task │ │ └── SpringBootDemoTaskApplicationTests.java └── .gitignore ├── demo-dubbo ├── dubbo-consumer │ ├── src │ │ ├── main │ │ │ └── resources │ │ │ │ └── application.yml │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── dubbo │ │ │ └── consumer │ │ │ └── SpringBootDemoDubboConsumerApplicationTests.java │ └── .gitignore ├── dubbo-provider │ ├── src │ │ ├── main │ │ │ └── resources │ │ │ │ └── application.yml │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── dubbo │ │ │ └── provider │ │ │ └── SpringBootDemoDubboProviderApplicationTests.java │ └── .gitignore ├── .gitignore └── dubbo-common │ ├── .gitignore │ └── src │ └── main │ └── java │ └── com │ └── xkcoding │ └── dubbo │ └── common │ └── service │ └── HelloService.java ├── demo-elasticsearch-rest-high-level-client ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── elasticsearch │ │ ├── contants │ │ └── ElasticsearchConstant.java │ │ ├── ElasticsearchApplication.java │ │ └── common │ │ └── ResultCode.java └── .gitignore ├── demo-exception-handler ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── templates │ │ │ │ └── error.html │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── exception │ │ │ └── handler │ │ │ ├── exception │ │ │ ├── PageException.java │ │ │ └── JsonException.java │ │ │ └── SpringBootDemoExceptionHandlerApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── exception │ │ └── handler │ │ └── SpringBootDemoExceptionHandlerApplicationTests.java └── .gitignore ├── demo-template-thymeleaf ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── templates │ │ │ │ ├── page │ │ │ │ ├── index.html │ │ │ │ └── login.html │ │ │ │ └── common │ │ │ │ └── head.html │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── template │ │ │ └── thymeleaf │ │ │ ├── model │ │ │ └── User.java │ │ │ └── SpringBootDemoTemplateThymeleafApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── template │ │ └── thymeleaf │ │ └── SpringBootDemoTemplateThymeleafApplicationTests.java └── .gitignore ├── .editorconfig ├── demo-session ├── src │ ├── main │ │ ├── resources │ │ │ ├── templates │ │ │ │ ├── index.html │ │ │ │ └── login.html │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── session │ │ │ ├── constants │ │ │ └── Consts.java │ │ │ └── SpringBootDemoSessionApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── session │ │ └── SpringBootDemoSessionApplicationTests.java └── .gitignore ├── .gitee ├── PULL_REQUEST_TEMPLATE.md └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── demo-multi-datasource-mybatis ├── sql │ └── db.sql ├── .gitignore └── src │ ├── main │ └── java │ │ └── com │ │ └── xkcoding │ │ └── multi │ │ └── datasource │ │ └── mybatis │ │ ├── mapper │ │ └── UserMapper.java │ │ └── service │ │ └── UserService.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── multi │ └── datasource │ └── mybatis │ └── SpringBootDemoMultiDatasourceMybatisApplicationTests.java ├── demo-dynamic-datasource ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── xkcoding │ │ │ └── dynamic │ │ │ └── datasource │ │ │ ├── annotation │ │ │ └── DefaultDatasource.java │ │ │ ├── mapper │ │ │ ├── UserMapper.java │ │ │ └── DatasourceConfigMapper.java │ │ │ └── config │ │ │ └── MyMapper.java │ └── test │ │ └── java │ │ └── com │ │ └── xkcoding │ │ └── dynamic │ │ └── datasource │ │ └── SpringBootDemoDynamicDatasourceApplicationTests.java └── .gitignore ├── demo-activiti ├── .gitignore └── src │ └── main │ ├── resources │ └── application.yml │ └── java │ └── com │ └── xkcoding │ └── activiti │ └── SpringBootDemoActivitiApplication.java ├── demo-actuator ├── .gitignore └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── actuator │ │ └── SpringBootDemoActuatorApplicationTests.java │ └── main │ ├── java │ └── com │ │ └── xkcoding │ │ └── actuator │ │ └── SpringBootDemoActuatorApplication.java │ └── resources │ └── application.yml ├── demo-async ├── .gitignore └── src │ ├── main │ ├── resources │ │ └── application.yml │ └── java │ │ └── com │ │ └── xkcoding │ │ └── async │ │ └── SpringBootDemoAsyncApplication.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── async │ └── SpringBootDemoAsyncApplicationTests.java ├── demo-mq-kafka ├── .gitignore └── src │ └── main │ └── java │ └── com │ └── xkcoding │ └── mq │ └── kafka │ ├── constants │ └── KafkaConsts.java │ └── SpringBootDemoMqKafkaApplication.java ├── demo-orm-jpa ├── .gitignore └── src │ ├── main │ ├── resources │ │ └── db │ │ │ └── data.sql │ └── java │ │ └── com │ │ └── xkcoding │ │ └── orm │ │ └── jpa │ │ ├── repository │ │ ├── UserDao.java │ │ └── DepartmentDao.java │ │ └── SpringBootDemoOrmJpaApplication.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── orm │ └── jpa │ └── SpringBootDemoOrmJpaApplicationTests.java ├── demo-social ├── .gitignore └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── social │ │ └── SpringBootDemoSocialApplicationTests.java │ └── main │ └── java │ └── com │ └── xkcoding │ └── social │ └── SpringBootDemoSocialApplication.java ├── demo-upload ├── .gitignore └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── upload │ │ └── SpringBootDemoUploadApplicationTests.java │ └── main │ ├── java │ └── com │ │ └── xkcoding │ │ └── upload │ │ ├── controller │ │ └── IndexController.java │ │ ├── SpringBootDemoUploadApplication.java │ │ └── service │ │ └── IQiNiuService.java │ └── resources │ └── application.yml ├── demo-ureport2 ├── .gitignore └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── ureport2 │ │ └── SpringBootDemoUreport2ApplicationTests.java │ └── main │ ├── java │ └── com │ │ └── xkcoding │ │ └── ureport2 │ │ └── SpringBootDemoUreport2Application.java │ └── resources │ └── application.yml ├── demo-cache-redis ├── .gitignore └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── xkcoding │ │ │ └── cache │ │ │ └── redis │ │ │ ├── SpringBootDemoCacheRedisApplication.java │ │ │ ├── entity │ │ │ └── User.java │ │ │ └── service │ │ │ └── UserService.java │ └── resources │ │ └── application.yml │ └── test │ └── java │ └── com │ └── xkcoding │ └── cache │ └── redis │ └── SpringBootDemoCacheRedisApplicationTests.java ├── demo-mq-rabbitmq ├── .gitignore └── src │ └── main │ ├── resources │ └── application.yml │ └── java │ └── com │ └── xkcoding │ └── mq │ └── rabbitmq │ ├── SpringBootDemoMqRabbitmqApplication.java │ └── message │ └── MessageStruct.java ├── demo-orm-beetlsql ├── .gitignore └── src │ ├── main │ ├── resources │ │ └── db │ │ │ └── data.sql │ └── java │ │ └── com │ │ └── xkcoding │ │ └── orm │ │ └── beetlsql │ │ ├── dao │ │ └── UserDao.java │ │ └── SpringBootDemoOrmBeetlsqlApplication.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── orm │ └── beetlsql │ └── SpringBootDemoOrmBeetlsqlApplicationTests.java ├── demo-orm-mybatis ├── .gitignore └── src │ ├── main │ ├── resources │ │ └── db │ │ │ └── data.sql │ └── java │ │ └── com │ │ └── xkcoding │ │ └── orm │ │ └── mybatis │ │ └── SpringBootDemoOrmMybatisApplication.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── orm │ └── mybatis │ └── SpringBootDemoOrmMybatisApplicationTests.java ├── demo-rbac-security ├── .gitignore └── src │ ├── main │ └── java │ │ └── com │ │ └── xkcoding │ │ └── rbac │ │ └── security │ │ ├── payload │ │ ├── PageCondition.java │ │ └── LoginRequest.java │ │ ├── common │ │ └── IStatus.java │ │ ├── config │ │ ├── CustomConfig.java │ │ └── IdConfig.java │ │ ├── SpringBootDemoRbacSecurityApplication.java │ │ ├── model │ │ ├── UserRole.java │ │ └── RolePermission.java │ │ ├── repository │ │ ├── UserRoleDao.java │ │ └── RolePermissionDao.java │ │ └── vo │ │ └── JwtResponse.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── rbac │ └── security │ └── SpringBootDemoRbacSecurityApplicationTests.java ├── demo-rbac-shiro ├── .gitignore └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── xkcoding │ │ │ └── rbac │ │ │ └── shiro │ │ │ ├── common │ │ │ └── IResultCode.java │ │ │ ├── controller │ │ │ └── TestController.java │ │ │ └── SpringBootDemoRbacShiroApplication.java │ └── resources │ │ └── application.yml │ └── test │ └── java │ └── com │ └── xkcoding │ └── rbac │ └── shiro │ └── SpringBootDemoRbacShiroApplicationTests.java ├── demo-task-quartz ├── .gitignore └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── task │ │ └── quartz │ │ └── SpringBootDemoTaskQuartzApplicationTests.java │ └── main │ └── java │ └── com │ └── xkcoding │ └── task │ └── quartz │ ├── mapper │ └── JobMapper.java │ ├── job │ ├── TestJob.java │ └── HelloJob.java │ ├── util │ └── JobUtil.java │ └── SpringBootDemoTaskQuartzApplication.java ├── demo-task-xxl-job ├── .gitignore └── src │ └── main │ └── java │ └── com │ └── xkcoding │ └── task │ └── xxl │ └── job │ └── SpringBootDemoTaskXxlJobApplication.java ├── demo-orm-jdbctemplate ├── .gitignore └── src │ ├── main │ ├── resources │ │ └── db │ │ │ └── data.sql │ └── java │ │ └── com │ │ └── xkcoding │ │ └── orm │ │ └── jdbctemplate │ │ ├── constant │ │ └── Const.java │ │ ├── annotation │ │ ├── Ignore.java │ │ ├── Table.java │ │ ├── Column.java │ │ └── Pk.java │ │ └── SpringBootDemoOrmJdbctemplateApplication.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── orm │ └── jdbctemplate │ └── SpringBootDemoOrmJdbctemplateApplicationTests.java ├── demo-orm-mybatis-plus ├── .gitignore └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── xkcoding │ │ │ └── orm │ │ │ └── mybatis │ │ │ └── plus │ │ │ ├── mapper │ │ │ ├── RoleMapper.java │ │ │ └── UserMapper.java │ │ │ ├── service │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ │ └── UserServiceImpl.java │ │ │ └── SpringBootDemoOrmMybatisPlusApplication.java │ └── resources │ │ └── db │ │ └── data.sql │ └── test │ └── java │ └── com │ └── xkcoding │ └── orm │ └── mybatis │ └── plus │ └── SpringBootDemoOrmMybatisPlusApplicationTests.java ├── demo-swagger-beauty ├── .gitignore └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── swagger │ │ └── beauty │ │ └── SpringBootDemoSwaggerBeautyApplicationTests.java │ └── main │ └── java │ └── com │ └── xkcoding │ └── swagger │ └── beauty │ └── SpringBootDemoSwaggerBeautyApplication.java ├── demo-multi-datasource-jpa ├── .gitignore └── src │ └── main │ └── java │ └── com │ └── xkcoding │ └── multi │ └── datasource │ └── jpa │ ├── repository │ ├── second │ │ └── SecondMultiTableRepository.java │ └── primary │ │ └── PrimaryMultiTableRepository.java │ ├── config │ └── SnowflakeConfig.java │ └── SpringBootDemoMultiDatasourceJpaApplication.java ├── demo-orm-mybatis-mapper-page ├── .gitignore └── src │ ├── main │ ├── resources │ │ └── db │ │ │ └── data.sql │ └── java │ │ └── com │ │ └── xkcoding │ │ └── orm │ │ └── mybatis │ │ └── MapperAndPage │ │ └── mapper │ │ └── UserMapper.java │ └── test │ └── java │ └── com │ └── xkcoding │ └── orm │ └── mybatis │ └── MapperAndPage │ └── SpringBootDemoOrmMybatisMapperPageApplicationTests.java ├── .travis.yml ├── demo-ratelimit-redis ├── .gitignore └── src │ ├── test │ └── java │ │ └── com │ │ └── xkcoding │ │ └── ratelimit │ │ └── redis │ │ └── SpringBootDemoRatelimiterRedisApplicationTests.java │ └── main │ ├── resources │ └── application.yml │ └── java │ └── com │ └── xkcoding │ └── ratelimit │ └── redis │ └── SpringBootDemoRatelimitRedisApplication.java └── .gitignore /demo-pay/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo-mq-rocketmq/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo-tio/README.md: -------------------------------------------------------------------------------- 1 | # spring-boot-demo-tio -------------------------------------------------------------------------------- /demo-oauth/README.md: -------------------------------------------------------------------------------- 1 | # spring-boot-demo-oauth 2 | -------------------------------------------------------------------------------- /demo-tio/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo-uflo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo-urule/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo-mq-rocketmq/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: https://docs.xkcoding.com/SPONSER.html 2 | -------------------------------------------------------------------------------- /demo-admin/admin-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8000 3 | -------------------------------------------------------------------------------- /demo-flyway/src/main/resources/db/migration/V1_1__ALTER.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE t_user COMMENT = '用户 v1.1'; -------------------------------------------------------------------------------- /demo-graylog/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: graylog -------------------------------------------------------------------------------- /demo-https/ssl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-https/ssl.png -------------------------------------------------------------------------------- /demo-docker/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-pay/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-war/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-helloworld/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-sharding-jdbc/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | mybatis-plus: 2 | global-config: 3 | banner: false 4 | -------------------------------------------------------------------------------- /demo-swagger/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-websocket/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-log-aop/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | -------------------------------------------------------------------------------- /demo-logback/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | -------------------------------------------------------------------------------- /demo-template-beetl/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-template-enjoy/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo -------------------------------------------------------------------------------- /demo-https/src/main/resources/server.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-https/src/main/resources/server.keystore -------------------------------------------------------------------------------- /demo-email/src/main/resources/static/xkcoding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-email/src/main/resources/static/xkcoding.png -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/image/Code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-oauth/oauth-authorization-server/image/Code.png -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/image/Login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-oauth/oauth-authorization-server/image/Login.png -------------------------------------------------------------------------------- /demo-properties/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | profiles: 7 | active: prod -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/image/Confirm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-oauth/oauth-authorization-server/image/Confirm.png -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/image/Logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-oauth/oauth-authorization-server/image/Logout.png -------------------------------------------------------------------------------- /demo-elasticsearch/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | data: 3 | elasticsearch: 4 | cluster-name: docker-cluster 5 | cluster-nodes: localhost:9300 -------------------------------------------------------------------------------- /demo-ratelimit-guava/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | logging: 6 | level: 7 | com.xkcoding: debug 8 | -------------------------------------------------------------------------------- /.codacy.yml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude_paths: 3 | - '**.md' 4 | - '**/**.md' 5 | - '**.sql' 6 | - '**.html' 7 | - '**/static/**' 8 | - '**/templates/**' 9 | - '**/test/**' 10 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | data: 3 | neo4j: 4 | uri: bolt://localhost 5 | username: neo4j 6 | password: admin 7 | open-in-view: false -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | ws: 6 | server: 7 | port: 8081 8 | host: localhost -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/static/libs/iview/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-codegen/src/main/resources/static/libs/iview/fonts/ionicons.ttf -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/main/resources/oauth2.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-oauth/oauth-authorization-server/src/main/resources/oauth2.jks -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/static/libs/iview/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xkcoding/spring-boot-demo/HEAD/demo-codegen/src/main/resources/static/libs/iview/fonts/ionicons.woff -------------------------------------------------------------------------------- /demo-cache-ehcache/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cache: 3 | type: ehcache 4 | ehcache: 5 | config: classpath:ehcache.xml 6 | logging: 7 | level: 8 | com.xkcoding: debug -------------------------------------------------------------------------------- /demo-ldap/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | ldap: 3 | urls: ldap://localhost:389 4 | base: dc=example,dc=org 5 | username: cn=admin,dc=example,dc=org 6 | password: admin 7 | -------------------------------------------------------------------------------- /demo-zookeeper/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | 6 | zk: 7 | url: 127.0.0.1:2181 8 | timeout: 1000 9 | retry: 3 10 | -------------------------------------------------------------------------------- /demo-template-freemarker/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | freemarker: 7 | suffix: .ftl 8 | cache: false 9 | charset: UTF-8 -------------------------------------------------------------------------------- /demo-mongodb/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | data: 3 | mongodb: 4 | host: localhost 5 | port: 27017 6 | database: article_db 7 | logging: 8 | level: 9 | org.springframework.data.mongodb.core: debug -------------------------------------------------------------------------------- /demo-template-enjoy/src/main/resources/templates/page/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include("/common/head.html") 4 | 5 |
6 | 欢迎登录,#(user.name)! 7 |
8 | 9 | -------------------------------------------------------------------------------- /demo-template-beetl/src/main/resources/templates/page/index.btl: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% include("/common/head.html"){} %> 4 | 5 |
6 | 欢迎登录,${user.name}! 7 |
8 | 9 | -------------------------------------------------------------------------------- /demo-template-freemarker/src/main/resources/templates/page/index.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | <#include "../common/head.ftl"> 4 | 5 |
6 | 欢迎登录,${user.name}! 7 |
8 | 9 | -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/main/java/com/xkcoding/oauth/service/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * service 层,继承并实现 spring 接口. 3 | * 4 | * @author EchoCow 5 | * @date 2020-01-07 9:16 6 | */ 7 | package com.xkcoding.oauth.service; 8 | -------------------------------------------------------------------------------- /demo-properties/src/main/resources/application-dev.yml: -------------------------------------------------------------------------------- 1 | application: 2 | name: dev环境 @artifactId@ 3 | version: dev环境 @version@ 4 | developer: 5 | name: dev环境 xkcoding 6 | website: dev环境 http://xkcoding.com 7 | qq: dev环境 237497819 8 | phone-number: dev环境 17326075631 -------------------------------------------------------------------------------- /demo-task/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | # 下面的配置等同于 TaskConfig 6 | #spring: 7 | # task: 8 | # scheduling: 9 | # pool: 10 | # size: 20 11 | # thread-name-prefix: Job-Thread- -------------------------------------------------------------------------------- /demo-dubbo/dubbo-consumer/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | 6 | spring: 7 | dubbo: 8 | application: 9 | name: spring-boot-demo-dubbo-consumer 10 | registry: zookeeper://127.0.0.1:2181 -------------------------------------------------------------------------------- /demo-dubbo/dubbo-provider/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9090 3 | servlet: 4 | context-path: /demo 5 | 6 | spring: 7 | dubbo: 8 | application: 9 | name: spring-boot-demo-dubbo-provider 10 | registry: zookeeper://localhost:2181 -------------------------------------------------------------------------------- /demo-elasticsearch-rest-high-level-client/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | demo: 2 | data: 3 | elasticsearch: 4 | cluster-name: elasticsearch 5 | cluster-nodes: 20.20.0.27:9200 6 | index: 7 | number-of-replicas: 0 8 | number-of-shards: 3 9 | -------------------------------------------------------------------------------- /demo-exception-handler/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | thymeleaf: 7 | cache: false 8 | mode: HTML 9 | encoding: UTF-8 10 | servlet: 11 | content-type: text/html -------------------------------------------------------------------------------- /demo-properties/src/main/resources/application-prod.yml: -------------------------------------------------------------------------------- 1 | application: 2 | name: prod环境 @artifactId@ 3 | version: prod环境 @version@ 4 | developer: 5 | name: prod环境 xkcoding 6 | website: prod环境 http://xkcoding.com 7 | qq: prod环境 237497819 8 | phone-number: prod环境 17326075631 -------------------------------------------------------------------------------- /demo-template-thymeleaf/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | thymeleaf: 7 | mode: HTML 8 | encoding: UTF-8 9 | servlet: 10 | content-type: text/html 11 | cache: false -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # 开发组IDE 编辑器标准 2 | root = true 3 | 4 | [*] 5 | indent_size = 2 6 | charset = utf-8 7 | indent_style = space 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.{groovy, java, kt, kts, xsd}] 13 | indent_size = 4 14 | -------------------------------------------------------------------------------- /demo-https/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | spring boot demo https 6 | 7 | 8 |

9 | spring boot demo https 10 |

11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo-https/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | ssl: 3 | # 证书路径 4 | key-store: classpath:server.keystore 5 | key-alias: tomcat 6 | enabled: true 7 | key-store-type: JKS 8 | #与申请时输入一致 9 | key-store-password: 123456 10 | # 浏览器默认端口 和 80 类似 11 | port: 443 12 | -------------------------------------------------------------------------------- /demo-session/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | spring-boot-demo-session 6 | 7 | 8 | token的值:

9 | 10 | -------------------------------------------------------------------------------- /demo-exception-handler/src/main/resources/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 统一页面异常处理 6 | 7 | 8 |

统一页面异常处理

9 |
10 | 11 | -------------------------------------------------------------------------------- /demo-template-thymeleaf/src/main/resources/templates/page/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 欢迎登录,! 7 |
8 | 9 | -------------------------------------------------------------------------------- /.gitee/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * PR 修复缺陷请先开 `issue` **[报告缺陷](https://github.com/xkcoding/spring-boot-demo/issues/new?template=bug_report.md)** 2 | * PR 提交新特性请先开 `issue` **[报告新特性](https://github.com/xkcoding/spring-boot-demo/issues/new?template=feature_request.md)** 3 | * PR 请提交到 `dev` 开发分支上 4 | * 我们对编码风格有着较为严格的要求,请在阅读代码后模仿类似风格提交 5 | * 欢迎通过 PR 给我们补充案例 6 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * PR 修复缺陷请先开 `issue` **[报告缺陷](https://github.com/xkcoding/spring-boot-demo/issues/new?template=bug_report.md)** 2 | * PR 提交新特性请先开 `issue` **[报告新特性](https://github.com/xkcoding/spring-boot-demo/issues/new?template=feature_request.md)** 3 | * PR 请提交到 `dev` 开发分支上 4 | * 我们对编码风格有着较为严格的要求,请在阅读代码后模仿类似风格提交 5 | * 欢迎通过 PR 给我们补充案例 6 | -------------------------------------------------------------------------------- /demo-websocket/src/main/java/com/xkcoding/websocket/common/WebSocketConsts.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.common; 2 | 3 | /** 4 | *

5 | * WebSocket常量 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-12-14 16:01 10 | */ 11 | public interface WebSocketConsts { 12 | String PUSH_SERVER = "/topic/server"; 13 | } 14 | -------------------------------------------------------------------------------- /demo-https/src/test/java/com/xkcoding/https/SpringBootDemoHttpsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.https; 2 | 3 | import org.junit.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootDemoHttpsApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /demo-multi-datasource-mybatis/sql/db.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `multi_user`; 2 | CREATE TABLE `multi_user`( 3 | `id` bigint(64) NOT NULL, 4 | `name` varchar(50) DEFAULT NULL, 5 | `age` int(30) DEFAULT NULL, 6 | PRIMARY KEY (`id`) USING BTREE 7 | ) ENGINE = InnoDB 8 | AUTO_INCREMENT = 1 9 | CHARACTER SET = utf8 10 | COLLATE = utf8_general_ci; 11 | -------------------------------------------------------------------------------- /demo-template-freemarker/src/main/resources/templates/common/head.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | spring-boot-template-freemarker 7 | -------------------------------------------------------------------------------- /demo-template-beetl/src/main/resources/templates/common/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | spring-boot-demo-template-beetl 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo-template-enjoy/src/main/resources/templates/common/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | spring-boot-demo-template-enjoy 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo-dynamic-datasource/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | datasource: 7 | url: jdbc:mysql://127.0.0.1:3306/spring-boot-demo?useUnicode=true&characterEncoding=utf-8&useSSL=false 8 | username: root 9 | password: root 10 | driver-class-name: com.mysql.cj.jdbc.Driver 11 | -------------------------------------------------------------------------------- /demo-codegen/src/main/java/com/xkcoding/codegen/constants/GenConstants.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.codegen.constants; 2 | 3 | /** 4 | *

5 | * 常量池 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2019-03-22 10:04 10 | */ 11 | public interface GenConstants { 12 | /** 13 | * 签名 14 | */ 15 | String SIGNATURE = "xkcoding代码生成"; 16 | } 17 | -------------------------------------------------------------------------------- /demo-session/src/main/java/com/xkcoding/session/constants/Consts.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.session.constants; 2 | 3 | /** 4 | *

5 | * 常量池 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-12-19 19:42 10 | */ 11 | public interface Consts { 12 | /** 13 | * session保存的key 14 | */ 15 | String SESSION_KEY = "key:session:token"; 16 | } 17 | -------------------------------------------------------------------------------- /demo-session/src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | spring-boot-demo-session 6 | 7 | 8 |

9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.gitee/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 请求新功能 3 | about: 提出你期待的功能特性 4 | title: "[FEATURE]" 5 | labels: feature 6 | assignees: xkcoding 7 | --- 8 | 9 | ### 你在什么场景下需要该功能? 10 | 11 | 请尽量清晰精准地描述你碰到的问题。 12 | 13 | ### 描述可能的解决方案 14 | 15 | 请尽量清晰精准地描述你期待我们要做的,描述你想到的实现方案。 16 | 17 | ### 描述你认为的候选方案 18 | 19 | 请尽量清晰精准地描述你能接受的候选解决方案。 20 | 21 | ### 其他信息 22 | 23 | 请提供关于该功能建议的其他附加信息。 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 请求新功能 3 | about: 提出你期待的功能特性 4 | title: "[FEATURE]" 5 | labels: feature 6 | assignees: xkcoding 7 | --- 8 | 9 | ### 你在什么场景下需要该功能? 10 | 11 | 请尽量清晰精准地描述你碰到的问题。 12 | 13 | ### 描述可能的解决方案 14 | 15 | 请尽量清晰精准地描述你期待我们要做的,描述你想到的实现方案。 16 | 17 | ### 描述你认为的候选方案 18 | 19 | 请尽量清晰精准地描述你能接受的候选解决方案。 20 | 21 | ### 其他信息 22 | 23 | 请提供关于该功能建议的其他附加信息。 24 | -------------------------------------------------------------------------------- /demo-pay/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-war/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-activiti/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-actuator/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-async/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-docker/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-dubbo/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-email/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-ldap/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-log-aop/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-logback/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-mongodb/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-mq-kafka/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-neo4j/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-oauth/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-orm-jpa/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-session/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-social/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-swagger/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-task/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-template-beetl/src/main/java/com/xkcoding/template/beetl/model/User.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.beetl.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 用户 model 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-10-10 11:18 12 | */ 13 | @Data 14 | public class User { 15 | private String name; 16 | private String password; 17 | } 18 | -------------------------------------------------------------------------------- /demo-template-enjoy/src/main/java/com/xkcoding/template/enjoy/model/User.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.enjoy.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 用户 model 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-10-11 14:21 12 | */ 13 | @Data 14 | public class User { 15 | private String name; 16 | private String password; 17 | } 18 | -------------------------------------------------------------------------------- /demo-uflo/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-upload/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-ureport2/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-urule/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-cache-ehcache/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-cache-redis/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-elasticsearch/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-helloworld/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-mq-rabbitmq/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-mq-rocketmq/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-orm-beetlsql/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-orm-mybatis/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-properties/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-rbac-security/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-rbac-shiro/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-sharding-jdbc/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-task-quartz/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-task-xxl-job/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-tio/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /nbbuild/ 22 | /dist/ 23 | /nbdist/ 24 | /.nb-gradle/ 25 | /build/ 26 | -------------------------------------------------------------------------------- /demo-websocket/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-zookeeper/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-admin/admin-client/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-admin/admin-server/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-dubbo/dubbo-common/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-exception-handler/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-flyway/src/test/java/com/xkcoding/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.assertTrue; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest { 11 | /** 12 | * Rigorous Test :-) 13 | */ 14 | @Test 15 | public void shouldAnswerWithTrue() { 16 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /demo-mq-rabbitmq/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | rabbitmq: 7 | host: localhost 8 | port: 5672 9 | username: guest 10 | password: guest 11 | virtual-host: / 12 | # 手动提交消息 13 | listener: 14 | simple: 15 | acknowledge-mode: manual 16 | direct: 17 | acknowledge-mode: manual -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-swagger-beauty/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-template-beetl/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-template-enjoy/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-template-thymeleaf/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-template-thymeleaf/src/main/java/com/xkcoding/template/thymeleaf/model/User.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.thymeleaf.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 用户 model 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-10-10 10:11 12 | */ 13 | @Data 14 | public class User { 15 | private String name; 16 | private String password; 17 | } 18 | -------------------------------------------------------------------------------- /demo-websocket-socketio/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-dubbo/dubbo-consumer/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-dubbo/dubbo-provider/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-multi-datasource-jpa/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-orm-mybatis-mapper-page/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-template-freemarker/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-template-freemarker/src/main/java/com/xkcoding/template/freemarker/model/User.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.freemarker.model; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 用户 model 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-10-19 15:06 12 | */ 13 | @Data 14 | public class User { 15 | private String name; 16 | private String password; 17 | } 18 | -------------------------------------------------------------------------------- /demo-multi-datasource-mybatis/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-async/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | task: 3 | execution: 4 | pool: 5 | # 最大线程数 6 | max-size: 16 7 | # 核心线程数 8 | core-size: 16 9 | # 存活时间 10 | keep-alive: 10s 11 | # 队列大小 12 | queue-capacity: 100 13 | # 是否允许核心线程超时 14 | allow-core-thread-timeout: true 15 | # 线程名称前缀 16 | thread-name-prefix: async-task- -------------------------------------------------------------------------------- /demo-elasticsearch-rest-high-level-client/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /build/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ -------------------------------------------------------------------------------- /demo-ldap/src/main/java/com/xkcoding/ldap/request/LoginRequest.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ldap.request; 2 | 3 | import lombok.Builder; 4 | import lombok.Data; 5 | 6 | /** 7 | * LoginRequest 8 | * 9 | * @author fxbin 10 | * @version v1.0 11 | * @since 2019-08-26 1:50 12 | */ 13 | @Data 14 | @Builder 15 | public class LoginRequest { 16 | 17 | private String username; 18 | 19 | private String password; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # 语言 2 | language: java 3 | # 执行脚本 4 | script: "mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true -B -V" 5 | # 通知 6 | notifications: 7 | email: 8 | recipients: 9 | - 237497819@qq.com 10 | on_success: always # default: change 11 | on_failure: always # default: always 12 | # 缓存 13 | cache: 14 | directories: 15 | - '$HOME/.m2/repository' 16 | 17 | branches: 18 | only: 19 | - master 20 | -------------------------------------------------------------------------------- /demo-elasticsearch-rest-high-level-client/src/main/java/com/xkcoding/elasticsearch/contants/ElasticsearchConstant.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.elasticsearch.contants; 2 | 3 | /** 4 | * ElasticsearchConstant 5 | * 6 | * @author fxbin 7 | * @version v1.0 8 | * @since 2019-09-15 23:03 9 | */ 10 | public interface ElasticsearchConstant { 11 | 12 | /** 13 | * 索引名称 14 | */ 15 | String INDEX_NAME = "person"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /demo-codegen/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | 4 | ### STS ### 5 | .apt_generated 6 | .classpath 7 | .factorypath 8 | .project 9 | .settings 10 | .springBeans 11 | .sts4-cache 12 | 13 | ### IntelliJ IDEA ### 14 | .idea 15 | *.iws 16 | *.iml 17 | *.ipr 18 | 19 | ### NetBeans ### 20 | /nbproject/private/ 21 | /nbbuild/ 22 | /dist/ 23 | /nbdist/ 24 | /.nb-gradle/ 25 | /build/ 26 | 27 | ### VS Code ### 28 | .vscode/ 29 | -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/template/Service.java.vm: -------------------------------------------------------------------------------- 1 | package ${package}.${moduleName}.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import ${package}.${moduleName}.entity.${className}; 5 | 6 | /** 7 | *

8 | * ${comments} 9 | *

10 | * 11 | * @author ${author} 12 | * @date Created in ${datetime} 13 | */ 14 | public interface ${className}Service extends IService<${className}> { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-orm-jpa/src/main/resources/db/data.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (1, 'user_1', 'ff342e862e7c3285cdc07e56d6b8973b', '412365a109674b2dbb1981ed561a4c70', 'user1@xkcoding.com', '17300000001'); 2 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (2, 'user_2', '6c6bf02c8d5d3d128f34b1700cb1e32c', 'fcbdd0e8a9404a5585ea4e01d0e4d7a0', 'user2@xkcoding.com', '17300000002'); -------------------------------------------------------------------------------- /demo-orm-beetlsql/src/main/resources/db/data.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (1, 'user_1', 'ff342e862e7c3285cdc07e56d6b8973b', '412365a109674b2dbb1981ed561a4c70', 'user1@xkcoding.com', '17300000001'); 2 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (2, 'user_2', '6c6bf02c8d5d3d128f34b1700cb1e32c', 'fcbdd0e8a9404a5585ea4e01d0e4d7a0', 'user2@xkcoding.com', '17300000002'); -------------------------------------------------------------------------------- /demo-orm-mybatis/src/main/resources/db/data.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (1, 'user_1', 'ff342e862e7c3285cdc07e56d6b8973b', '412365a109674b2dbb1981ed561a4c70', 'user1@xkcoding.com', '17300000001'); 2 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (2, 'user_2', '6c6bf02c8d5d3d128f34b1700cb1e32c', 'fcbdd0e8a9404a5585ea4e01d0e4d7a0', 'user2@xkcoding.com', '17300000002'); -------------------------------------------------------------------------------- /demo-template-enjoy/src/main/resources/templates/page/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include("/common/head.html") 4 | 5 |
6 |
7 | 用户名 8 | 密码 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/jdbc_type.properties: -------------------------------------------------------------------------------- 1 | tinyint=TINYINT 2 | smallint=SMALLINT 3 | mediumint=MEDIUMINT 4 | int=INTEGER 5 | integer=INTEGER 6 | bigint=BIGINT 7 | float=FLOAT 8 | double=DOUBLE 9 | decimal=DECIMAL 10 | bit=BIT 11 | char=CHAR 12 | varchar=VARCHAR 13 | tinytext=VARCHAR 14 | text=VARCHAR 15 | mediumtext=VARCHAR 16 | longtext=VARCHAR 17 | date=DATE 18 | datetime=DATETIME 19 | timestamp=TIMESTAMP 20 | blob=BLOB 21 | longblob=LONGBLOB 22 | -------------------------------------------------------------------------------- /demo-dubbo/dubbo-common/src/main/java/com/xkcoding/dubbo/common/service/HelloService.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dubbo.common.service; 2 | 3 | /** 4 | *

5 | * Hello服务接口 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-12-25 16:56 10 | */ 11 | public interface HelloService { 12 | /** 13 | * 问好 14 | * 15 | * @param name 姓名 16 | * @return 问好 17 | */ 18 | String sayHello(String name); 19 | } 20 | -------------------------------------------------------------------------------- /demo-flyway/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | -------------------------------------------------------------------------------- /demo-graylog/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | /target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | 5 | ### STS ### 6 | .apt_generated 7 | .classpath 8 | .factorypath 9 | .project 10 | .settings 11 | .springBeans 12 | .sts4-cache 13 | 14 | ### IntelliJ IDEA ### 15 | .idea 16 | *.iws 17 | *.iml 18 | *.ipr 19 | 20 | ### NetBeans ### 21 | /nbproject/private/ 22 | /nbbuild/ 23 | /dist/ 24 | /nbdist/ 25 | /.nb-gradle/ 26 | /build/ 27 | 28 | ### VS Code ### 29 | .vscode/ 30 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/main/resources/db/data.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (1, 'user_1', 'ff342e862e7c3285cdc07e56d6b8973b', '412365a109674b2dbb1981ed561a4c70', 'user1@xkcoding.com', '17300000001'); 2 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (2, 'user_2', '6c6bf02c8d5d3d128f34b1700cb1e32c', 'fcbdd0e8a9404a5585ea4e01d0e4d7a0', 'user2@xkcoding.com', '17300000002'); -------------------------------------------------------------------------------- /demo-template-beetl/src/main/resources/templates/page/login.btl: -------------------------------------------------------------------------------- 1 | 2 | 3 | <% include("/common/head.html"){} %> 4 | 5 |
6 |
7 | 用户名 8 | 密码 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /demo-template-freemarker/src/main/resources/templates/page/login.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | <#include "../common/head.ftl"> 4 | 5 |
6 |
7 | 用户名 8 | 密码 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/java/com/xkcoding/websocket/socketio/payload/BroadcastMessageRequest.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio.payload; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 广播消息载荷 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-12-18 20:01 12 | */ 13 | @Data 14 | public class BroadcastMessageRequest { 15 | /** 16 | * 消息内容 17 | */ 18 | private String message; 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | name: GitHub CI 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v1 12 | - name: Set up JDK 1.8 13 | uses: actions/setup-java@v1 14 | with: 15 | java-version: 1.8 16 | - name: Build with Maven 17 | run: mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true -B -V 18 | -------------------------------------------------------------------------------- /demo-docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # 基础镜像 2 | FROM openjdk:8-jdk-alpine 3 | 4 | # 作者信息 5 | MAINTAINER "Yangkai.Shen 237497819@qq.com" 6 | 7 | # 添加一个存储空间 8 | VOLUME /tmp 9 | 10 | # 暴露8080端口 11 | EXPOSE 8080 12 | 13 | # 添加变量,如果使用dockerfile-maven-plugin,则会自动替换这里的变量内容 14 | ARG JAR_FILE=target/spring-boot-demo-docker.jar 15 | 16 | # 往容器中添加jar包 17 | ADD ${JAR_FILE} app.jar 18 | 19 | # 启动镜像自动运行程序 20 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/urandom","-jar","/app.jar"] -------------------------------------------------------------------------------- /demo-orm-mybatis-mapper-page/src/main/resources/db/data.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (1, 'user_1', 'ff342e862e7c3285cdc07e56d6b8973b', '412365a109674b2dbb1981ed561a4c70', 'user1@xkcoding.com', '17300000001'); 2 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (2, 'user_2', '6c6bf02c8d5d3d128f34b1700cb1e32c', 'fcbdd0e8a9404a5585ea4e01d0e4d7a0', 'user2@xkcoding.com', '17300000002'); -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/src/main/java/com/xkcoding/orm/mybatis/plus/mapper/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.plus.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xkcoding.orm.mybatis.plus.entity.Role; 5 | 6 | /** 7 | *

8 | * RoleMapper 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-09-14 14:06 13 | */ 14 | public interface RoleMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/repository/LessonRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j.repository; 2 | 3 | import com.xkcoding.neo4j.model.Lesson; 4 | import org.springframework.data.neo4j.repository.Neo4jRepository; 5 | 6 | /** 7 | *

8 | * 课程节点Repository 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-24 15:05 13 | */ 14 | public interface LessonRepository extends Neo4jRepository { 15 | } 16 | -------------------------------------------------------------------------------- /demo-elasticsearch/src/main/java/com/xkcoding/elasticsearch/constants/EsConsts.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.elasticsearch.constants; 2 | 3 | /** 4 | *

5 | * ES常量池 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-12-20 17:30 10 | */ 11 | public interface EsConsts { 12 | /** 13 | * 索引名称 14 | */ 15 | String INDEX_NAME = "person"; 16 | 17 | /** 18 | * 类型名称 19 | */ 20 | String TYPE_NAME = "person"; 21 | } 22 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/repository/TeacherRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j.repository; 2 | 3 | import com.xkcoding.neo4j.model.Teacher; 4 | import org.springframework.data.neo4j.repository.Neo4jRepository; 5 | 6 | /** 7 | *

8 | * 教师节点Repository 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-24 15:05 13 | */ 14 | public interface TeacherRepository extends Neo4jRepository { 15 | } 16 | -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/src/main/java/com/xkcoding/orm/mybatis/plus/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.plus.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.xkcoding.orm.mybatis.plus.entity.User; 5 | 6 | /** 7 | *

8 | * User Service 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-08 18:10 13 | */ 14 | public interface UserService extends IService { 15 | } 16 | -------------------------------------------------------------------------------- /demo-mq-kafka/src/main/java/com/xkcoding/mq/kafka/constants/KafkaConsts.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mq.kafka.constants; 2 | 3 | /** 4 | *

5 | * kafka 常量池 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2019-01-07 14:52 10 | */ 11 | public interface KafkaConsts { 12 | /** 13 | * 默认分区大小 14 | */ 15 | Integer DEFAULT_PARTITION_NUM = 3; 16 | 17 | /** 18 | * Topic 名称 19 | */ 20 | String TOPIC_TEST = "test"; 21 | } 22 | -------------------------------------------------------------------------------- /demo-dynamic-datasource/src/main/java/com/xkcoding/dynamic/datasource/annotation/DefaultDatasource.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dynamic.datasource.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | *

7 | * 用户标识仅可以使用默认数据源 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2019-09-04 17:37 12 | */ 13 | @Target({ElementType.METHOD}) 14 | @Retention(RetentionPolicy.RUNTIME) 15 | @Documented 16 | public @interface DefaultDatasource { 17 | } 18 | -------------------------------------------------------------------------------- /demo-uflo/src/main/java/com/xkcoding/uflo/SpringBootDemoUfloApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.uflo; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootDemoUfloApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootDemoUfloApplication.class, args); 11 | } 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /demo-multi-datasource-mybatis/src/main/java/com/xkcoding/multi/datasource/mybatis/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.multi.datasource.mybatis.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xkcoding.multi.datasource.mybatis.model.User; 5 | 6 | /** 7 | *

8 | * 数据访问层 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-01-21 14:28 13 | */ 14 | public interface UserMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/constant/Const.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jdbctemplate.constant; 2 | 3 | /** 4 | *

5 | * 常量池 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-10-15 10:59 10 | */ 11 | public interface Const { 12 | /** 13 | * 加密盐前缀 14 | */ 15 | String SALT_PREFIX = "::SpringBootDemo::"; 16 | 17 | /** 18 | * 逗号分隔符 19 | */ 20 | String SEPARATOR_COMMA = ","; 21 | } 22 | -------------------------------------------------------------------------------- /demo-template-thymeleaf/src/main/resources/templates/common/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | spring-boot-demo-template-thymeleaf 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo-https/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /demo-orm-beetlsql/src/main/java/com/xkcoding/orm/beetlsql/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.beetlsql.dao; 2 | 3 | import com.xkcoding.orm.beetlsql.entity.User; 4 | import org.beetl.sql.core.mapper.BaseMapper; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | *

9 | * UserDao 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-11-14 16:18 14 | */ 15 | @Component 16 | public interface UserDao extends BaseMapper { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /demo-pay/src/test/java/com/xkcoding/pay/SpringBootDemoPayApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.pay; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoPayApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-war/src/test/java/com/xkcoding/war/SpringBootDemoWarApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.war; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoWarApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-task/src/test/java/com/xkcoding/task/SpringBootDemoTaskApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoTaskApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-cache-redis/src/main/java/com/xkcoding/cache/redis/SpringBootDemoCacheRedisApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.redis; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootDemoCacheRedisApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootDemoCacheRedisApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /demo-dynamic-datasource/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /demo-email/src/test/java/com/xkcoding/email/SpringBootDemoEmailApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.email; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoEmailApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-neo4j/src/test/java/com/xkcoding/neo4j/SpringBootDemoNeo4jApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoNeo4jApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-ratelimit-guava/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /demo-ratelimit-redis/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /demo-uflo/src/test/java/com/xkcoding/uflo/SpringBootDemoUfloApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.uflo; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoUfloApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-activiti/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | url: jdbc:mysql://localhost:3306/spring-boot-demo 4 | username: root 5 | password: root 6 | hikari: 7 | data-source-properties: 8 | useSSL: false 9 | serverTimezone: GMT+8 10 | useUnicode: true 11 | characterEncoding: utf8 12 | # 这个必须要加,否则 Activiti 自动建表会失败 13 | nullCatalogMeansCurrent: true 14 | activiti: 15 | history-level: full 16 | db-history-used: true -------------------------------------------------------------------------------- /demo-async/src/test/java/com/xkcoding/async/SpringBootDemoAsyncApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.async; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoAsyncApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-codegen/src/main/java/com/xkcoding/codegen/common/IResultCode.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.codegen.common; 2 | 3 | /** 4 | *

5 | * 统一状态码接口 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2019-03-21 16:28 10 | */ 11 | public interface IResultCode { 12 | /** 13 | * 获取状态码 14 | * 15 | * @return 状态码 16 | */ 17 | Integer getCode(); 18 | 19 | /** 20 | * 获取返回消息 21 | * 22 | * @return 返回消息 23 | */ 24 | String getMessage(); 25 | } 26 | -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/template/Mapper.java.vm: -------------------------------------------------------------------------------- 1 | package ${package}.${moduleName}.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import org.springframework.stereotype.Component; 5 | import ${package}.${moduleName}.entity.${className}; 6 | 7 | /** 8 | *

9 | * ${comments} 10 | *

11 | * 12 | * @author ${author} 13 | * @date Created in ${datetime} 14 | */ 15 | @Component 16 | public interface ${className}Mapper extends BaseMapper<${className}> { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /demo-docker/src/test/java/com/xkcoding/docker/SpringBootDemoDockerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.docker; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoDockerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/config/CustomIdStrategy.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j.config; 2 | 3 | import cn.hutool.core.util.IdUtil; 4 | import org.neo4j.ogm.id.IdStrategy; 5 | 6 | /** 7 | *

8 | * 自定义主键策略 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-24 14:40 13 | */ 14 | public class CustomIdStrategy implements IdStrategy { 15 | @Override 16 | public Object generateId(Object o) { 17 | return IdUtil.fastUUID(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /demo-upload/src/test/java/com/xkcoding/upload/SpringBootDemoUploadApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.upload; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoUploadApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-urule/src/test/java/com/xkcoding/urule/SpringBootDemoUruleApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.urule; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoUruleApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/java/com/xkcoding/websocket/socketio/payload/JoinRequest.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio.payload; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 加群载荷 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-12-19 13:36 12 | */ 13 | @Data 14 | public class JoinRequest { 15 | /** 16 | * 用户id 17 | */ 18 | private String userId; 19 | 20 | /** 21 | * 群名称 22 | */ 23 | private String groupId; 24 | } 25 | -------------------------------------------------------------------------------- /demo-codegen/src/test/java/com/xkcoding/codegen/SpringBootDemoCodegenApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.codegen; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoCodegenApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-graylog/src/test/java/com/xkcoding/graylog/SpringBootDemoGraylogApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.graylog; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoGraylogApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-log-aop/src/test/java/com/xkcoding/log/aop/SpringBootDemoLogAopApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.log.aop; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoLogAopApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-logback/src/test/java/com/xkcoding/logback/SpringBootDemoLogbackApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.logback; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoLogbackApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-mq-rocketmq/src/main/java/com/xkcoding/mq/rocketmq/SpringBootDemoMqRocketmqApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mq.rocketmq; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootDemoMqRocketmqApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootDemoMqRocketmqApplication.class, args); 11 | } 12 | 13 | } 14 | 15 | -------------------------------------------------------------------------------- /demo-orm-jpa/src/main/java/com/xkcoding/orm/jpa/repository/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jpa.repository; 2 | 3 | import com.xkcoding.orm.jpa.entity.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | *

9 | * User Dao 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-11-07 14:07 14 | */ 15 | @Repository 16 | public interface UserDao extends JpaRepository { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /demo-orm-jpa/src/test/java/com/xkcoding/orm/jpa/SpringBootDemoOrmJpaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jpa; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoOrmJpaApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/payload/PageCondition.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.payload; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 分页请求参数 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-12-12 18:05 12 | */ 13 | @Data 14 | public class PageCondition { 15 | /** 16 | * 当前页码 17 | */ 18 | private Integer currentPage; 19 | 20 | /** 21 | * 每页条数 22 | */ 23 | private Integer pageSize; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /demo-social/src/test/java/com/xkcoding/social/SpringBootDemoSocialApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.social; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoSocialApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-swagger/src/test/java/com/xkcoding/swagger/SpringBootDemoSwaggerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.swagger; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoSwaggerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-template-thymeleaf/src/main/resources/templates/page/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 |
7 | 用户名 8 | 密码 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /demo-actuator/src/test/java/com/xkcoding/actuator/SpringBootDemoActuatorApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.actuator; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoActuatorApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-mongodb/src/test/java/com/xkcoding/mongodb/SpringBootDemoMongodbApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mongodb; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoMongodbApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-rbac-shiro/src/main/java/com/xkcoding/rbac/shiro/common/IResultCode.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.shiro.common; 2 | 3 | /** 4 | *

5 | * 统一状态码接口 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2019-03-21 16:28 10 | */ 11 | public interface IResultCode { 12 | /** 13 | * 获取状态码 14 | * 15 | * @return 状态码 16 | */ 17 | Integer getCode(); 18 | 19 | /** 20 | * 获取返回消息 21 | * 22 | * @return 返回消息 23 | */ 24 | String getMessage(); 25 | } 26 | -------------------------------------------------------------------------------- /demo-session/src/test/java/com/xkcoding/session/SpringBootDemoSessionApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.session; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoSessionApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-sharding-jdbc/src/main/java/com/xkcoding/sharding/jdbc/mapper/OrderMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.sharding.jdbc.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xkcoding.sharding.jdbc.model.Order; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | *

9 | * 订单表 Mapper 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-03-26 13:38 14 | */ 15 | @Component 16 | public interface OrderMapper extends BaseMapper { 17 | } 18 | -------------------------------------------------------------------------------- /demo-dynamic-datasource/src/main/java/com/xkcoding/dynamic/datasource/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dynamic.datasource.mapper; 2 | 3 | import com.xkcoding.dynamic.datasource.config.MyMapper; 4 | import com.xkcoding.dynamic.datasource.model.User; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | *

9 | * 用户 Mapper 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-09-04 16:49 14 | */ 15 | @Mapper 16 | public interface UserMapper extends MyMapper { 17 | } 18 | -------------------------------------------------------------------------------- /demo-ureport2/src/test/java/com/xkcoding/ureport2/SpringBootDemoUreport2ApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ureport2; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoUreport2ApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-helloworld/src/test/java/com/xkcoding/helloworld/SpringBootDemoHelloworldApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.helloworld; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoHelloworldApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/src/main/java/com/xkcoding/orm/mybatis/plus/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.plus.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.xkcoding.orm.mybatis.plus.entity.User; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | *

9 | * UserMapper 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-11-08 16:57 14 | */ 15 | @Component 16 | public interface UserMapper extends BaseMapper { 17 | } 18 | -------------------------------------------------------------------------------- /demo-properties/src/test/java/com/xkcoding/properties/SpringBootDemoPropertiesApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.properties; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoPropertiesApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-rbac-shiro/src/test/java/com/xkcoding/rbac/shiro/SpringBootDemoRbacShiroApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.shiro; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoRbacShiroApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-tio/src/test/java/com/xkcoding/springbootdemotio/SpringBootDemoTioApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.springbootdemotio; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoTioApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-websocket/src/test/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoWebsocketApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-cache-redis/src/test/java/com/xkcoding/cache/redis/SpringBootDemoCacheRedisApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.redis; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoCacheRedisApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/src/main/resources/db/data.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (1, 'user_1', 'ff342e862e7c3285cdc07e56d6b8973b', '412365a109674b2dbb1981ed561a4c70', 'user1@xkcoding.com', '17300000001'); 2 | INSERT INTO `orm_user`(`id`,`name`,`password`,`salt`,`email`,`phone_number`) VALUES (2, 'user_2', '6c6bf02c8d5d3d128f34b1700cb1e32c', 'fcbdd0e8a9404a5585ea4e01d0e4d7a0', 'user2@xkcoding.com', '17300000002'); 3 | 4 | INSERT INTO `orm_role`(`id`,`name`) VALUES (1,'管理员'),(2,'普通用户'); 5 | -------------------------------------------------------------------------------- /demo-orm-mybatis/src/test/java/com/xkcoding/orm/mybatis/SpringBootDemoOrmMybatisApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoOrmMybatisApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/common/IStatus.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.common; 2 | 3 | /** 4 | *

5 | * REST API 错误码接口 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-12-07 14:35 10 | */ 11 | public interface IStatus { 12 | 13 | /** 14 | * 状态码 15 | * 16 | * @return 状态码 17 | */ 18 | Integer getCode(); 19 | 20 | /** 21 | * 返回信息 22 | * 23 | * @return 返回信息 24 | */ 25 | String getMessage(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /demo-rbac-shiro/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | datasource: 7 | hikari: 8 | username: root 9 | password: root 10 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 11 | url: jdbc:p6spy:mysql://127.0.0.1:3306/spring-boot-demo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=GMT%2B8 12 | mybatis-plus: 13 | global-config: 14 | # 关闭banner 15 | banner: false -------------------------------------------------------------------------------- /demo-task-quartz/src/test/java/com/xkcoding/task/quartz/SpringBootDemoTaskQuartzApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task.quartz; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoTaskQuartzApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-mq-rocketmq/src/test/java/com/xkcoding/mq/rocketmq/SpringBootDemoMqRocketmqApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mq.rocketmq; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoMqRocketmqApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-orm-beetlsql/src/test/java/com/xkcoding/orm/beetlsql/SpringBootDemoOrmBeetlsqlApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.beetlsql; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoOrmBeetlsqlApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-upload/src/main/java/com/xkcoding/upload/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.upload.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | 6 | /** 7 | *

8 | * 首页Controller 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-20 21:22 13 | */ 14 | @Controller 15 | public class IndexController { 16 | @GetMapping("") 17 | public String index() { 18 | return "index"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-admin/admin-client/src/test/java/com/xkcoding/admin/client/SpringBootDemoAdminClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.admin.client; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoAdminClientApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-admin/admin-server/src/test/java/com/xkcoding/admin/server/SpringBootDemoAdminServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.admin.server; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoAdminServerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-cache-ehcache/src/test/java/com/xkcoding/cache/ehcache/SpringBootDemoCacheEhcacheApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.ehcache; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoCacheEhcacheApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-dynamic-datasource/src/main/java/com/xkcoding/dynamic/datasource/config/MyMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dynamic.datasource.config; 2 | 3 | import tk.mybatis.mapper.annotation.RegisterMapper; 4 | import tk.mybatis.mapper.common.Mapper; 5 | import tk.mybatis.mapper.common.MySqlMapper; 6 | 7 | /** 8 | *

9 | * 通用 mapper 自定义 mapper 文件 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-09-04 16:23 14 | */ 15 | @RegisterMapper 16 | public interface MyMapper extends Mapper, MySqlMapper { 17 | } 18 | -------------------------------------------------------------------------------- /demo-elasticsearch/src/test/java/com/xkcoding/elasticsearch/SpringBootDemoElasticsearchApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.elasticsearch; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoElasticsearchApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/test/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | 6 | spring: 7 | datasource: 8 | url: jdbc:h2:mem:oauth2?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE 9 | username: root 10 | password: 123456 11 | jpa: 12 | hibernate: 13 | ddl-auto: create-drop 14 | show-sql: true 15 | properties: 16 | hibernate: 17 | format_sql: true 18 | 19 | logging: 20 | level: 21 | org.springframework.security: debug 22 | -------------------------------------------------------------------------------- /demo-rbac-security/src/test/java/com/xkcoding/rbac/security/SpringBootDemoRbacSecurityApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoRbacSecurityApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/main/resources/public.txt: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkF9SyMHeGAsLMwbPsKj/ 3 | xpEtS0iCe8vTSBnIGBDZKmB3ma20Ry0Uzn3m+f40RwCXlxnUcvTw7ipoz0tMQERQ 4 | b3X4DkYCJXPK6pAD+R9/J5odEwrO2eysByWfcbMjsZw2u5pH5hleMS0YqkrGQOxJ 5 | pzlEcKxMePU5KYTbKUJkhOYPY+gQr61g6lF97WggSPtuQn1srT+Ptvfw6yRC4bdI 6 | 0zV5emfXjmoLUwaQTRoGYhOFrm97vpoKiltSNIDFW01J1Lr+l77ddDFC6cdiAC0H 7 | 5/eENWBBBTFWya8RlBTzHuikfFS1gP49PZ6MYJIVRs8p9YnnKTy7TVcGKY3XZMCA 8 | mwIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /demo-swagger-beauty/src/test/java/com/xkcoding/swagger/beauty/SpringBootDemoSwaggerBeautyApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.swagger.beauty; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoSwaggerBeautyApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-template-beetl/src/test/java/com/xkcoding/template/beetl/SpringBootDemoTemplateBeetlApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.beetl; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoTemplateBeetlApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-template-enjoy/src/test/java/com/xkcoding/template/enjoy/SpringBootDemoTemplateEnjoyApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.enjoy; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoTemplateEnjoyApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-upload/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | qiniu: 6 | ## 此处填写你自己的七牛云 access key 7 | accessKey: 8 | ## 此处填写你自己的七牛云 secret key 9 | secretKey: 10 | ## 此处填写你自己的七牛云 bucket 11 | bucket: 12 | ## 此处填写你自己的七牛云 域名 13 | prefix: 14 | spring: 15 | servlet: 16 | multipart: 17 | enabled: true 18 | location: /Users/yangkai.shen/Documents/code/back-end/spring-boot-demo/spring-boot-demo-upload/tmp 19 | file-size-threshold: 5MB 20 | max-file-size: 20MB -------------------------------------------------------------------------------- /demo-dubbo/dubbo-consumer/src/test/java/com/xkcoding/dubbo/consumer/SpringBootDemoDubboConsumerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dubbo.consumer; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoDubboConsumerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-dubbo/dubbo-provider/src/test/java/com/xkcoding/dubbo/provider/SpringBootDemoDubboProviderApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dubbo.provider; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoDubboProviderApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/src/test/java/com/xkcoding/orm/mybatis/plus/SpringBootDemoOrmMybatisPlusApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.plus; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoOrmMybatisPlusApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-ratelimit-guava/src/test/java/com/xkcoding/ratelimit/guava/SpringBootDemoRatelimitGuavaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ratelimit.guava; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoRatelimitGuavaApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/test/java/com/xkcoding/orm/jdbctemplate/SpringBootDemoOrmJdbctemplateApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jdbctemplate; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoOrmJdbctemplateApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-ratelimit-redis/src/test/java/com/xkcoding/ratelimit/redis/SpringBootDemoRatelimiterRedisApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ratelimit.redis; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoRatelimiterRedisApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-exception-handler/src/test/java/com/xkcoding/exception/handler/SpringBootDemoExceptionHandlerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.exception.handler; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoExceptionHandlerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/config/CustomConfig.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.config; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | *

8 | * 自定义配置 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-13 10:56 13 | */ 14 | @ConfigurationProperties(prefix = "custom.config") 15 | @Data 16 | public class CustomConfig { 17 | /** 18 | * 不需要拦截的地址 19 | */ 20 | private IgnoreConfig ignores; 21 | } 22 | -------------------------------------------------------------------------------- /demo-dynamic-datasource/src/test/java/com/xkcoding/dynamic/datasource/SpringBootDemoDynamicDatasourceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dynamic.datasource; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoDynamicDatasourceApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-template-thymeleaf/src/test/java/com/xkcoding/template/thymeleaf/SpringBootDemoTemplateThymeleafApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.thymeleaf; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoTemplateThymeleafApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/test/java/com/xkcoding/websocket/socketio/SpringBootDemoWebsocketSocketioApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoWebsocketSocketioApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/annotation/Ignore.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jdbctemplate.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 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-10-15 13:25 15 | */ 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Target({ElementType.FIELD}) 18 | public @interface Ignore { 19 | } 20 | -------------------------------------------------------------------------------- /demo-template-freemarker/src/test/java/com/xkcoding/template/freemarker/SpringBootDemoTemplateFreemarkerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.freemarker; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoTemplateFreemarkerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-dynamic-datasource/src/main/java/com/xkcoding/dynamic/datasource/mapper/DatasourceConfigMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.dynamic.datasource.mapper; 2 | 3 | import com.xkcoding.dynamic.datasource.config.MyMapper; 4 | import com.xkcoding.dynamic.datasource.model.DatasourceConfig; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | *

9 | * 数据源配置 Mapper 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-09-04 16:20 14 | */ 15 | @Mapper 16 | public interface DatasourceConfigMapper extends MyMapper { 17 | } 18 | -------------------------------------------------------------------------------- /demo-ldap/src/main/java/com/xkcoding/ldap/LdapDemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ldap; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * LdapDemoApplication Ldap demo 启动类 8 | * 9 | * @author fxbin 10 | * @version v1.0 11 | * @since 2019-08-26 0:37 12 | */ 13 | @SpringBootApplication 14 | public class LdapDemoApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(LdapDemoApplication.class, args); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /demo-ratelimit-redis/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | redis: 7 | host: localhost 8 | # 连接超时时间(记得添加单位,Duration) 9 | timeout: 10000ms 10 | # Redis默认情况下有16个分片,这里配置具体使用的分片 11 | # database: 0 12 | lettuce: 13 | pool: 14 | # 连接池最大连接数(使用负值表示没有限制) 默认 8 15 | max-active: 8 16 | # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 17 | max-wait: -1ms 18 | # 连接池中的最大空闲连接 默认 8 19 | max-idle: 8 20 | # 连接池中的最小空闲连接 默认 0 21 | min-idle: 0 22 | -------------------------------------------------------------------------------- /demo-websocket/src/main/java/com/xkcoding/websocket/payload/KV.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.payload; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | *

9 | * 键值匹配 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-12-14 17:41 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class KV { 19 | /** 20 | * 键 21 | */ 22 | private String key; 23 | 24 | /** 25 | * 值 26 | */ 27 | private Object value; 28 | } 29 | -------------------------------------------------------------------------------- /demo-flyway/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | flyway: 3 | enabled: true 4 | # 迁移前校验 SQL 文件是否存在问题 5 | validate-on-migrate: true 6 | # 生产环境一定要关闭 7 | clean-disabled: true 8 | # 校验路径下是否存在 SQL 文件 9 | check-location: false 10 | # 最开始已经存在表结构,且不存在 flyway_schema_history 表时,需要设置为 true 11 | baseline-on-migrate: true 12 | # 基础版本 0 13 | baseline-version: 0 14 | datasource: 15 | url: jdbc:mysql://127.0.0.1:3306/flyway-test?useSSL=false 16 | username: root 17 | password: root 18 | type: com.zaxxer.hikari.HikariDataSource 19 | -------------------------------------------------------------------------------- /demo-swagger/src/main/java/com/xkcoding/swagger/common/ParamType.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.swagger.common; 2 | 3 | /** 4 | *

5 | * 方便在 @ApiImplicitParam 的 paramType 属性使用 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-11-29 13:24 10 | */ 11 | public final class ParamType { 12 | 13 | public final static String QUERY = "query"; 14 | public final static String HEADER = "header"; 15 | public final static String PATH = "path"; 16 | public final static String BODY = "body"; 17 | public final static String FORM = "form"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | 4 | spring: 5 | datasource: 6 | url: jdbc:mysql://localhost:3306/oauth?allowPublicKeyRetrieval=true 7 | username: root 8 | password: 123456 9 | hikari: 10 | data-source-properties: 11 | useSSL: false 12 | serverTimezone: GMT+8 13 | useUnicode: true 14 | characterEncoding: utf8 15 | jpa: 16 | hibernate: 17 | ddl-auto: update 18 | show-sql: true 19 | 20 | logging: 21 | level: 22 | org.springframework.security: debug 23 | -------------------------------------------------------------------------------- /demo-orm-mybatis-mapper-page/src/test/java/com/xkcoding/orm/mybatis/MapperAndPage/SpringBootDemoOrmMybatisMapperPageApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.MapperAndPage; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoOrmMybatisMapperPageApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /demo-task/src/main/java/com/xkcoding/task/SpringBootDemoTaskApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-22 19:00 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoTaskApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoTaskApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-email/src/main/java/com/xkcoding/email/SpringBootDemoEmailApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.email; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-04 22:38 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoEmailApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoEmailApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-multi-datasource-mybatis/src/test/java/com/xkcoding/multi/datasource/mybatis/SpringBootDemoMultiDatasourceMybatisApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.multi.datasource.mybatis; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SpringBootDemoMultiDatasourceMybatisApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | 18 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/SpringBootDemoNeo4jApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-22 23:50 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoNeo4jApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoNeo4jApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-task-quartz/src/main/java/com/xkcoding/task/quartz/mapper/JobMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task.quartz.mapper; 2 | 3 | import com.xkcoding.task.quartz.entity.domain.JobAndTrigger; 4 | import org.springframework.stereotype.Component; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * Job Mapper 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-11-26 15:12 15 | */ 16 | @Component 17 | public interface JobMapper { 18 | /** 19 | * 查询定时作业和触发器列表 20 | * 21 | * @return 定时作业和触发器列表 22 | */ 23 | List list(); 24 | } 25 | -------------------------------------------------------------------------------- /demo-docker/src/main/java/com/xkcoding/docker/SpringBootDemoDockerApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.docker; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-29 14:59 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoDockerApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoDockerApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-https/src/main/java/com/xkcoding/https/SpringBootDemoHttpsApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.https; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author Chen.Chao 12 | * @date Created in 2020-01-12 10:31 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoHttpsApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoHttpsApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-upload/src/main/java/com/xkcoding/upload/SpringBootDemoUploadApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.upload; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-20 21:23 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoUploadApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoUploadApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-admin/admin-client/src/main/java/com/xkcoding/admin/client/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.admin.client.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | *

8 | * 首页 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-08 14:15 13 | */ 14 | @RestController 15 | public class IndexController { 16 | @GetMapping(value = {"", "/"}) 17 | public String index() { 18 | return "This is a Spring Boot Admin Client."; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-log-aop/src/main/java/com/xkcoding/log/aop/SpringBootDemoLogAopApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.log.aop; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-01 22:05 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoLogAopApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoLogAopApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-multi-datasource-mybatis/src/main/java/com/xkcoding/multi/datasource/mybatis/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.multi.datasource.mybatis.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.xkcoding.multi.datasource.mybatis.model.User; 5 | 6 | /** 7 | *

8 | * 数据服务层 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-01-21 14:31 13 | */ 14 | public interface UserService extends IService { 15 | 16 | /** 17 | * 添加 User 18 | * 19 | * @param user 用户 20 | */ 21 | void addUser(User user); 22 | } 23 | -------------------------------------------------------------------------------- /demo-orm-jpa/src/main/java/com/xkcoding/orm/jpa/SpringBootDemoOrmJpaApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jpa; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-28 22:58 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoOrmJpaApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoOrmJpaApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-orm-mybatis-mapper-page/src/main/java/com/xkcoding/orm/mybatis/MapperAndPage/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.MapperAndPage.mapper; 2 | 3 | import com.xkcoding.orm.mybatis.MapperAndPage.entity.User; 4 | import org.springframework.stereotype.Component; 5 | import tk.mybatis.mapper.common.Mapper; 6 | import tk.mybatis.mapper.common.MySqlMapper; 7 | 8 | /** 9 | *

10 | * UserMapper 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-11-08 14:15 15 | */ 16 | @Component 17 | public interface UserMapper extends Mapper, MySqlMapper { 18 | } 19 | -------------------------------------------------------------------------------- /demo-flyway/src/main/java/com/xkcoding/flyway/SpringBootDemoFlywayApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.flyway; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2020-03-04 18:30 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoFlywayApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoFlywayApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-swagger/src/main/java/com/xkcoding/swagger/SpringBootDemoSwaggerApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.swagger; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-29 13:25 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoSwaggerApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoSwaggerApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-urule/src/main/java/com/xkcoding/urule/SpringBootDemoUruleApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.urule; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-02-25 22:46 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoUruleApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoUruleApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/java/com/xkcoding/websocket/socketio/payload/GroupMessageRequest.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio.payload; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 群聊消息载荷 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-12-18 16:59 12 | */ 13 | @Data 14 | public class GroupMessageRequest { 15 | /** 16 | * 消息发送方用户id 17 | */ 18 | private String fromUid; 19 | 20 | /** 21 | * 群组id 22 | */ 23 | private String groupId; 24 | 25 | /** 26 | * 消息内容 27 | */ 28 | private String message; 29 | } 30 | -------------------------------------------------------------------------------- /demo-actuator/src/main/java/com/xkcoding/actuator/SpringBootDemoActuatorApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.actuator; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-9-29 14:27 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoActuatorApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoActuatorApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-actuator/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | # 若要访问端点信息,需要配置用户名和密码 6 | spring: 7 | security: 8 | user: 9 | name: xkcoding 10 | password: 123456 11 | management: 12 | # 端点信息接口使用的端口,为了和主系统接口使用的端口进行分离 13 | server: 14 | port: 8090 15 | servlet: 16 | context-path: /sys 17 | # 端点健康情况,默认值"never",设置为"always"可以显示硬盘使用情况和线程情况 18 | endpoint: 19 | health: 20 | show-details: always 21 | # 设置端点暴露的哪些内容,默认["health","info"],设置"*"代表暴露所有可访问的端点 22 | endpoints: 23 | web: 24 | exposure: 25 | include: '*' -------------------------------------------------------------------------------- /demo-codegen/src/main/java/com/xkcoding/codegen/SpringBootDemoCodegenApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.codegen; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-03-22 09:10 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoCodegenApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoCodegenApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-graylog/src/main/java/com/xkcoding/graylog/SpringBootDemoGraylogApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.graylog; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-04-23 09:43 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoGraylogApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoGraylogApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-properties/src/main/java/com/xkcoding/properties/property/ApplicationProperty.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.properties.property; 2 | 3 | import lombok.Data; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | *

9 | * 项目配置 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-09-29 10:50 14 | */ 15 | @Data 16 | @Component 17 | public class ApplicationProperty { 18 | @Value("${application.name}") 19 | private String name; 20 | @Value("${application.version}") 21 | private String version; 22 | } 23 | -------------------------------------------------------------------------------- /demo-social/src/main/java/com/xkcoding/social/SpringBootDemoSocialApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.social; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-08-09 13:51 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoSocialApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoSocialApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/java/com/xkcoding/websocket/socketio/payload/SingleMessageRequest.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio.payload; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | *

7 | * 私聊消息载荷 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-12-18 17:02 12 | */ 13 | @Data 14 | public class SingleMessageRequest { 15 | /** 16 | * 消息发送方用户id 17 | */ 18 | private String fromUid; 19 | 20 | /** 21 | * 消息接收方用户id 22 | */ 23 | private String toUid; 24 | 25 | /** 26 | * 消息内容 27 | */ 28 | private String message; 29 | } 30 | -------------------------------------------------------------------------------- /demo-ldap/src/main/java/com/xkcoding/ldap/api/ResultCode.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ldap.api; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * ResultCode 8 | * 9 | * @author fxbin 10 | * @version v1.0 11 | * @since 2019-08-26 1:47 12 | */ 13 | @Getter 14 | @AllArgsConstructor 15 | public enum ResultCode { 16 | 17 | /** 18 | * 接口调用成功 19 | */ 20 | SUCCESS(0, "Request Successful"), 21 | 22 | /** 23 | * 服务器暂不可用,建议稍候重试。建议重试次数不超过3次。 24 | */ 25 | FAILURE(-1, "System Busy"); 26 | 27 | final int code; 28 | 29 | final String msg; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/main/java/com/xkcoding/oauth/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 控制器。除了业务逻辑的以外,提供两个控制器来帮助完成自定义: 3 | * {@link com.xkcoding.oauth.controller.AuthorizationController} 4 | * 自定义的授权控制器,重新设置到我们的界面中去,不使用他的默认实现 5 | *

6 | * {@link com.xkcoding.oauth.controller.Oauth2Controller} 7 | * 页面跳转的控制器,这里拿出来是因为真的可以做很多事。比如登录的时候携带点什么 8 | * 或者退出的时候携带什么标识,都可以。 9 | * 10 | * @author EchoCow 11 | * @date 2020-01-07 11:25 12 | * @see org.springframework.security.oauth2.provider.endpoint.AuthorizationEndpoint 13 | */ 14 | package com.xkcoding.oauth.controller; 15 | -------------------------------------------------------------------------------- /demo-session/src/main/java/com/xkcoding/session/SpringBootDemoSessionApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.session; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-19 19:35 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoSessionApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoSessionApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /.gitee/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 报告缺陷 3 | about: 报告缺陷以帮助我们改进 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: xkcoding 7 | --- 8 | 9 | **请先看[《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md?utm_source=hacpai.com)**,并尝试到 **[issue 列表](https://github.com/xkcoding/spring-boot-demo/issues)** 搜寻是否已经有人遇到过同样的问题。 10 | 11 | ---- 12 | 13 | ### 描述问题 14 | 15 | 请尽量清晰精准地描述你碰到的问题。 16 | 17 | ```bash 18 | 日志内容 19 | ``` 20 | 21 | ### 期待的结果 22 | 23 | 请尽量清晰精准地描述你所期待的结果。 24 | 25 | ### 截屏或录像 26 | 27 | 如果可能,请尽量附加截图或录像来描述你遇到的问题。 28 | 29 | ### 其他信息 30 | 31 | 请提供其他附加信息帮助我们诊断问题。 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 报告缺陷 3 | about: 报告缺陷以帮助我们改进 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: xkcoding 7 | --- 8 | 9 | **请先看[《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md?utm_source=hacpai.com)**,并尝试到 **[issue 列表](https://github.com/xkcoding/spring-boot-demo/issues)** 搜寻是否已经有人遇到过同样的问题。 10 | 11 | ---- 12 | 13 | ### 描述问题 14 | 15 | 请尽量清晰精准地描述你碰到的问题。 16 | 17 | ```bash 18 | 日志内容 19 | ``` 20 | 21 | ### 期待的结果 22 | 23 | 请尽量清晰精准地描述你所期待的结果。 24 | 25 | ### 截屏或录像 26 | 27 | 如果可能,请尽量附加截图或录像来描述你遇到的问题。 28 | 29 | ### 其他信息 30 | 31 | 请提供其他附加信息帮助我们诊断问题。 32 | -------------------------------------------------------------------------------- /demo-activiti/src/main/java/com/xkcoding/activiti/SpringBootDemoActivitiApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.activiti; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-03-31 22:24 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoActivitiApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoActivitiApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-mq-kafka/src/main/java/com/xkcoding/mq/kafka/SpringBootDemoMqKafkaApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mq.kafka; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-01-07 14:43 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoMqKafkaApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoMqKafkaApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-properties/src/main/java/com/xkcoding/properties/SpringBootDemoPropertiesApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.properties; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-09-29 10:48 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoPropertiesApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoPropertiesApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-tio/src/main/java/com/xkcoding/springbootdemotio/SpringBootDemoTioApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.springbootdemotio; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-02-05 18:58 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoTioApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoTioApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-upload/src/main/java/com/xkcoding/upload/service/IQiNiuService.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.upload.service; 2 | 3 | import com.qiniu.common.QiniuException; 4 | import com.qiniu.http.Response; 5 | 6 | import java.io.File; 7 | 8 | /** 9 | *

10 | * 七牛云上传Service 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-11-06 17:21 15 | */ 16 | public interface IQiNiuService { 17 | /** 18 | * 七牛云上传文件 19 | * 20 | * @param file 文件 21 | * @return 七牛上传Response 22 | * @throws QiniuException 七牛异常 23 | */ 24 | Response uploadFile(File file) throws QiniuException; 25 | } 26 | -------------------------------------------------------------------------------- /demo-ureport2/src/main/java/com/xkcoding/ureport2/SpringBootDemoUreport2Application.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ureport2; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-02-26 23:56 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoUreport2Application { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoUreport2Application.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/java/com/xkcoding/websocket/socketio/config/Event.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio.config; 2 | 3 | /** 4 | *

5 | * 事件常量 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-12-18 19:36 10 | */ 11 | public interface Event { 12 | /** 13 | * 聊天事件 14 | */ 15 | String CHAT = "chat"; 16 | 17 | /** 18 | * 广播消息 19 | */ 20 | String BROADCAST = "broadcast"; 21 | 22 | /** 23 | * 群聊 24 | */ 25 | String GROUP = "group"; 26 | 27 | /** 28 | * 加入群聊 29 | */ 30 | String JOIN = "join"; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /demo-cache-redis/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | redis: 3 | host: localhost 4 | # 连接超时时间(记得添加单位,Duration) 5 | timeout: 10000ms 6 | # Redis默认情况下有16个分片,这里配置具体使用的分片 7 | # database: 0 8 | lettuce: 9 | pool: 10 | # 连接池最大连接数(使用负值表示没有限制) 默认 8 11 | max-active: 8 12 | # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 13 | max-wait: -1ms 14 | # 连接池中的最大空闲连接 默认 8 15 | max-idle: 8 16 | # 连接池中的最小空闲连接 默认 0 17 | min-idle: 0 18 | cache: 19 | # 一般来说是不用配置的,Spring Cache 会根据依赖的包自行装配 20 | type: redis 21 | logging: 22 | level: 23 | com.xkcoding: debug 24 | -------------------------------------------------------------------------------- /demo-elasticsearch-rest-high-level-client/src/main/java/com/xkcoding/elasticsearch/ElasticsearchApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.elasticsearch; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | * ElasticsearchApplication 8 | * 9 | * @author fxbin 10 | * @version v1.0 11 | * @since 2019-09-15 23:10 12 | */ 13 | @SpringBootApplication 14 | public class ElasticsearchApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(ElasticsearchApplication.class, args); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /demo-task-xxl-job/src/main/java/com/xkcoding/task/xxl/job/SpringBootDemoTaskXxlJobApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task.xxl.job; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-08-07 10:13 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoTaskXxlJobApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoTaskXxlJobApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/java/com/xkcoding/websocket/socketio/config/WsConfig.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio.config; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | *

8 | * WebSocket配置类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-18 16:41 13 | */ 14 | @ConfigurationProperties(prefix = "ws.server") 15 | @Data 16 | public class WsConfig { 17 | /** 18 | * 端口号 19 | */ 20 | private Integer port; 21 | 22 | /** 23 | * host 24 | */ 25 | private String host; 26 | } 27 | -------------------------------------------------------------------------------- /demo-zookeeper/src/main/java/com/xkcoding/zookeeper/SpringBootDemoZookeeperApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.zookeeper; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-27 14:51 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoZookeeperApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoZookeeperApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### xkcoding-后端 template 3 | ### Spring Boot ### 4 | target/ 5 | !.mvn/wrapper/maven-wrapper.jar 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | out/ 22 | gen/ 23 | 24 | ### NetBeans ### 25 | /nbproject/private/ 26 | /build/ 27 | /nbbuild/ 28 | /dist/ 29 | /nbdist/ 30 | /.nb-gradle/ 31 | 32 | ### LOGS ### 33 | logs/ 34 | *.log 35 | 36 | ### Mac OS ### 37 | .DS_Store 38 | 39 | ### VS CODE ### 40 | .vscode/ 41 | -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/main/java/com/xkcoding/oauth/SpringBootDemoOauthApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.oauth; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-02-17 23:52 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoOauthApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoOauthApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-orm-beetlsql/src/main/java/com/xkcoding/orm/beetlsql/SpringBootDemoOrmBeetlsqlApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.beetlsql; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-14 15:47 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoOrmBeetlsqlApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoOrmBeetlsqlApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-admin/admin-client/src/main/java/com/xkcoding/admin/client/SpringBootDemoAdminClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.admin.client; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-8 14:16 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoAdminClientApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoAdminClientApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-exception-handler/src/main/java/com/xkcoding/exception/handler/exception/PageException.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.exception.handler.exception; 2 | 3 | import com.xkcoding.exception.handler.constant.Status; 4 | import lombok.Getter; 5 | 6 | /** 7 | *

8 | * 页面异常 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-02 21:18 13 | */ 14 | @Getter 15 | public class PageException extends BaseException { 16 | 17 | public PageException(Status status) { 18 | super(status); 19 | } 20 | 21 | public PageException(Integer code, String message) { 22 | super(code, message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo-mq-rabbitmq/src/main/java/com/xkcoding/mq/rabbitmq/SpringBootDemoMqRabbitmqApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mq.rabbitmq; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-29 13:58 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoMqRabbitmqApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoMqRabbitmqApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-multi-datasource-jpa/src/main/java/com/xkcoding/multi/datasource/jpa/repository/second/SecondMultiTableRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.multi.datasource.jpa.repository.second; 2 | 3 | import com.xkcoding.multi.datasource.jpa.entity.second.SecondMultiTable; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | *

9 | * 多数据源测试 repo 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-01-18 10:11 14 | */ 15 | @Repository 16 | public interface SecondMultiTableRepository extends JpaRepository { 17 | } 18 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/SpringBootDemoRbacSecurityApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-10 11:28 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoRbacSecurityApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoRbacSecurityApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-exception-handler/src/main/java/com/xkcoding/exception/handler/exception/JsonException.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.exception.handler.exception; 2 | 3 | import com.xkcoding.exception.handler.constant.Status; 4 | import lombok.Getter; 5 | 6 | /** 7 | *

8 | * JSON异常 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-02 21:18 13 | */ 14 | @Getter 15 | public class JsonException extends BaseException { 16 | 17 | public JsonException(Status status) { 18 | super(status); 19 | } 20 | 21 | public JsonException(Integer code, String message) { 22 | super(code, message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo-multi-datasource-jpa/src/main/java/com/xkcoding/multi/datasource/jpa/repository/primary/PrimaryMultiTableRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.multi.datasource.jpa.repository.primary; 2 | 3 | import com.xkcoding.multi.datasource.jpa.entity.primary.PrimaryMultiTable; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | *

9 | * 多数据源测试 repo 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-01-18 10:11 14 | */ 15 | @Repository 16 | public interface PrimaryMultiTableRepository extends JpaRepository { 17 | } 18 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/payload/TeacherStudent.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j.payload; 2 | 3 | import com.xkcoding.neo4j.model.Student; 4 | import lombok.Data; 5 | import org.springframework.data.neo4j.annotation.QueryResult; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * 师生关系 12 | *

13 | * 14 | * @author yangkai.shen 15 | * @date Created in 2018-12-24 19:18 16 | */ 17 | @Data 18 | @QueryResult 19 | public class TeacherStudent { 20 | /** 21 | * 教师姓名 22 | */ 23 | private String teacherName; 24 | 25 | /** 26 | * 学生信息 27 | */ 28 | private List students; 29 | } 30 | -------------------------------------------------------------------------------- /demo-swagger-beauty/src/main/java/com/xkcoding/swagger/beauty/SpringBootDemoSwaggerBeautyApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.swagger.beauty; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-28 11:18 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoSwaggerBeautyApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoSwaggerBeautyApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-task-quartz/src/main/java/com/xkcoding/task/quartz/job/TestJob.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task.quartz.job; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import com.xkcoding.task.quartz.job.base.BaseJob; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.quartz.JobExecutionContext; 7 | 8 | /** 9 | *

10 | * Test Job 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-11-26 13:22 15 | */ 16 | @Slf4j 17 | public class TestJob implements BaseJob { 18 | 19 | @Override 20 | public void execute(JobExecutionContext context) { 21 | log.error("Test Job 执行时间: {}", DateUtil.now()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /demo-template-beetl/src/main/java/com/xkcoding/template/beetl/SpringBootDemoTemplateBeetlApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.beetl; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-10 11:17 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoTemplateBeetlApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoTemplateBeetlApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-template-enjoy/src/main/java/com/xkcoding/template/enjoy/SpringBootDemoTemplateEnjoyApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.enjoy; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-11 14:06 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoTemplateEnjoyApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoTemplateEnjoyApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-docker/src/main/java/com/xkcoding/docker/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.docker.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | *

9 | * Hello Controller 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-11-29 14:58 14 | */ 15 | @RestController 16 | @RequestMapping 17 | public class HelloController { 18 | @GetMapping 19 | public String hello() { 20 | return "Hello,From Docker!"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-elasticsearch/src/main/java/com/xkcoding/elasticsearch/SpringBootDemoElasticsearchApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.elasticsearch; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-27 22:52 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoElasticsearchApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoElasticsearchApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-task-quartz/src/main/java/com/xkcoding/task/quartz/job/HelloJob.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task.quartz.job; 2 | 3 | import cn.hutool.core.date.DateUtil; 4 | import com.xkcoding.task.quartz.job.base.BaseJob; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.quartz.JobExecutionContext; 7 | 8 | /** 9 | *

10 | * Hello Job 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-11-26 13:22 15 | */ 16 | @Slf4j 17 | public class HelloJob implements BaseJob { 18 | 19 | @Override 20 | public void execute(JobExecutionContext context) { 21 | log.error("Hello Job 执行时间: {}", DateUtil.now()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/repository/ClassRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j.repository; 2 | 3 | import com.xkcoding.neo4j.model.Class; 4 | import org.springframework.data.neo4j.repository.Neo4jRepository; 5 | 6 | import java.util.Optional; 7 | 8 | /** 9 | *

10 | * 班级节点Repository 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-12-24 15:05 15 | */ 16 | public interface ClassRepository extends Neo4jRepository { 17 | /** 18 | * 根据班级名称查询班级信息 19 | * 20 | * @param name 班级名称 21 | * @return 班级信息 22 | */ 23 | Optional findByName(String name); 24 | } 25 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/annotation/Table.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jdbctemplate.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 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-10-15 11:23 15 | */ 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Target({ElementType.TYPE}) 18 | public @interface Table { 19 | /** 20 | * 表名 21 | * 22 | * @return 表名 23 | */ 24 | String name(); 25 | } 26 | -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/src/main/java/com/xkcoding/orm/mybatis/plus/SpringBootDemoOrmMybatisPlusApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.plus; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-11-08 16:48 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoOrmMybatisPlusApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoOrmMybatisPlusApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/model/UserRole.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.model; 2 | 3 | import com.xkcoding.rbac.security.model.unionkey.UserRoleKey; 4 | import lombok.Data; 5 | 6 | import javax.persistence.EmbeddedId; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Table; 9 | 10 | /** 11 | *

12 | * 用户角色关联 13 | *

14 | * 15 | * @author yangkai.shen 16 | * @date Created in 2018-12-10 11:18 17 | */ 18 | @Data 19 | @Entity 20 | @Table(name = "sec_user_role") 21 | public class UserRole { 22 | /** 23 | * 主键 24 | */ 25 | @EmbeddedId 26 | private UserRoleKey id; 27 | } 28 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/SpringBootDemoOrmJdbctemplateApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jdbctemplate; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-15 9:50 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoOrmJdbctemplateApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoOrmJdbctemplateApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/annotation/Column.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jdbctemplate.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 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-10-15 11:23 15 | */ 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Target({ElementType.FIELD}) 18 | public @interface Column { 19 | /** 20 | * 列名 21 | * 22 | * @return 列名 23 | */ 24 | String name(); 25 | } 26 | -------------------------------------------------------------------------------- /demo-ratelimit-guava/src/main/java/com/xkcoding/ratelimit/guava/SpringBootDemoRatelimitGuavaApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ratelimit.guava; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-09-12 14:06 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoRatelimitGuavaApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoRatelimitGuavaApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-ratelimit-redis/src/main/java/com/xkcoding/ratelimit/redis/SpringBootDemoRatelimitRedisApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ratelimit.redis; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-09-30 09:32 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoRatelimitRedisApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoRatelimitRedisApplication.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/repository/UserRoleDao.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.repository; 2 | 3 | import com.xkcoding.rbac.security.model.UserRole; 4 | import com.xkcoding.rbac.security.model.unionkey.UserRoleKey; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | /** 9 | *

10 | * 用户角色 DAO 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-12-10 11:24 15 | */ 16 | public interface UserRoleDao extends JpaRepository, JpaSpecificationExecutor { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /demo-exception-handler/src/main/java/com/xkcoding/exception/handler/SpringBootDemoExceptionHandlerApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.exception.handler; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-02 20:49 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoExceptionHandlerApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoExceptionHandlerApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-mongodb/src/main/java/com/xkcoding/mongodb/repository/ArticleRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mongodb.repository; 2 | 3 | import com.xkcoding.mongodb.model.Article; 4 | import org.springframework.data.mongodb.repository.MongoRepository; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 文章 Dao 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-12-28 16:30 15 | */ 16 | public interface ArticleRepository extends MongoRepository { 17 | /** 18 | * 根据标题模糊查询 19 | * 20 | * @param title 标题 21 | * @return 满足条件的文章列表 22 | */ 23 | List
findByTitleLike(String title); 24 | } 25 | -------------------------------------------------------------------------------- /demo-multi-datasource-jpa/src/main/java/com/xkcoding/multi/datasource/jpa/config/SnowflakeConfig.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.multi.datasource.jpa.config; 2 | 3 | import cn.hutool.core.lang.Snowflake; 4 | import cn.hutool.core.util.IdUtil; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | /** 9 | *

10 | * 雪花算法生成器 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2019-01-18 15:50 15 | */ 16 | @Configuration 17 | public class SnowflakeConfig { 18 | @Bean 19 | public Snowflake snowflake() { 20 | return IdUtil.createSnowflake(1, 1); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-orm-jdbctemplate/src/main/java/com/xkcoding/orm/jdbctemplate/annotation/Pk.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jdbctemplate.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 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-10-15 11:23 15 | */ 16 | @Retention(RetentionPolicy.RUNTIME) 17 | @Target({ElementType.FIELD}) 18 | public @interface Pk { 19 | /** 20 | * 自增 21 | * 22 | * @return 自增主键 23 | */ 24 | boolean auto() default true; 25 | } 26 | -------------------------------------------------------------------------------- /demo-properties/src/main/java/com/xkcoding/properties/property/DeveloperProperty.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.properties.property; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | *

9 | * 开发人员配置信息 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-09-29 10:51 14 | */ 15 | @Data 16 | @ConfigurationProperties(prefix = "developer") 17 | @Component 18 | public class DeveloperProperty { 19 | private String name; 20 | private String website; 21 | private String qq; 22 | private String phoneNumber; 23 | } 24 | -------------------------------------------------------------------------------- /demo-template-thymeleaf/src/main/java/com/xkcoding/template/thymeleaf/SpringBootDemoTemplateThymeleafApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.thymeleaf; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-10 10:10 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoTemplateThymeleafApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoTemplateThymeleafApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-websocket-socketio/src/main/java/com/xkcoding/websocket/socketio/SpringBootDemoWebsocketSocketioApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket.socketio; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-12 13:59 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoWebsocketSocketioApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoWebsocketSocketioApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-elasticsearch-rest-high-level-client/src/main/java/com/xkcoding/elasticsearch/common/ResultCode.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.elasticsearch.common; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | /** 7 | * ResultCode 8 | * 9 | * @author fxbin 10 | * @version v1.0 11 | * @since 2019-08-26 1:47 12 | */ 13 | @Getter 14 | @AllArgsConstructor 15 | public enum ResultCode { 16 | 17 | /** 18 | * 接口调用成功 19 | */ 20 | SUCCESS(0, "Request Successful"), 21 | 22 | /** 23 | * 服务器暂不可用,建议稍候重试。建议重试次数不超过3次。 24 | */ 25 | FAILURE(-1, "System Busy"); 26 | 27 | final int code; 28 | 29 | final String msg; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /demo-mq-rabbitmq/src/main/java/com/xkcoding/mq/rabbitmq/message/MessageStruct.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.mq.rabbitmq.message; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Builder; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | 8 | import java.io.Serializable; 9 | 10 | /** 11 | *

12 | * 测试消息体 13 | *

14 | * 15 | * @author yangkai.shen 16 | * @date Created in 2018-12-29 16:22 17 | */ 18 | @Data 19 | @Builder 20 | @NoArgsConstructor 21 | @AllArgsConstructor 22 | public class MessageStruct implements Serializable { 23 | private static final long serialVersionUID = 392365881428311040L; 24 | 25 | private String message; 26 | } 27 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/payload/ClassmateInfoGroupByLesson.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j.payload; 2 | 3 | import com.xkcoding.neo4j.model.Student; 4 | import lombok.Data; 5 | import org.springframework.data.neo4j.annotation.QueryResult; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | *

11 | * 按照课程分组的同学关系 12 | *

13 | * 14 | * @author yangkai.shen 15 | * @date Created in 2018-12-24 19:18 16 | */ 17 | @Data 18 | @QueryResult 19 | public class ClassmateInfoGroupByLesson { 20 | /** 21 | * 课程名称 22 | */ 23 | private String lessonName; 24 | 25 | /** 26 | * 学生信息 27 | */ 28 | private List students; 29 | } 30 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/config/IdConfig.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.config; 2 | 3 | import cn.hutool.core.lang.Snowflake; 4 | import cn.hutool.core.util.IdUtil; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | /** 9 | *

10 | * 雪花主键生成器 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-12-10 11:28 15 | */ 16 | @Configuration 17 | public class IdConfig { 18 | /** 19 | * 雪花生成器 20 | */ 21 | @Bean 22 | public Snowflake snowflake() { 23 | return IdUtil.createSnowflake(1, 1); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo-template-freemarker/src/main/java/com/xkcoding/template/freemarker/SpringBootDemoTemplateFreemarkerApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.template.freemarker; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动类 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-10-19 15:17 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoTemplateFreemarkerApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoTemplateFreemarkerApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /demo-pay/src/main/java/com/xkcoding/pay/SpringBootDemoPayApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.pay; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | *

9 | * 启动类 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2020-10-26 11:12 14 | */ 15 | @SpringBootApplication 16 | @RestController 17 | public class SpringBootDemoPayApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoPayApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/model/RolePermission.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.model; 2 | 3 | import com.xkcoding.rbac.security.model.unionkey.RolePermissionKey; 4 | import lombok.Data; 5 | 6 | import javax.persistence.EmbeddedId; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Table; 9 | 10 | /** 11 | *

12 | * 角色-权限 13 | *

14 | * 15 | * @author yangkai.shen 16 | * @date Created in 2018-12-10 13:46 17 | */ 18 | @Data 19 | @Entity 20 | @Table(name = "sec_role_permission") 21 | public class RolePermission { 22 | /** 23 | * 主键 24 | */ 25 | @EmbeddedId 26 | private RolePermissionKey id; 27 | } 28 | -------------------------------------------------------------------------------- /demo-multi-datasource-jpa/src/main/java/com/xkcoding/multi/datasource/jpa/SpringBootDemoMultiDatasourceJpaApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.multi.datasource.jpa; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | /** 7 | *

8 | * 启动器 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2019-01-16 17:34 13 | */ 14 | @SpringBootApplication 15 | public class SpringBootDemoMultiDatasourceJpaApplication { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringBootDemoMultiDatasourceJpaApplication.class, args); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /demo-async/src/main/java/com/xkcoding/async/SpringBootDemoAsyncApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.async; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.scheduling.annotation.EnableAsync; 6 | 7 | /** 8 | *

9 | * 启动器 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-12-29 10:28 14 | */ 15 | @EnableAsync 16 | @SpringBootApplication 17 | public class SpringBootDemoAsyncApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoAsyncApplication.class, args); 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /demo-oauth/oauth-authorization-server/src/main/java/com/xkcoding/oauth/repostiory/SysUserRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.oauth.repostiory; 2 | 3 | import com.xkcoding.oauth.entity.SysUser; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.Optional; 7 | 8 | /** 9 | * 用户信息仓库. 10 | * 11 | * @author EchoCow 12 | * @date 2020-01-06 13:08 13 | */ 14 | public interface SysUserRepository extends JpaRepository { 15 | 16 | /** 17 | * 通过用户名查找用户. 18 | * 19 | * @param username 用户名 20 | * @return 结果 21 | */ 22 | Optional findFirstByUsername(String username); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/repository/RolePermissionDao.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.repository; 2 | 3 | import com.xkcoding.rbac.security.model.RolePermission; 4 | import com.xkcoding.rbac.security.model.unionkey.RolePermissionKey; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | /** 9 | *

10 | * 角色-权限 DAO 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-12-10 13:45 15 | */ 16 | public interface RolePermissionDao extends JpaRepository, JpaSpecificationExecutor { 17 | } 18 | -------------------------------------------------------------------------------- /demo-rbac-shiro/src/main/java/com/xkcoding/rbac/shiro/controller/TestController.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.shiro.controller; 2 | 3 | import com.xkcoding.rbac.shiro.common.R; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | *

10 | * 测试Controller 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2019-03-21 16:13 15 | */ 16 | @RestController 17 | @RequestMapping("/test") 18 | public class TestController { 19 | 20 | @GetMapping("") 21 | public R test() { 22 | return R.success(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo-task-quartz/src/main/java/com/xkcoding/task/quartz/util/JobUtil.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task.quartz.util; 2 | 3 | import com.xkcoding.task.quartz.job.base.BaseJob; 4 | 5 | /** 6 | *

7 | * 定时任务反射工具类 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-11-26 13:33 12 | */ 13 | public class JobUtil { 14 | /** 15 | * 根据全类名获取Job实例 16 | * 17 | * @param classname Job全类名 18 | * @return {@link BaseJob} 实例 19 | * @throws Exception 泛型获取异常 20 | */ 21 | public static BaseJob getClass(String classname) throws Exception { 22 | Class clazz = Class.forName(classname); 23 | return (BaseJob) clazz.newInstance(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /demo-orm-mybatis-plus/src/main/java/com/xkcoding/orm/mybatis/plus/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis.plus.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.xkcoding.orm.mybatis.plus.entity.User; 5 | import com.xkcoding.orm.mybatis.plus.mapper.UserMapper; 6 | import com.xkcoding.orm.mybatis.plus.service.UserService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | *

11 | * User Service 12 | *

13 | * 14 | * @author yangkai.shen 15 | * @date Created in 2018-11-08 18:10 16 | */ 17 | @Service 18 | public class UserServiceImpl extends ServiceImpl implements UserService { 19 | } 20 | -------------------------------------------------------------------------------- /demo-session/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | session: 7 | store-type: redis 8 | redis: 9 | flush-mode: immediate 10 | namespace: "spring:session" 11 | redis: 12 | host: localhost 13 | port: 6379 14 | # 连接超时时间(记得添加单位,Duration) 15 | timeout: 10000ms 16 | # Redis默认情况下有16个分片,这里配置具体使用的分片 17 | # database: 0 18 | lettuce: 19 | pool: 20 | # 连接池最大连接数(使用负值表示没有限制) 默认 8 21 | max-active: 8 22 | # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 23 | max-wait: -1ms 24 | # 连接池中的最大空闲连接 默认 8 25 | max-idle: 8 26 | # 连接池中的最小空闲连接 默认 0 27 | min-idle: 0 -------------------------------------------------------------------------------- /demo-zookeeper/src/main/java/com/xkcoding/zookeeper/config/props/ZkProps.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.zookeeper.config.props; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | 6 | /** 7 | *

8 | * Zookeeper 配置项 9 | *

10 | * 11 | * @author yangkai.shen 12 | * @date Created in 2018-12-27 14:47 13 | */ 14 | @Data 15 | @ConfigurationProperties(prefix = "zk") 16 | public class ZkProps { 17 | /** 18 | * 连接地址 19 | */ 20 | private String url; 21 | 22 | /** 23 | * 超时时间(毫秒),默认1000 24 | */ 25 | private int timeout = 1000; 26 | 27 | /** 28 | * 重试次数,默认3 29 | */ 30 | private int retry = 3; 31 | } 32 | -------------------------------------------------------------------------------- /demo-cache-redis/src/main/java/com/xkcoding/cache/redis/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.redis.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | *

11 | * 用户实体 12 | *

13 | * 14 | * @author yangkai.shen 15 | * @date Created in 2018-11-15 16:39 16 | */ 17 | @Data 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | public class User implements Serializable { 21 | private static final long serialVersionUID = 2892248514883451461L; 22 | /** 23 | * 主键id 24 | */ 25 | private Long id; 26 | /** 27 | * 姓名 28 | */ 29 | private String name; 30 | } 31 | -------------------------------------------------------------------------------- /demo-email/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | mail: 3 | host: smtp.mxhichina.com 4 | port: 465 5 | username: spring-boot-demo@xkcoding.com 6 | # 使用 jasypt 加密密码,使用com.xkcoding.email.PasswordTest.testGeneratePassword 生成加密密码,替换 ENC(加密密码) 7 | password: ENC(OT0qGOpXrr1Iog1W+fjOiIDCJdBjHyhy) 8 | protocol: smtp 9 | test-connection: true 10 | default-encoding: UTF-8 11 | properties: 12 | mail.smtp.auth: true 13 | mail.smtp.starttls.enable: true 14 | mail.smtp.starttls.required: true 15 | mail.smtp.ssl.enable: true 16 | mail.display.sendmail: spring-boot-demo 17 | # 为 jasypt 配置解密秘钥 18 | jasypt: 19 | encryptor: 20 | password: spring-boot-demo 21 | -------------------------------------------------------------------------------- /demo-ldap/src/main/java/com/xkcoding/ldap/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ldap.repository; 2 | 3 | import com.xkcoding.ldap.entity.Person; 4 | import org.springframework.data.repository.CrudRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import javax.naming.Name; 8 | 9 | /** 10 | * PersonRepository 11 | * 12 | * @author fxbin 13 | * @version v1.0 14 | * @since 2019-08-26 1:02 15 | */ 16 | @Repository 17 | public interface PersonRepository extends CrudRepository { 18 | 19 | /** 20 | * 根据用户名查找 21 | * 22 | * @param uid 用户名 23 | * @return com.xkcoding.ldap.entity.Person 24 | */ 25 | Person findByUid(String uid); 26 | } 27 | -------------------------------------------------------------------------------- /demo-neo4j/src/main/java/com/xkcoding/neo4j/constants/NeoConsts.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.neo4j.constants; 2 | 3 | /** 4 | *

5 | * 常量池 6 | *

7 | * 8 | * @author yangkai.shen 9 | * @date Created in 2018-12-24 14:45 10 | */ 11 | public interface NeoConsts { 12 | /** 13 | * 关系:班级拥有的学生 14 | */ 15 | String R_STUDENT_OF_CLASS = "R_STUDENT_OF_CLASS"; 16 | 17 | /** 18 | * 关系:班级的班主任 19 | */ 20 | String R_BOSS_OF_CLASS = "R_BOSS_OF_CLASS"; 21 | 22 | /** 23 | * 关系:课程的老师 24 | */ 25 | String R_TEACHER_OF_LESSON = "R_TEACHER_OF_LESSON"; 26 | 27 | /** 28 | * 关系:学生选的课 29 | */ 30 | String R_LESSON_OF_STUDENT = "R_LESSON_OF_STUDENT"; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /demo-ratelimit-guava/src/main/java/com/xkcoding/ratelimit/guava/handler/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.ratelimit.guava.handler; 2 | 3 | import cn.hutool.core.lang.Dict; 4 | import org.springframework.web.bind.annotation.ExceptionHandler; 5 | import org.springframework.web.bind.annotation.RestControllerAdvice; 6 | 7 | /** 8 | *

9 | * 全局异常拦截 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-09-12 15:00 14 | */ 15 | @RestControllerAdvice 16 | public class GlobalExceptionHandler { 17 | 18 | @ExceptionHandler(RuntimeException.class) 19 | public Dict handler(RuntimeException ex) { 20 | return Dict.create().set("msg", ex.getMessage()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/vo/JwtResponse.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.vo; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | *

9 | * JWT 响应返回 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-12-10 16:01 14 | */ 15 | @Data 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | public class JwtResponse { 19 | /** 20 | * token 字段 21 | */ 22 | private String token; 23 | /** 24 | * token类型 25 | */ 26 | private String tokenType = "Bearer"; 27 | 28 | public JwtResponse(String token) { 29 | this.token = token; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /demo-cache-ehcache/src/main/java/com/xkcoding/cache/ehcache/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.ehcache.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | *

11 | * 用户实体 12 | *

13 | * 14 | * @author yangkai.shen 15 | * @date Created in 2018-11-16 16:53 16 | */ 17 | @Data 18 | @AllArgsConstructor 19 | @NoArgsConstructor 20 | public class User implements Serializable { 21 | private static final long serialVersionUID = 2892248514883451461L; 22 | /** 23 | * 主键id 24 | */ 25 | private Long id; 26 | /** 27 | * 姓名 28 | */ 29 | private String name; 30 | } 31 | -------------------------------------------------------------------------------- /demo-codegen/src/main/java/com/xkcoding/codegen/common/PageResult.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.codegen.common; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 分页结果集 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2019-03-22 11:24 15 | */ 16 | @Data 17 | @AllArgsConstructor 18 | public class PageResult { 19 | /** 20 | * 总条数 21 | */ 22 | private Long total; 23 | 24 | /** 25 | * 页码 26 | */ 27 | private int pageNumber; 28 | 29 | /** 30 | * 每页结果数 31 | */ 32 | private int pageSize; 33 | 34 | /** 35 | * 结果集 36 | */ 37 | private List list; 38 | } 39 | -------------------------------------------------------------------------------- /demo-cache-ehcache/src/main/java/com/xkcoding/cache/ehcache/SpringBootDemoCacheEhcacheApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.ehcache; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cache.annotation.EnableCaching; 6 | 7 | /** 8 | *

9 | * 启动类 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-11-16 17:02 14 | */ 15 | @SpringBootApplication 16 | @EnableCaching 17 | public class SpringBootDemoCacheEhcacheApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoCacheEhcacheApplication.class, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-websocket/src/main/java/com/xkcoding/websocket/SpringBootDemoWebsocketApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.websocket; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.scheduling.annotation.EnableScheduling; 6 | 7 | /** 8 | *

9 | * 启动器 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-12-14 14:58 14 | */ 15 | @SpringBootApplication 16 | @EnableScheduling 17 | public class SpringBootDemoWebsocketApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoWebsocketApplication.class, args); 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /demo-rbac-shiro/src/main/java/com/xkcoding/rbac/shiro/SpringBootDemoRbacShiroApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.shiro; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | *

9 | * 启动器 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2019-03-21 16:11 14 | */ 15 | @SpringBootApplication 16 | @MapperScan("com.xkcoding.rbac.shiro.mapper") 17 | public class SpringBootDemoRbacShiroApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoRbacShiroApplication.class, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-admin/admin-server/src/main/java/com/xkcoding/admin/server/SpringBootDemoAdminServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.admin.server; 2 | 3 | import de.codecentric.boot.admin.server.config.EnableAdminServer; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | *

9 | * 启动类 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-10-08 14:08 14 | */ 15 | @EnableAdminServer 16 | @SpringBootApplication 17 | public class SpringBootDemoAdminServerApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoAdminServerApplication.class, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/template/Mapper.xml.vm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | #foreach($column in $columns) 6 | #if($column.lowerAttrName==$pk.lowerAttrName) 7 | 8 | #else 9 | 10 | #end 11 | #end 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo-orm-jpa/src/main/java/com/xkcoding/orm/jpa/repository/DepartmentDao.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.jpa.repository; 2 | 3 | import com.xkcoding.orm.jpa.entity.Department; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.stereotype.Repository; 6 | 7 | import java.util.List; 8 | 9 | 10 | /** 11 | *

12 | * User Dao 13 | *

14 | * 15 | * @author 76peter 16 | * @date Created in 2019-10-01 18:07 17 | */ 18 | @Repository 19 | public interface DepartmentDao extends JpaRepository { 20 | /** 21 | * 根据层级查询部门 22 | * 23 | * @param level 层级 24 | * @return 部门列表 25 | */ 26 | List findDepartmentsByLevels(Integer level); 27 | } 28 | -------------------------------------------------------------------------------- /demo-codegen/src/main/resources/template/ServiceImpl.java.vm: -------------------------------------------------------------------------------- 1 | package ${package}.${moduleName}.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import ${package}.${moduleName}.entity.${className}; 5 | import ${package}.${moduleName}.mapper.${className}Mapper; 6 | import ${package}.${moduleName}.service.${className}Service; 7 | import org.springframework.stereotype.Service; 8 | import lombok.extern.slf4j.Slf4j; 9 | /** 10 | *

11 | * ${comments} 12 | *

13 | * 14 | * @author ${author} 15 | * @date Created in ${datetime} 16 | */ 17 | @Service 18 | @Slf4j 19 | public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${className}> implements ${className}Service { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /demo-ureport2/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | context-path: /demo 5 | spring: 6 | datasource: 7 | url: jdbc:mysql://127.0.0.1:3306/spring-boot-demo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=GMT%2B8 8 | username: root 9 | password: root 10 | driver-class-name: com.mysql.cj.jdbc.Driver 11 | ureport: 12 | debug: false 13 | disableFileProvider: false 14 | disableHttpSessionReportCache: true 15 | # 单机模式,本地路径需要提前创建 16 | fileStoreDir: '/Users/yk.shen/Desktop/ureport2' 17 | #oss: 18 | # access-key: lengleng 19 | # secret-key: lengleng 20 | # bucket-name: lengleng 21 | # endpoint: http://minio.pig4cloud.com 22 | -------------------------------------------------------------------------------- /demo-elasticsearch/src/main/java/com/xkcoding/elasticsearch/repository/PersonRepository.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.elasticsearch.repository; 2 | 3 | import com.xkcoding.elasticsearch.model.Person; 4 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | *

10 | * 用户持久层 11 | *

12 | * 13 | * @author yangkai.shen 14 | * @date Created in 2018-12-20 19:00 15 | */ 16 | public interface PersonRepository extends ElasticsearchRepository { 17 | 18 | /** 19 | * 根据年龄区间查询 20 | * 21 | * @param min 最小值 22 | * @param max 最大值 23 | * @return 满足条件的用户列表 24 | */ 25 | List findByAgeBetween(Integer min, Integer max); 26 | } 27 | -------------------------------------------------------------------------------- /demo-orm-mybatis/src/main/java/com/xkcoding/orm/mybatis/SpringBootDemoOrmMybatisApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.orm.mybatis; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | *

9 | * 启动类 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-11-08 10:52 14 | */ 15 | @MapperScan(basePackages = {"com.xkcoding.orm.mybatis.mapper"}) 16 | @SpringBootApplication 17 | public class SpringBootDemoOrmMybatisApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoOrmMybatisApplication.class, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-task-quartz/src/main/java/com/xkcoding/task/quartz/SpringBootDemoTaskQuartzApplication.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.task.quartz; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import tk.mybatis.spring.annotation.MapperScan; 6 | 7 | /** 8 | *

9 | * 启动器 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-11-23 20:33 14 | */ 15 | @MapperScan(basePackages = {"com.xkcoding.task.quartz.mapper"}) 16 | @SpringBootApplication 17 | public class SpringBootDemoTaskQuartzApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(SpringBootDemoTaskQuartzApplication.class, args); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo-rbac-security/src/main/java/com/xkcoding/rbac/security/payload/LoginRequest.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.rbac.security.payload; 2 | 3 | import lombok.Data; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | /** 8 | *

9 | * 登录请求参数 10 | *

11 | * 12 | * @author yangkai.shen 13 | * @date Created in 2018-12-10 15:52 14 | */ 15 | @Data 16 | public class LoginRequest { 17 | 18 | /** 19 | * 用户名或邮箱或手机号 20 | */ 21 | @NotBlank(message = "用户名不能为空") 22 | private String usernameOrEmailOrPhone; 23 | 24 | /** 25 | * 密码 26 | */ 27 | @NotBlank(message = "密码不能为空") 28 | private String password; 29 | 30 | /** 31 | * 记住我 32 | */ 33 | private Boolean rememberMe = false; 34 | 35 | } 36 | -------------------------------------------------------------------------------- /demo-cache-redis/src/main/java/com/xkcoding/cache/redis/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.redis.service; 2 | 3 | import com.xkcoding.cache.redis.entity.User; 4 | 5 | /** 6 | *

7 | * UserService 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-11-15 16:45 12 | */ 13 | public interface UserService { 14 | /** 15 | * 保存或修改用户 16 | * 17 | * @param user 用户对象 18 | * @return 操作结果 19 | */ 20 | User saveOrUpdate(User user); 21 | 22 | /** 23 | * 获取用户 24 | * 25 | * @param id key值 26 | * @return 返回结果 27 | */ 28 | User get(Long id); 29 | 30 | /** 31 | * 删除 32 | * 33 | * @param id key值 34 | */ 35 | void delete(Long id); 36 | } 37 | -------------------------------------------------------------------------------- /demo-cache-ehcache/src/main/java/com/xkcoding/cache/ehcache/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.xkcoding.cache.ehcache.service; 2 | 3 | import com.xkcoding.cache.ehcache.entity.User; 4 | 5 | /** 6 | *

7 | * UserService 8 | *

9 | * 10 | * @author yangkai.shen 11 | * @date Created in 2018-11-16 16:53 12 | */ 13 | public interface UserService { 14 | /** 15 | * 保存或修改用户 16 | * 17 | * @param user 用户对象 18 | * @return 操作结果 19 | */ 20 | User saveOrUpdate(User user); 21 | 22 | /** 23 | * 获取用户 24 | * 25 | * @param id key值 26 | * @return 返回结果 27 | */ 28 | User get(Long id); 29 | 30 | /** 31 | * 删除 32 | * 33 | * @param id key值 34 | */ 35 | void delete(Long id); 36 | } 37 | --------------------------------------------------------------------------------