├── spring-boot-quick-start ├── src │ └── main │ │ ├── resources │ │ └── application.yml │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootquickstart │ │ ├── SpringBootQuickStartApplication.java │ │ ├── model │ │ └── UserModel.java │ │ └── controller │ │ └── UserController.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore └── pom.xml ├── spring-boot-swagger ├── src │ ├── main │ │ ├── resources │ │ │ ├── application-dev.yml │ │ │ ├── application-pro.yml │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootswagger │ │ │ ├── service │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ │ └── UserServiceImpl.java │ │ │ ├── SpringBootSwaggerApplication.java │ │ │ ├── model │ │ │ └── User.java │ │ │ ├── config │ │ │ └── SwaggerConfig.java │ │ │ └── controller │ │ │ └── UserController.java │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootswagger │ │ └── SpringBootSwaggerApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore └── pom.xml ├── spring-boot-quartz ├── doc │ └── README.md ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootquartz │ │ │ │ ├── repository │ │ │ │ └── JobEntityRepository.java │ │ │ │ ├── SpringBootQuartzApplication.java │ │ │ │ ├── dto │ │ │ │ └── ModifyCronDTO.java │ │ │ │ └── entity │ │ │ │ └── JobEntity.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── quartz.properties │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootquartz │ │ └── SpringBootQuartzApplicationTests.java ├── .gitignore └── sql │ └── job_entity_init.sql ├── spring-boot-webflux ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootwebflux │ │ │ ├── service │ │ │ ├── UserSerivice.java │ │ │ └── impl │ │ │ │ └── UserServiceImpl.java │ │ │ ├── model │ │ │ └── User.java │ │ │ ├── SpringBootWebfluxApplication.java │ │ │ └── controller │ │ │ └── UserController.java │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootwebflux │ │ └── SpringBootWebfluxApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore └── pom.xml ├── spring-boot-scheduler ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootscheduler │ │ │ ├── SpringBootSchedulerApplication.java │ │ │ └── task │ │ │ └── Task.java │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootscheduler │ │ └── SpringBootSchedulerApplicationTests.java ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore └── pom.xml ├── jfinal-demo ├── 官方Demo │ └── jfinal-4.9_demo_for_maven.zip ├── src │ └── main │ │ ├── resources │ │ ├── demo-config-dev.txt │ │ ├── log4j.properties │ │ └── logging.properties │ │ └── java │ │ └── com │ │ └── geekdigging │ │ └── demo │ │ ├── model │ │ ├── User.java │ │ ├── _MappingKit.java │ │ └── base │ │ │ └── BaseUser.java │ │ ├── interceptor │ │ ├── ServiceInterceptor.java │ │ ├── AuthInterceptor.java │ │ └── ActionInterceptor.java │ │ ├── service │ │ └── UserService.java │ │ ├── controller │ │ └── UserController.java │ │ └── _JFinalDemoGenerator.java └── .gitignore ├── spring-boot-admin ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── spring-boot-admin-client │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── .gitignore │ ├── src │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootadminclient │ │ │ │ └── SpringBootAdminClientApplicationTests.java │ │ └── main │ │ │ ├── resources │ │ │ └── application.yml │ │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootadminclient │ │ │ ├── SpringBootAdminClientApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── pom.xml ├── spring-boot-admin-clienta │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── application.yml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootadminclienta │ │ │ │ ├── SpringBootAdminClientaApplication.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootadminclienta │ │ │ └── SpringBootAdminClientaApplicationTests.java │ ├── .gitignore │ └── pom.xml ├── spring-boot-admin-server │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── .gitignore │ ├── src │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootadminserver │ │ │ │ └── SpringBootAdminServerApplicationTests.java │ │ └── main │ │ │ ├── resources │ │ │ └── application.yml │ │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootadminserver │ │ │ └── SpringBootAdminServerApplication.java │ └── pom.xml ├── spring-boot-eureka-server │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── application.yml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbooteurekaserver │ │ │ │ └── SpringBootEurekaServerApplication.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbooteurekaserver │ │ │ └── SpringBootEurekaServerApplicationTests.java │ └── pom.xml └── .gitignore ├── spring-boot-mail ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ ├── application.yml │ │ │ └── templates │ │ │ │ └── email.html │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootmail │ │ │ ├── service │ │ │ └── MailService.java │ │ │ └── SpringBootMailApplication.java │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootmail │ │ └── SpringBootMailApplicationTests.java ├── .gitignore └── pom.xml ├── spring-boot-redis ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootredis │ │ │ │ ├── service │ │ │ │ ├── UserService.java │ │ │ │ └── impl │ │ │ │ │ └── UserServiceImpl.java │ │ │ │ ├── model │ │ │ │ └── User.java │ │ │ │ └── SpringBootRedisApplication.java │ │ └── resources │ │ │ └── application.yml │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootredis │ │ └── SpringBootRedisApplicationTests.java └── .gitignore ├── spring-boot-mybatis ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── spring-boot-mybatis-xml │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── .gitignore │ ├── src │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootmybatisxml │ │ │ │ └── SpringBootMybatisXmlApplicationTests.java │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootmybatisxml │ │ │ │ ├── mapper │ │ │ │ └── UserMapper.java │ │ │ │ ├── model │ │ │ │ └── User.java │ │ │ │ ├── SpringBootMybatisXmlApplication.java │ │ │ │ └── controller │ │ │ │ └── UserController.java │ │ │ └── resources │ │ │ ├── mybatis │ │ │ ├── mybatis-config.xml │ │ │ └── mapper │ │ │ │ └── UserMapper.xml │ │ │ └── application.yml │ └── pom.xml ├── spring-boot-mybatis-annotation │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── src │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── springboot │ │ │ │ │ └── springbootmybatisannotation │ │ │ │ │ ├── model │ │ │ │ │ └── User.java │ │ │ │ │ ├── SpringBootMybatisAnnotationApplication.java │ │ │ │ │ ├── controller │ │ │ │ │ └── UserController.java │ │ │ │ │ └── mapper │ │ │ │ │ └── UserMapper.java │ │ │ └── resources │ │ │ │ └── application.yml │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootmybatisannotation │ │ │ └── SpringBootMybatisAnnotationApplicationTests.java │ ├── .gitignore │ └── pom.xml ├── .gitignore └── sql │ └── user.sql ├── spring-boot-actuator ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootactuator │ │ │ │ ├── SpringBootActuatorApplication.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.yml │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootactuator │ │ └── SpringBootActuatorApplicationTests.java └── pom.xml ├── spring-boot-analysis ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── spring-boot-mvc-latency │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── application.yml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootmvclatency │ │ │ │ ├── SpringBootMvcLatencyApplication.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootmvclatency │ │ │ └── SpringBootMvcLatencyApplicationTests.java │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── .gitignore │ └── pom.xml ├── spring-boot-webflux-latency │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ └── application.yml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootwebfluxlatency │ │ │ │ ├── SpringBootWebfluxLatencyApplication.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootwebfluxlatency │ │ │ └── SpringBootWebfluxLatencyApplicationTests.java │ ├── .mvn │ │ └── wrapper │ │ │ ├── maven-wrapper.properties │ │ │ └── maven-wrapper.jar │ ├── .gitignore │ └── pom.xml ├── .gitignore └── pom.xml ├── spring-boot-jpa-druid ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── springcloud │ │ │ └── springbootjpadruid │ │ │ ├── SpringBootJpaDruidApplication.java │ │ │ ├── repository │ │ │ └── UserRepository.java │ │ │ ├── model │ │ │ └── UserModel.java │ │ │ └── controller │ │ │ └── UserController.java │ └── test │ │ └── java │ │ └── com │ │ └── springcloud │ │ └── springbootjpadruid │ │ └── SpringBootJpaDruidApplicationTests.java ├── .gitignore └── pom.xml ├── spring-boot-jpa-hikari ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootjpahikari │ │ │ │ ├── SpringBootJpaHikariApplication.java │ │ │ │ ├── repository │ │ │ │ └── UserRepository.java │ │ │ │ ├── model │ │ │ │ └── UserModel.java │ │ │ │ └── controller │ │ │ │ └── UserController.java │ │ └── resources │ │ │ └── application.yml │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootjpahikari │ │ └── SpringBootJpaHikariApplicationTests.java └── pom.xml ├── spring-boot-rabbitmq ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootrabbitmq │ │ │ ├── DemoApplication.java │ │ │ ├── config │ │ │ ├── QueueConfig.java │ │ │ ├── TopicConfig.java │ │ │ └── FanoutConfig.java │ │ │ ├── fanout │ │ │ ├── FanoutReceiveA.java │ │ │ ├── FanoutReceiveB.java │ │ │ ├── FanoutReceiveC.java │ │ │ └── FanoutSend.java │ │ │ ├── simple │ │ │ ├── SimpleReceive.java │ │ │ └── SimpleSend.java │ │ │ ├── topic │ │ │ ├── TopicReceive1.java │ │ │ ├── TopicReceive.java │ │ │ └── TopicSend.java │ │ │ └── many │ │ │ ├── SimpleManyReceive.java │ │ │ ├── SimpleManyReceive1.java │ │ │ ├── SimpleManySend.java │ │ │ └── SimpleManySend1.java │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootrabbitmq │ │ └── DemoApplicationTests.java ├── .gitignore └── pom.xml ├── spring-boot-thymeleaf ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── resources │ │ │ ├── templates │ │ │ │ ├── error │ │ │ │ │ ├── 404.html │ │ │ │ │ └── 500.html │ │ │ │ └── hello.html │ │ │ └── application.yml │ │ └── java │ │ │ └── com │ │ │ └── springboot │ │ │ └── springbootthymeleaf │ │ │ ├── SpringBootThymeleafApplication.java │ │ │ ├── model │ │ │ ├── UserModel.java │ │ │ └── CourseModel.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootthymeleaf │ │ └── SpringBootThymeleafApplicationTests.java ├── .gitignore └── pom.xml ├── spring-boot-jpa-querydsl ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── .gitignore └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── springboot │ │ │ └── springbootjpaquerydsl │ │ │ ├── SpringBootJpaQuerydslApplication.java │ │ │ ├── repository │ │ │ ├── UserRepository.java │ │ │ └── LessonRepository.java │ │ │ ├── dto │ │ │ └── UserDTO.java │ │ │ ├── service │ │ │ ├── LessonService.java │ │ │ └── UserService.java │ │ │ ├── config │ │ │ └── JpaQueryConfig.java │ │ │ ├── model │ │ │ ├── UserModel.java │ │ │ └── LessonModel.java │ │ │ └── controller │ │ │ └── UserController.java │ └── resources │ │ └── application.yml │ └── test │ └── java │ └── com │ └── springboot │ └── springbootjpaquerydsl │ └── SpringBootJpaQuerydslApplicationTests.java ├── spring-boot-mybatis-plus ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── springboot │ │ │ │ └── springbootmybatisplus │ │ │ │ ├── service │ │ │ │ ├── UserService.java │ │ │ │ └── impl │ │ │ │ │ └── UserServiceImpl.java │ │ │ │ ├── mapper │ │ │ │ └── UserMapper.java │ │ │ │ ├── SpringBootMybatisPlusApplication.java │ │ │ │ ├── config │ │ │ │ └── MybatisPlusConfig.java │ │ │ │ └── model │ │ │ │ └── User.java │ │ └── resources │ │ │ ├── application.yml │ │ │ └── spy.properties │ └── test │ │ └── java │ │ └── com │ │ └── springboot │ │ └── springbootmybatisplus │ │ └── SpringBootMybatisPlusApplicationTests.java └── .gitignore └── springboot-security-jwt ├── src ├── main │ ├── resources │ │ └── application.yml │ └── java │ │ └── com │ │ └── geekdigging │ │ └── springbootsecurityjwt │ │ ├── service │ │ ├── AuthService.java │ │ └── UserService.java │ │ ├── SpringbootSecurityJwtApplication.java │ │ ├── model │ │ └── entity │ │ │ ├── Role.java │ │ │ └── User.java │ │ ├── repository │ │ └── UserRepository.java │ │ ├── common │ │ └── Const.java │ │ └── controller │ │ ├── TestController.java │ │ └── JwtAuthController.java └── test │ └── java │ └── com │ └── geekdigging │ └── springbootsecurityjwt │ └── SpringbootSecurityJwtApplicationTests.java └── .gitignore /spring-boot-quick-start/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/resources/application-dev.yml: -------------------------------------------------------------------------------- 1 | swagger: 2 | show: true -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/resources/application-pro.yml: -------------------------------------------------------------------------------- 1 | swagger: 2 | show: false -------------------------------------------------------------------------------- /spring-boot-quartz/doc/README.md: -------------------------------------------------------------------------------- 1 | 启动前请先执行 sql 文件中的脚本。 2 | 3 | 本代码来源自:https://github.com/EalenXie/SpringBoot-Quartz -------------------------------------------------------------------------------- /spring-boot-webflux/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-webflux -------------------------------------------------------------------------------- /spring-boot-scheduler/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-scheduler -------------------------------------------------------------------------------- /jfinal-demo/官方Demo/jfinal-4.9_demo_for_maven.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/jfinal-demo/官方Demo/jfinal-4.9_demo_for_maven.zip -------------------------------------------------------------------------------- /spring-boot-admin/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-admin/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-mail/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-mail/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-redis/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-redis/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-mybatis/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-mybatis/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-quartz/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-quartz/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-swagger/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-swagger/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-webflux/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-webflux/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-actuator/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-actuator/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-analysis/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-analysis/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-mvc-latency -------------------------------------------------------------------------------- /spring-boot-jpa-druid/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-jpa-druid/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-jpa-hikari/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-rabbitmq/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-rabbitmq/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-scheduler/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-scheduler/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-thymeleaf/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-thymeleaf/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-actuator/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-admin/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-analysis/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-jpa-querydsl/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-mail/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-mybatis-plus/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-mybatis/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-quartz/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-quick-start/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-quick-start/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-rabbitmq/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-redis/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-swagger/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-webflux/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | spring: 4 | application: 5 | name: spring-boot-webflux-latency -------------------------------------------------------------------------------- /spring-boot-jpa-druid/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-quick-start/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-scheduler/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-swagger 6 | profiles: 7 | active: dev -------------------------------------------------------------------------------- /spring-boot-thymeleaf/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-eureka-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-admin/spring-boot-admin-client/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-admin/spring-boot-admin-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-admin/spring-boot-admin-clienta/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-eureka-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-admin/spring-boot-eureka-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-analysis/spring-boot-mvc-latency/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-mybatis/spring-boot-mybatis-xml/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-analysis/spring-boot-webflux-latency/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meteor1993/spring-boot-examples/HEAD/spring-boot-mybatis/spring-boot-mybatis-annotation/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /jfinal-demo/src/main/resources/demo-config-dev.txt: -------------------------------------------------------------------------------- 1 | # config 2 | jdbcUrl = jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull 3 | user = root 4 | password = 123456 5 | devMode = true 6 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-rabbitmq 6 | rabbitmq: 7 | host: localhost 8 | port: 5672 9 | username: admin 10 | password: admin -------------------------------------------------------------------------------- /spring-boot-mail/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-mail 6 | mail: 7 | host: smtp.qq.com 8 | username: 136736247 9 | password: xxxxxx 10 | default-encoding: UTF-8 11 | fromAddr: 136736247@qq.com 12 | nickName: inwsy -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/java/com/springboot/springbootmybatisplus/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisplus.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.springboot.springbootmybatisplus.model.User; 5 | 6 | public interface UserService extends IService { 7 | } 8 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/resources/templates/error/404.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 404 7 | 8 | 9 |

页面被妖怪抓走了!!!!

10 | 错误信息: 11 | 12 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/resources/templates/error/500.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 500 7 | 8 | 9 |

页面出错了,快查查看错误在哪里:

10 | 错误信息: 11 | 12 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9090 3 | spring: 4 | application: 5 | name: spring-boot-clienta 6 | boot: 7 | admin: 8 | client: 9 | url: http://localhost:8888 10 | management: 11 | endpoints: 12 | web: 13 | exposure: 14 | include: "*" 15 | endpoint: 16 | health: 17 | show-details: ALWAYS -------------------------------------------------------------------------------- /spring-boot-redis/src/main/java/com/springboot/springbootredis/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootredis.service; 2 | 3 | import com.springboot.springbootredis.model.User; 4 | 5 | /** 6 | * @Version: 1.0 7 | * @Desc: 8 | */ 9 | public interface UserService { 10 | User save(User user); 11 | 12 | User get(Long id); 13 | 14 | void delete(Long id); 15 | } 16 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/model/User.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.model; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | 5 | /** 6 | * Created with IntelliJ IDEA. 7 | * 8 | * @User: weishiyao 9 | * @Date: 2020/6/21 10 | * @Time: 1:05 11 | * @email: inwsy@hotmail.com 12 | * Description: 13 | */ 14 | public class User extends Model { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mail/src/main/java/com/springboot/springbootmail/service/MailService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmail.service; 2 | 3 | public interface MailService { 4 | void sendSimpleEmail(String to, String subject, String content); 5 | 6 | void sendHTMLEmail(String to, String subject, String content); 7 | 8 | void sendAttachmentsMail(String to, String subject, String content, String fileName, String filePath); 9 | } -------------------------------------------------------------------------------- /spring-boot-webflux/src/main/java/com/springboot/springbootwebflux/service/UserSerivice.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebflux.service; 2 | 3 | import com.springboot.springbootwebflux.model.User; 4 | import reactor.core.publisher.Flux; 5 | import reactor.core.publisher.Mono; 6 | 7 | /** 8 | * @Version: 1.0 9 | * @Desc: 10 | */ 11 | public interface UserSerivice { 12 | Mono getUserById(Long id); 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mail/src/main/resources/templates/email.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 邮件模版 6 | 7 | 8 | 这是邮件模版生成的邮件,可以点击链接查看详情。 9 | 查看详情。 10 | 当前的Code为: 11 | 12 | -------------------------------------------------------------------------------- /spring-boot-jpa-druid/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-jpa-druid 6 | profiles: 7 | active: decrypt 8 | jpa: 9 | database: mysql 10 | show-sql: true 11 | generate-ddl: true 12 | database-platform: org.hibernate.dialect.MySQL5InnoDBDialect 13 | hibernate: 14 | ddl-auto: update 15 | properties: 16 | hibernate: 17 | format_sql: true -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class DemoApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(DemoApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-quartz/src/main/java/com/springboot/springbootquartz/repository/JobEntityRepository.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquartz.repository; 2 | 3 | import com.springboot.springbootquartz.entity.JobEntity; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * @Version: 1.0 8 | * @Desc: 9 | */ 10 | public interface JobEntityRepository extends JpaRepository { 11 | JobEntity getById(Integer id); 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-mail/src/main/java/com/springboot/springbootmail/SpringBootMailApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmail; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootMailApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootMailApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/java/com/springboot/springbootswagger/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootswagger.service; 2 | 3 | import com.springboot.springbootswagger.model.User; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @Version: 1.0 9 | * @Desc: 10 | */ 11 | public interface UserService { 12 | User getUserById(Long id); 13 | List getAllUsers(); 14 | User saveUser(User user); 15 | void deleteById(Long id); 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-webflux/src/main/java/com/springboot/springbootwebflux/model/User.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebflux.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * @Version: 1.0 9 | * @Desc: 10 | */ 11 | @Data 12 | @AllArgsConstructor 13 | @NoArgsConstructor 14 | public class User { 15 | private Long id; 16 | private String nickName; 17 | private Integer age; 18 | } 19 | -------------------------------------------------------------------------------- /jfinal-demo/.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 | -------------------------------------------------------------------------------- /spring-boot-admin/.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 | -------------------------------------------------------------------------------- /spring-boot-mail/.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 | -------------------------------------------------------------------------------- /spring-boot-quartz/.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 | -------------------------------------------------------------------------------- /spring-boot-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 | -------------------------------------------------------------------------------- /spring-boot-actuator/.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 | -------------------------------------------------------------------------------- /spring-boot-analysis/.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 | -------------------------------------------------------------------------------- /spring-boot-jpa-druid/.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 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/.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 | -------------------------------------------------------------------------------- /spring-boot-mybatis/.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 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/springboot/springbootmybatisannotation/model/User.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisannotation.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * @Version: 1.0 9 | * @Desc: 10 | */ 11 | @Data 12 | public class User { 13 | private String id; 14 | 15 | private String nickName; 16 | 17 | private int age; 18 | 19 | private Date createDate; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-quartz/src/main/java/com/springboot/springbootquartz/SpringBootQuartzApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquartz; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootQuartzApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootQuartzApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-quick-start/.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 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/.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 | -------------------------------------------------------------------------------- /spring-boot-scheduler/.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 | -------------------------------------------------------------------------------- /spring-boot-swagger/.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 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/.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 | -------------------------------------------------------------------------------- /spring-boot-webflux/.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 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/.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 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/.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 | -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/java/com/springboot/springbootswagger/SpringBootSwaggerApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootswagger; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSwaggerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSwaggerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-webflux/src/main/java/com/springboot/springbootwebflux/SpringBootWebfluxApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebflux; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootWebfluxApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootWebfluxApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-actuator/src/main/java/com/springboot/springbootactuator/SpringBootActuatorApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootactuator; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootActuatorApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootActuatorApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-jpa-druid/src/main/java/com/springcloud/springbootjpadruid/SpringBootJpaDruidApplication.java: -------------------------------------------------------------------------------- 1 | package com.springcloud.springbootjpadruid; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJpaDruidApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJpaDruidApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/src/main/java/com/springboot/springbootjpahikari/SpringBootJpaHikariApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpahikari; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJpaHikariApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJpaHikariApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/java/com/springboot/springbootmybatisplus/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisplus.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.springboot.springbootmybatisplus.model.User; 5 | 6 | /** 7 | * Created with IntelliJ IDEA. 8 | * 9 | * @Date: 2019/9/28 10 | * @Time: 23:21 11 | * @email: inwsy@hotmail.com 12 | * Description: 13 | */ 14 | public interface UserMapper extends BaseMapper { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/java/com/springboot/springbootthymeleaf/SpringBootThymeleafApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootthymeleaf; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootThymeleafApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootThymeleafApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | datasource: 5 | driver-class-name: com.mysql.cj.jdbc.Driver 6 | url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8 7 | username: root 8 | password: password 9 | jpa: 10 | hibernate: 11 | ddl-auto: update 12 | show-sql: true 13 | jackson: 14 | serialization: 15 | indent_output: true 16 | logging: 17 | level: 18 | org.springframework.security: info -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/.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 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/.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 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-server/.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 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-eureka-server/.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 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/.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 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-eureka-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8761 3 | spring: 4 | application: 5 | name: eureka-serve 6 | eureka: 7 | server: 8 | enable-self-preservation: false 9 | client: 10 | register-with-eureka: false 11 | service-url: 12 | defaultZone: ${EUREKA_SERVICE_URL:http://localhost:8761}/eureka/ 13 | management: 14 | endpoints: 15 | web: 16 | exposure: 17 | include: "*" 18 | endpoint: 19 | health: 20 | show-details: ALWAYS -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/.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 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/.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 | -------------------------------------------------------------------------------- /spring-boot-quick-start/src/main/java/com/springboot/springbootquickstart/SpringBootQuickStartApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquickstart; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootQuickStartApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootQuickStartApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-redis/src/test/java/com/springboot/springbootredis/SpringBootRedisApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootredis; 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 SpringBootRedisApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/service/AuthService.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.service; 2 | 3 | import com.geekdigging.springbootsecurityjwt.model.entity.User; 4 | 5 | /** 6 | * Created with IntelliJ IDEA. 7 | * 8 | * @Date: 2020/8/10 9 | * @Time: 20:10 10 | * @email: inwsy@hotmail.com 11 | * Description: 12 | */ 13 | public interface AuthService { 14 | User register(User userToAdd ); 15 | String login( String username, String password ); 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/SpringBootJpaQuerydslApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJpaQuerydslApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJpaQuerydslApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/.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 | -------------------------------------------------------------------------------- /spring-boot-quartz/src/test/java/com/springboot/springbootquartz/SpringBootQuartzApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquartz; 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 SpringBootQuartzApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/SpringbootSecurityJwtApplication.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringbootSecurityJwtApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringbootSecurityJwtApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-actuator/src/main/java/com/springboot/springbootactuator/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootactuator.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * @Version: 1.0 8 | * @Desc: 9 | */ 10 | @RestController 11 | public class HelloController { 12 | @GetMapping("/hello") 13 | public String hello() { 14 | return "Hello Spring Boot."; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-swagger/src/test/java/com/springboot/springbootswagger/SpringBootSwaggerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootswagger; 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 SpringBootSwaggerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-webflux/src/test/java/com/springboot/springbootwebflux/SpringBootWebfluxApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebflux; 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 SpringBootWebfluxApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-actuator/src/test/java/com/springboot/springbootactuator/SpringBootActuatorApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootactuator; 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 SpringBootActuatorApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-jpa-druid/src/test/java/com/springcloud/springbootjpadruid/SpringBootJpaDruidApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springcloud.springbootjpadruid; 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 SpringBootJpaDruidApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/src/main/java/com/springboot/springbootmvclatency/SpringBootMvcLatencyApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmvclatency; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootMvcLatencyApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootMvcLatencyApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/src/test/java/com/springboot/springbootjpahikari/SpringBootJpaHikariApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpahikari; 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 SpringBootJpaHikariApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-scheduler/src/test/java/com/springboot/springbootscheduler/SpringBootSchedulerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootscheduler; 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 SpringBootSchedulerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/test/java/com/springboot/springbootthymeleaf/SpringBootThymeleafApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootthymeleaf; 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 SpringBootThymeleafApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/src/main/java/com/springboot/springbootadminclienta/SpringBootAdminClientaApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminclienta; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootAdminClientaApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootAdminClientaApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/test/java/com/springboot/springbootjpaquerydsl/SpringBootJpaQuerydslApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl; 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 SpringBootJpaQuerydslApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/test/java/com/springboot/springbootmybatisplus/SpringBootMybatisPlusApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisplus; 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 SpringBootMybatisPlusApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.repository; 2 | 3 | import com.springboot.springbootjpaquerydsl.model.UserModel; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * Created with IntelliJ IDEA. 8 | * 9 | * @Date: 2019/9/25 10 | * @Time: 23:06 11 | * @email: inwsy@hotmail.com 12 | * Description: 13 | */ 14 | public interface UserRepository extends JpaRepository { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/repository/LessonRepository.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.repository; 2 | 3 | import com.springboot.springbootjpaquerydsl.model.LessonModel; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | /** 7 | * Created with IntelliJ IDEA. 8 | * 9 | * @Date: 2019/9/25 10 | * @Time: 23:07 11 | * @email: inwsy@hotmail.com 12 | * Description: 13 | */ 14 | public interface LessonRepository extends JpaRepository { 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/src/test/java/com/springboot/springbootmvclatency/SpringBootMvcLatencyApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmvclatency; 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 SpringBootMvcLatencyApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/src/main/java/com/springboot/springbootwebfluxlatency/SpringBootWebfluxLatencyApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebfluxlatency; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootWebfluxLatencyApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootWebfluxLatencyApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/test/java/com/springboot/springbootmybatisxml/SpringBootMybatisXmlApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisxml; 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 SpringBootMybatisXmlApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /springboot-security-jwt/.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 | src/main/resources/static/ 33 | src/main/resources/templates/ 34 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/src/test/java/com/springboot/springbootadminclient/SpringBootAdminClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminclient; 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 SpringBootAdminClientApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-server/src/test/java/com/springboot/springbootadminserver/SpringBootAdminServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminserver; 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 SpringBootAdminServerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/test/java/com/geekdigging/springbootsecurityjwt/SpringbootSecurityJwtApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; 6 | 7 | @SpringBootTest 8 | class SpringbootSecurityJwtApplicationTests { 9 | 10 | @Test 11 | void contextLoads() { 12 | System.out.println(new BCryptPasswordEncoder().encode("123456")); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/src/test/java/com/springboot/springbootadminclienta/SpringBootAdminClientaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminclienta; 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 SpringBootAdminClientaApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-eureka-server/src/test/java/com/springboot/springbooteurekaserver/SpringBootEurekaServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbooteurekaserver; 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 SpringBootEurekaServerApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/springboot/springbootmybatisxml/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisxml.mapper; 2 | 3 | import com.springboot.springbootmybatisxml.model.User; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @Version: 1.0 9 | * @Desc: 10 | */ 11 | public interface UserMapper { 12 | 13 | List getAll(); 14 | 15 | User getUser(String id); 16 | 17 | Long insertUser(User user); 18 | 19 | Long updateUser(User user); 20 | 21 | Long deleteUser(String id); 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-actuator/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | info: 4 | app: 5 | name: spring-boot-actuator 6 | version: 1.0.0 7 | spring: 8 | security: 9 | user: 10 | name: admin 11 | password: admin 12 | management: 13 | endpoints: 14 | web: 15 | exposure: 16 | include: '*' 17 | cors: 18 | allowed-origins: http://www.geekdigging.com 19 | allowed-methods: GET,POST 20 | # base-path: /monitor 21 | endpoint: 22 | health: 23 | show-details: always 24 | shutdown: 25 | enabled: true -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-admin-client 6 | eureka: 7 | instance: 8 | leaseRenewalIntervalInSeconds: 10 9 | health-check-url-path: /actuator/health 10 | client: 11 | registryFetchIntervalSeconds: 5 12 | serviceUrl: 13 | defaultZone: ${EUREKA_SERVICE_URL:http://localhost:8761}/eureka/ 14 | management: 15 | endpoints: 16 | web: 17 | exposure: 18 | include: "*" 19 | endpoint: 20 | health: 21 | show-details: ALWAYS -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8888 3 | spring: 4 | application: 5 | name: spring-boot-admin-server 6 | eureka: 7 | instance: 8 | leaseRenewalIntervalInSeconds: 10 9 | health-check-url-path: /actuator/health 10 | client: 11 | registryFetchIntervalSeconds: 5 12 | serviceUrl: 13 | defaultZone: ${EUREKA_SERVICE_URL:http://localhost:8761}/eureka/ 14 | management: 15 | endpoints: 16 | web: 17 | exposure: 18 | include: "*" 19 | endpoint: 20 | health: 21 | show-details: ALWAYS -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/src/test/java/com/springboot/springbootwebfluxlatency/SpringBootWebfluxLatencyApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebfluxlatency; 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 SpringBootWebfluxLatencyApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/src/test/java/com/springboot/springbootmybatisannotation/SpringBootMybatisAnnotationApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisannotation; 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 SpringBootMybatisAnnotationApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/springboot/springbootmybatisxml/model/User.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisxml.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | @Data 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class User { 17 | private String id; 18 | 19 | private String nickName; 20 | 21 | private int age; 22 | 23 | private Date createDate; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-scheduler/src/main/java/com/springboot/springbootscheduler/SpringBootSchedulerApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootscheduler; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.scheduling.annotation.EnableScheduling; 6 | 7 | @SpringBootApplication 8 | @EnableScheduling 9 | public class SpringBootSchedulerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootSchedulerApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-redis/src/main/java/com/springboot/springbootredis/model/User.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootredis.model; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import java.io.Serializable; 8 | 9 | /** 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | @Data 14 | @AllArgsConstructor 15 | @NoArgsConstructor 16 | public class User implements Serializable { 17 | 18 | private static final long serialVersionUID = 662692455422902539L; 19 | private Long id; 20 | private String name; 21 | private int age; 22 | } 23 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/model/entity/Role.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.model.entity; 2 | 3 | import lombok.Data; 4 | 5 | import javax.persistence.Entity; 6 | import javax.persistence.GeneratedValue; 7 | import javax.persistence.Id; 8 | 9 | /** 10 | * Created with IntelliJ IDEA. 11 | * 12 | * @Date: 2020/8/10 13 | * @Time: 15:11 14 | * @email: inwsy@hotmail.com 15 | * Description: 16 | */ 17 | @Entity 18 | @Data 19 | public class Role { 20 | 21 | @Id 22 | @GeneratedValue 23 | private Long id; 24 | 25 | private String name; 26 | } 27 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/model/_MappingKit.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.model; 2 | 3 | import com.jfinal.plugin.activerecord.ActiveRecordPlugin; 4 | 5 | /** 6 | * Generated by JFinal, do not modify this file. 7 | *
 8 |  * Example:
 9 |  * public void configPlugin(Plugins me) {
10 |  *     ActiveRecordPlugin arp = new ActiveRecordPlugin(...);
11 |  *     _MappingKit.mapping(arp);
12 |  *     me.add(arp);
13 |  * }
14 |  * 
15 | */ 16 | public class _MappingKit { 17 | 18 | public static void mapping(ActiveRecordPlugin arp) { 19 | arp.addMapping("user", "id", User.class); 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/src/main/java/com/springboot/springbootadminclient/SpringBootAdminClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminclient; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 6 | 7 | @SpringBootApplication 8 | @EnableEurekaClient 9 | public class SpringBootAdminClientApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootAdminClientApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/config/QueueConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.config; 2 | 3 | import org.springframework.amqp.core.Queue; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | /** 8 | * QueueConfig 9 | */ 10 | @Configuration 11 | public class QueueConfig { 12 | @Bean 13 | public Queue simpleQueue() { 14 | return new Queue("simple"); 15 | } 16 | 17 | @Bean 18 | public Queue simpleOneToMany() { 19 | return new Queue("simpleOneToMany"); 20 | } 21 | } -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.repository; 2 | 3 | import com.geekdigging.springbootsecurityjwt.model.entity.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | import java.util.Optional; 8 | 9 | /** 10 | * Created with IntelliJ IDEA. 11 | * 12 | * @Date: 2020/8/10 13 | * @Time: 15:40 14 | * @email: inwsy@hotmail.com 15 | * Description: 16 | */ 17 | public interface UserRepository extends JpaRepository { 18 | User findByUsername(String username); 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-eureka-server/src/main/java/com/springboot/springbooteurekaserver/SpringBootEurekaServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbooteurekaserver; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; 6 | 7 | @SpringBootApplication 8 | @EnableEurekaServer 9 | public class SpringBootEurekaServerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootEurekaServerApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/springboot/springbootmybatisxml/SpringBootMybatisXmlApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisxml; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | @MapperScan("com.springboot.springbootmybatisxml.mapper") 9 | public class SpringBootMybatisXmlApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootMybatisXmlApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/common/Const.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.common; 2 | 3 | /** 4 | * Created with IntelliJ IDEA. 5 | * 6 | * @Date: 2020/8/10 7 | * @Time: 15:04 8 | * @email: inwsy@hotmail.com 9 | * Description: 10 | */ 11 | public class Const { 12 | public static final long EXPIRATION_TIME = 432_000_000; // 5天(以毫秒ms计) 13 | public static final String SECRET = "CodeSheepSecret"; // JWT密码 14 | public static final String TOKEN_PREFIX = "Bearer"; // Token前缀 15 | public static final String HEADER_STRING = "Authorization"; // 存放Token的Header Key 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/src/main/java/com/springboot/springbootadminclient/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminclient.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * Created with IntelliJ IDEA. 8 | * 9 | * @Date: 2019/10/1 10 | * @Time: 21:37 11 | * @email: inwsy@hotmail.com 12 | * Description: 13 | */ 14 | @RestController 15 | public class HelloController { 16 | 17 | @GetMapping("/hello") 18 | public String hello() { 19 | return "http://www.geekdigging.com/"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/src/main/java/com/springboot/springbootadminclienta/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminclienta.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * Created with IntelliJ IDEA. 8 | * 9 | * @Date: 2019/10/1 10 | * @Time: 21:37 11 | * @email: inwsy@hotmail.com 12 | * Description: 13 | */ 14 | @RestController 15 | public class HelloController { 16 | 17 | @GetMapping("/hello") 18 | public String hello() { 19 | return "http://www.geekdigging.com/"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-quartz/src/main/java/com/springboot/springbootquartz/dto/ModifyCronDTO.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquartz.dto; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.validation.constraints.NotEmpty; 8 | import javax.validation.constraints.NotNull; 9 | 10 | /** 11 | * @Version: 1.0 12 | * @Desc: 13 | */ 14 | @Data 15 | @AllArgsConstructor 16 | @NoArgsConstructor 17 | public class ModifyCronDTO { 18 | @NotNull(message = "the job id cannot be null") 19 | private Integer id; 20 | 21 | @NotEmpty(message = "the cron cannot be empty") 22 | private String cron; 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/dto/UserDTO.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.dto; 2 | 3 | import com.springboot.springbootjpaquerydsl.model.LessonModel; 4 | import lombok.Data; 5 | 6 | import java.util.Date; 7 | import java.util.List; 8 | 9 | /** 10 | * Created with IntelliJ IDEA. 11 | * 12 | * @User: weishiyao 13 | * @Date: 2019/9/25 14 | * @Time: 23:41 15 | * @email: inwsy@hotmail.com 16 | * Description: 17 | */ 18 | @Data 19 | public class UserDTO { 20 | private String nickName; 21 | private int age; 22 | private Date startDate; 23 | private String address; 24 | private String name; 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/springboot/springbootmybatisannotation/SpringBootMybatisAnnotationApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisannotation; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | @MapperScan("com.springboot.springbootmybatisannotation.mapper") 9 | public class SpringBootMybatisAnnotationApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootMybatisAnnotationApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-jpa-druid/src/main/java/com/springcloud/springbootjpadruid/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.springcloud.springbootjpadruid.repository; 2 | 3 | import com.springcloud.springbootjpadruid.model.UserModel; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @Date: 2019/9/17 16:51 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | public interface UserRepository extends JpaRepository { 14 | UserModel getByIdIs(String id); 15 | 16 | UserModel findByNickName(String nickName); 17 | 18 | int countByAge(int age); 19 | 20 | List findByNickNameLike(String nickName); 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/src/main/java/com/springboot/springbootjpahikari/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpahikari.repository; 2 | 3 | import com.springboot.springbootjpahikari.model.UserModel; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @Date: 2019/9/17 16:51 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | public interface UserRepository extends JpaRepository { 14 | UserModel getByIdIs(String id); 15 | 16 | UserModel findByNickName(String nickName); 17 | 18 | int countByAge(int age); 19 | 20 | List findByNickNameLike(String nickName); 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-redis/src/main/java/com/springboot/springbootredis/SpringBootRedisApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootredis; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cache.annotation.EnableCaching; 6 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession; 7 | 8 | @SpringBootApplication 9 | @EnableCaching 10 | @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 1800) 11 | public class SpringBootRedisApplication { 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(SpringBootRedisApplication.class, args); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # log4j.rootLogger=WARN, stdout, file 2 | log4j.rootLogger=DEBUG, stdout, file 3 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n 6 | 7 | # Output to the File 8 | log4j.appender.file=org.apache.log4j.DailyRollingFileAppender 9 | log4j.appender.file.DatePattern='_'yyyy-MM-dd'.log' 10 | log4j.appender.file.File=./log/jfinal_demo_for_maven.log 11 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 12 | log4j.appender.file.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}%n[%p]-[Thread: %t]-[%C.%M()]: %m%n -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/main/resources/mybatis/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/fanout/FanoutReceiveA.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.fanout; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * FanoutReceiveA 11 | */ 12 | @Component 13 | @RabbitListener(queues = "fanout.A") 14 | public class FanoutReceiveA { 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @RabbitHandler 18 | public void process(String message) { 19 | logger.info("ReceiveA :{}", message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/fanout/FanoutReceiveB.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.fanout; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * FanoutReceiveB 11 | */ 12 | @Component 13 | @RabbitListener(queues = "fanout.B") 14 | public class FanoutReceiveB { 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @RabbitHandler 18 | public void process(String message) { 19 | logger.info("ReceiveB :{}", message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/simple/SimpleReceive.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.simple; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * SimpleReceive 11 | */ 12 | @Component 13 | @RabbitListener(queues = "simple") 14 | public class SimpleReceive { 15 | 16 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 17 | 18 | @RabbitHandler 19 | public void process(String message) { 20 | logger.info("Receive :{}", message); 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/java/com/springboot/springbootmybatisplus/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisplus.service.impl; 2 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 4 | import com.springboot.springbootmybatisplus.mapper.UserMapper; 5 | import com.springboot.springbootmybatisplus.model.User; 6 | import com.springboot.springbootmybatisplus.service.UserService; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Created with IntelliJ IDEA. 11 | * 12 | * @Date: 2019/9/30 13 | * @Time: 0:02 14 | * @email: inwsy@hotmail.com 15 | * Description: 16 | */ 17 | @Service 18 | public class UserServiceImpl extends ServiceImpl implements UserService { 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/service/LessonService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.service; 2 | 3 | import com.springboot.springbootjpaquerydsl.model.LessonModel; 4 | 5 | import java.text.ParseException; 6 | import java.util.Date; 7 | import java.util.List; 8 | 9 | /** 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | public interface LessonService { 14 | 15 | List findLessonList(String name, Date startDate, String address, String userId) throws ParseException; 16 | 17 | List findLessonDynaList(String name, Date startDate, String address, String userId) throws ParseException; 18 | 19 | List findLessonSubqueryList(String name, String address); 20 | } 21 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/topic/TopicReceive1.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.topic; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * TopicReceive1 11 | */ 12 | @Component 13 | @RabbitListener(queues = "topic.messages") 14 | public class TopicReceive1 { 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @RabbitHandler 18 | public void process(String message) { 19 | logger.info("Topic Receiver2 :{}", message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/many/SimpleManyReceive.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.many; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * SimpleManyReceive 11 | */ 12 | @Component 13 | @RabbitListener(queues = "simpleOneToMany") 14 | public class SimpleManyReceive { 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @RabbitHandler 18 | public void process(String message) { 19 | logger.info("Receive1 :{}", message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/many/SimpleManyReceive1.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.many; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * SimpleManyReceive 11 | */ 12 | @Component 13 | @RabbitListener(queues = "simpleOneToMany") 14 | public class SimpleManyReceive1 { 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @RabbitHandler 18 | public void process(String message) { 19 | logger.info("Receive2 :{}", message); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/topic/TopicReceive.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.topic; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * TopicReceive 11 | */ 12 | @Component 13 | @RabbitListener(queues = "topic.message") 14 | public class TopicReceive { 15 | 16 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 17 | 18 | @RabbitHandler 19 | public void process(String message) { 20 | logger.info("Topic Receiver1 :{}", message); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9090 3 | spring: 4 | application: 5 | name: spring-boot-mybatis-xml 6 | datasource: 7 | url: jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false 8 | username: root 9 | password: 123456 10 | driver-class-name: com.mysql.cj.jdbc.Driver 11 | type: com.zaxxer.hikari.HikariDataSource 12 | hikari: 13 | auto-commit: true 14 | minimum-idle: 2 15 | idle-timeout: 60000 16 | connection-timeout: 30000 17 | max-lifetime: 1800000 18 | pool-name: DatebookHikariCP 19 | maximum-pool-size: 5 20 | mybatis: 21 | type-aliases-package: com.springboot.springbootmybatisannotation.model 22 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-server/src/main/java/com/springboot/springbootadminserver/SpringBootAdminServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootadminserver; 2 | 3 | import de.codecentric.boot.admin.server.config.EnableAdminServer; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 8 | 9 | @SpringBootApplication 10 | @EnableAdminServer 11 | @EnableEurekaClient 12 | public class SpringBootAdminServerApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(SpringBootAdminServerApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-mybatis-xml 6 | datasource: 7 | url: jdbc:p6spy:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false 8 | username: root 9 | password: 123456 10 | driver-class-name: com.p6spy.engine.spy.P6SpyDriver 11 | type: com.zaxxer.hikari.HikariDataSource 12 | hikari: 13 | auto-commit: true 14 | minimum-idle: 2 15 | idle-timeout: 60000 16 | connection-timeout: 30000 17 | max-lifetime: 1800000 18 | pool-name: DatebookHikariCP 19 | maximum-pool-size: 5 20 | # 配置slq打印日志 21 | mybatis-plus: 22 | configuration: 23 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl -------------------------------------------------------------------------------- /spring-boot-jpa-druid/src/main/java/com/springcloud/springbootjpadruid/model/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.springcloud.springbootjpadruid.model; 2 | 3 | import lombok.Data; 4 | import org.hibernate.annotations.GenericGenerator; 5 | 6 | import javax.persistence.*; 7 | 8 | /** 9 | * @Date: 2019/9/17 16:49 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | @Entity 14 | @Data 15 | @Table(name = "user") 16 | public class UserModel { 17 | @Id 18 | @GeneratedValue(generator = "paymentableGenerator") 19 | @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") 20 | @Column(name = "ID", nullable=false, length=36) 21 | private String id; 22 | @Column(name = "nick_name") 23 | private String nickName; 24 | @Column(nullable = false) 25 | private int age; 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/src/main/java/com/springboot/springbootjpahikari/model/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpahikari.model; 2 | 3 | import lombok.Data; 4 | import org.hibernate.annotations.GenericGenerator; 5 | 6 | import javax.persistence.*; 7 | 8 | /** 9 | * @Date: 2019/9/17 16:49 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | @Entity 14 | @Data 15 | @Table(name = "user") 16 | public class UserModel { 17 | @Id 18 | @GeneratedValue(generator = "paymentableGenerator") 19 | @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") 20 | @Column(name ="ID",nullable=false,length=36) 21 | private String id; 22 | @Column(nullable = true, unique = true) 23 | private String nickName; 24 | @Column(nullable = false) 25 | private int age; 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-redis/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | servlet: 4 | session: 5 | timeout: 30m 6 | spring: 7 | application: 8 | name: spring-boot-redis 9 | cache: 10 | # 使用了Spring Cache后,能指定spring.cache.type就手动指定一下,虽然它会自动去适配已有Cache的依赖,但先后顺序会对Redis使用有影响(JCache -> EhCache -> Redis -> Guava) 11 | type: REDIS 12 | redis: 13 | host: 192.168.0.128 14 | port: 6379 15 | password: 123456 16 | # 连接超时时间(ms) 17 | timeout: 10000 18 | # Redis默认情况下有16个分片,这里配置具体使用的分片,默认是0 19 | database: 0 20 | lettuce: 21 | pool: 22 | # 连接池最大连接数(使用负值表示没有限制) 默认 8 23 | max-active: 100 24 | # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1 25 | max-wait: -1 26 | # 连接池中的最大空闲连接 默认 8 27 | max-idle: 8 28 | # 连接池中的最小空闲连接 默认 0 29 | min-idle: 0 -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/java/com/springboot/springbootmybatisplus/SpringBootMybatisPlusApplication.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisplus; 2 | 3 | import com.baomidou.mybatisplus.core.injector.ISqlInjector; 4 | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; 5 | import org.mybatis.spring.annotation.MapperScan; 6 | import org.springframework.boot.SpringApplication; 7 | import org.springframework.boot.autoconfigure.SpringBootApplication; 8 | import org.springframework.context.annotation.Bean; 9 | 10 | @SpringBootApplication 11 | @MapperScan("com.springboot.springbootmybatisplus.mapper") 12 | public class SpringBootMybatisPlusApplication { 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(SpringBootMybatisPlusApplication.class, args); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/config/JpaQueryConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.config; 2 | 3 | import com.querydsl.jpa.impl.JPAQueryFactory; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | import javax.persistence.EntityManager; 9 | 10 | /** 11 | * Created with IntelliJ IDEA. 12 | * 13 | * @Date: 2019/9/25 14 | * @Time: 23:47 15 | * @email: inwsy@hotmail.com 16 | * Description: 17 | */ 18 | @Configuration 19 | public class JpaQueryConfig { 20 | @Bean 21 | public JPAQueryFactory jpaQuery(EntityManager entityManager) { 22 | return new JPAQueryFactory(entityManager); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.service; 2 | 3 | import com.springboot.springbootjpaquerydsl.dto.UserDTO; 4 | import com.springboot.springbootjpaquerydsl.model.UserModel; 5 | 6 | import java.util.List; 7 | 8 | public interface UserService { 9 | Long update(String id, String nickName); 10 | 11 | Long delete(String id); 12 | 13 | List selectAllNameList(); 14 | 15 | List selectAllUserModelList(); 16 | 17 | List selectAllUserDTOList(); 18 | 19 | List selectDistinctNameList(); 20 | 21 | UserModel selectFirstUser(); 22 | 23 | UserModel selectUser(String id); 24 | 25 | String mysqlFuncDemo(String id, String nickName, int age); 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/java/com/springboot/springbootmybatisplus/config/MybatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisplus.config; 2 | 3 | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; 4 | import org.mybatis.spring.annotation.MapperScan; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.transaction.annotation.EnableTransactionManagement; 8 | 9 | /** 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | @Configuration 14 | public class MybatisPlusConfig { 15 | 16 | /** 17 | * 注册分页插件 18 | * @return 19 | */ 20 | @Bean 21 | public PaginationInterceptor paginationInterceptor(){ 22 | return new PaginationInterceptor(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/fanout/FanoutReceiveC.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.fanout; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.rabbit.annotation.RabbitHandler; 6 | import org.springframework.amqp.rabbit.annotation.RabbitListener; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @Author: shiyao.wei 11 | * @Date: 2019/10/8 16:38 12 | * @Version: 1.0 13 | * @Desc: 14 | */ 15 | @Component 16 | @RabbitListener(queues = "fanout.C") 17 | public class FanoutReceiveC { 18 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 19 | 20 | @RabbitHandler 21 | public void process(String message) { 22 | logger.info("ReceiveC :{}", message); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-thymleaf 6 | thymeleaf: 7 | # 关闭thymeleaf缓存 开发时使用 否则没有实时画面 8 | cache: false 9 | # 检查模板是否存在,然后再呈现 10 | check-template-location: true 11 | # Content-Type value. 12 | servlet: 13 | content-type: text/html 14 | # 启用MVC Thymeleaf视图分辨率 15 | enabled: true 16 | # Template encoding. 17 | encoding: UTF-8 18 | # 关闭严格模式 19 | mode: LEGACYHTML5 20 | # Prefix that gets prepended to view names when building a URL. 21 | prefix: classpath:/templates/ 22 | # Suffix that gets appended to view names when building a URL. 23 | suffix: .html 24 | mvc: 25 | # 指定静态资源处理路径 26 | static-path-pattern: /static/** 27 | view: 28 | suffix: .html -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/interceptor/ServiceInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.interceptor; 2 | 3 | import com.jfinal.aop.Interceptor; 4 | import com.jfinal.aop.Invocation; 5 | 6 | /** 7 | * Created with IntelliJ IDEA. 8 | * 9 | * @User: weishiyao 10 | * @Date: 2020/6/21 11 | * @Time: 23:04 12 | * @email: inwsy@hotmail.com 13 | * Description: 14 | */ 15 | public class ServiceInterceptor implements Interceptor { 16 | @Override 17 | public void intercept(Invocation inv) { 18 | System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>ServiceInterceptor>>>>>>>>>>>>>>>>>>>>>>>>>>>:Before invoking " + inv.getActionKey()); 19 | inv.invoke(); 20 | System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>ServiceInterceptor>>>>>>>>>>>>>>>>>>>>>>>>>>>:After invoking " + inv.getActionKey()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/fanout/FanoutSend.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.fanout; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.core.AmqpTemplate; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * FanoutSend 11 | */ 12 | @Component 13 | public class FanoutSend { 14 | 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @Autowired 18 | private AmqpTemplate rabbitTemplate; 19 | 20 | public void send() { 21 | String message = "Hello FanoutSend."; 22 | logger.info("send:{}", message); 23 | this.rabbitTemplate.convertAndSend("fanoutExchange","", message); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/java/com/springboot/springbootthymeleaf/model/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootthymeleaf.model; 2 | 3 | /** 4 | * @Author: shiyao.wei 5 | * @Date: 2019/9/16 16:49 6 | * @Version: 1.0 7 | * @Desc: 8 | */ 9 | public class UserModel { 10 | private Long id; 11 | private String name; 12 | private int age; 13 | 14 | public Long getId() { 15 | return id; 16 | } 17 | 18 | public void setId(Long id) { 19 | this.id = id; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public void setName(String name) { 27 | this.name = name; 28 | } 29 | 30 | public int getAge() { 31 | return age; 32 | } 33 | 34 | public void setAge(int age) { 35 | this.age = age; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-jpa-hikari 6 | jpa: 7 | database: mysql 8 | show-sql: true 9 | generate-ddl: true 10 | database-platform: org.hibernate.dialect.MySQL5InnoDBDialect 11 | hibernate: 12 | ddl-auto: update 13 | datasource: 14 | url: jdbc:mysql://192.168.0.128:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false 15 | username: root 16 | password: 123456 17 | driver-class-name: com.mysql.cj.jdbc.Driver 18 | type: com.zaxxer.hikari.HikariDataSource 19 | hikari: 20 | auto-commit: true 21 | minimum-idle: 2 22 | idle-timeout: 60000 23 | connection-timeout: 30000 24 | max-lifetime: 1800000 25 | pool-name: DatebookHikariCP 26 | maximum-pool-size: 5 -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-mybatis-xml 6 | datasource: 7 | url: jdbc:mysql://localhost:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false 8 | username: root 9 | password: 123456 10 | driver-class-name: com.mysql.cj.jdbc.Driver 11 | type: com.zaxxer.hikari.HikariDataSource 12 | hikari: 13 | auto-commit: true 14 | minimum-idle: 2 15 | idle-timeout: 60000 16 | connection-timeout: 30000 17 | max-lifetime: 1800000 18 | pool-name: DatebookHikariCP 19 | maximum-pool-size: 5 20 | mybatis: 21 | type-aliases-package: com.springboot.springbootmybatisxml.model 22 | config-location: classpath:mybatis/mybatis-config.xml 23 | mapper-locations: classpath:mybatis/mapper/*.xml -------------------------------------------------------------------------------- /spring-boot-quartz/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-quartz 6 | jpa: 7 | database: mysql 8 | show-sql: true 9 | generate-ddl: true 10 | database-platform: org.hibernate.dialect.MySQL5InnoDBDialect 11 | datasource: 12 | url: jdbc:mysql://172.16.96.112:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false 13 | username: root 14 | password: 123456 15 | driver-class-name: com.mysql.cj.jdbc.Driver 16 | type: com.zaxxer.hikari.HikariDataSource 17 | hikari: 18 | auto-commit: true 19 | minimum-idle: 2 20 | idle-timeout: 60000 21 | connection-timeout: 30000 22 | max-lifetime: 1800000 23 | pool-name: DatebookHikariCP 24 | maximum-pool-size: 5 25 | quartz: 26 | job-store-type: jdbc -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/many/SimpleManySend.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.many; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.core.AmqpTemplate; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * SimpleManySend 11 | */ 12 | @Component 13 | public class SimpleManySend { 14 | 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @Autowired 18 | private AmqpTemplate amqpTemplate; 19 | 20 | public void send(int i) { 21 | String message = "Hello Spring Boot: " + i; 22 | amqpTemplate.convertAndSend("simpleOneToMany", message); 23 | logger.info("SimpleManySend1 send {} is success.", i); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/src/main/java/com/springboot/springbootmvclatency/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmvclatency.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.PathVariable; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | import java.util.concurrent.TimeUnit; 8 | 9 | /** 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | @RestController 14 | public class HelloController { 15 | 16 | @GetMapping("/hello/{latency}") 17 | public String hello(@PathVariable Long latency) { 18 | try { 19 | TimeUnit.MILLISECONDS.sleep(latency); 20 | } catch (InterruptedException e) { 21 | return "Error during thread sleep!"; 22 | } 23 | return "Hello World!"; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/many/SimpleManySend1.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.many; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.core.AmqpTemplate; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * SimpleManySend 11 | */ 12 | @Component 13 | public class SimpleManySend1 { 14 | 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @Autowired 18 | private AmqpTemplate amqpTemplate; 19 | 20 | public void send(int i) { 21 | String message = "Hello Spring Boot: " + i; 22 | amqpTemplate.convertAndSend("simpleOneToMany", message); 23 | logger.info("SimpleManySend2 send {} is success.", i); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/java/com/springboot/springbootthymeleaf/model/CourseModel.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootthymeleaf.model; 2 | 3 | /** 4 | * @Author: shiyao.wei 5 | * @Date: 2019/9/16 16:50 6 | * @Version: 1.0 7 | * @Desc: 8 | */ 9 | public class CourseModel { 10 | private Long id; 11 | private String name; 12 | private String address; 13 | 14 | public Long getId() { 15 | return id; 16 | } 17 | 18 | public void setId(Long id) { 19 | this.id = id; 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public void setName(String name) { 27 | this.name = name; 28 | } 29 | 30 | public String getAddress() { 31 | return address; 32 | } 33 | 34 | public void setAddress(String address) { 35 | this.address = address; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/interceptor/AuthInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.interceptor; 2 | 3 | import com.jfinal.aop.Interceptor; 4 | import com.jfinal.aop.Invocation; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | /** 9 | * Created with IntelliJ IDEA. 10 | * 11 | * @User: weishiyao 12 | * @Date: 2020/6/21 13 | * @Time: 0:54 14 | * @email: inwsy@hotmail.com 15 | * Description: 16 | */ 17 | public class AuthInterceptor implements Interceptor { 18 | 19 | @Override 20 | public void intercept(Invocation inv) { 21 | System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>AuthInterceptor>>>>>>>>>>>>>>>>>>>>>>>>>>>:Before invoking " + inv.getActionKey()); 22 | inv.invoke(); 23 | System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>AuthInterceptor>>>>>>>>>>>>>>>>>>>>>>>>>>>:After invoking " + inv.getActionKey()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-quick-start/src/main/java/com/springboot/springbootquickstart/model/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquickstart.model; 2 | 3 | /** 4 | * Created with IntelliJ IDEA. 5 | * 6 | * @Date: 2019/9/11 7 | * @Time: 22:17 8 | * @email: inwsy@hotmail.com 9 | * Description: 10 | */ 11 | public class UserModel { 12 | private Long id; 13 | private String name; 14 | private int age; 15 | 16 | public Long getId() { 17 | return id; 18 | } 19 | 20 | public void setId(Long id) { 21 | this.id = id; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public void setName(String name) { 29 | this.name = name; 30 | } 31 | 32 | public int getAge() { 33 | return age; 34 | } 35 | 36 | public void setAge(int age) { 37 | this.age = age; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/model/UserModel.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.model; 2 | 3 | import lombok.Data; 4 | import org.hibernate.annotations.GenericGenerator; 5 | 6 | import javax.persistence.*; 7 | import java.util.Date; 8 | import java.util.List; 9 | 10 | /** 11 | * Created with IntelliJ IDEA. 12 | * 13 | * @Date: 2019/9/25 14 | * @Time: 23:02 15 | * @email: inwsy@hotmail.com 16 | * Description: 17 | */ 18 | @Entity 19 | @Data 20 | @Table(name = "user") 21 | public class UserModel { 22 | @Id 23 | @GeneratedValue(generator = "paymentableGenerator") 24 | @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") 25 | @Column(name ="ID",nullable=false,length=36) 26 | private String id; 27 | 28 | private String nickName; 29 | 30 | private int age; 31 | 32 | private Date createDate; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/java/com/springboot/springbootmybatisplus/model/User.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisplus.model; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableField; 5 | import com.baomidou.mybatisplus.annotation.TableId; 6 | import com.baomidou.mybatisplus.annotation.TableName; 7 | import lombok.Data; 8 | 9 | import java.util.Date; 10 | 11 | /** 12 | * Created with IntelliJ IDEA. 13 | * 14 | * @Date: 2019/9/28 15 | * @Time: 23:28 16 | * @email: inwsy@hotmail.com 17 | * Description: 18 | */ 19 | @Data 20 | @TableName("user") 21 | public class User { 22 | @TableId(value = "id", type = IdType.UUID) 23 | private String id; 24 | 25 | @TableField("nick_name") 26 | private String nickName; 27 | 28 | private int age; 29 | 30 | @TableField("create_date") 31 | private Date createDate; 32 | } 33 | -------------------------------------------------------------------------------- /spring-boot-webflux/src/main/java/com/springboot/springbootwebflux/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebflux.controller; 2 | 3 | import com.springboot.springbootwebflux.model.User; 4 | import com.springboot.springbootwebflux.service.UserSerivice; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RestController; 9 | import reactor.core.publisher.Mono; 10 | 11 | /** 12 | * @Version: 1.0 13 | * @Desc: 14 | */ 15 | @RestController 16 | public class UserController { 17 | 18 | @Autowired 19 | UserSerivice userSerivice; 20 | 21 | @GetMapping("/getUserById/{id}") 22 | public Mono getUserById(@PathVariable Long id) { 23 | return userSerivice.getUserById(id); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/src/main/java/com/springboot/springbootwebfluxlatency/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebfluxlatency.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.PathVariable; 5 | import org.springframework.web.bind.annotation.RestController; 6 | import reactor.core.publisher.Mono; 7 | 8 | import java.time.Duration; 9 | 10 | /** 11 | * Created with IntelliJ IDEA. 12 | * 13 | * @Date: 2019/10/14 14 | * @Time: 20:36 15 | * @email: inwsy@hotmail.com 16 | * Description: 17 | */ 18 | @RestController 19 | public class HelloController { 20 | @GetMapping("/hello/{latency}") 21 | public Mono hello(@PathVariable int latency) { 22 | return Mono.just("Welcome to reactive ~") 23 | .delayElement(Duration.ofMillis(latency)); // 1 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/model/LessonModel.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.model; 2 | 3 | import lombok.Data; 4 | import org.hibernate.annotations.GenericGenerator; 5 | 6 | import javax.persistence.*; 7 | import java.util.Date; 8 | 9 | /** 10 | * Created with IntelliJ IDEA. 11 | * 12 | * @Date: 2019/9/25 13 | * @Time: 23:03 14 | * @email: inwsy@hotmail.com 15 | * Description: 16 | */ 17 | @Entity 18 | @Data 19 | @Table(name = "lesson") 20 | public class LessonModel { 21 | @Id 22 | @GeneratedValue(generator = "paymentableGenerator") 23 | @GenericGenerator(name = "paymentableGenerator", strategy = "uuid") 24 | @Column(name ="ID",nullable=false,length=36) 25 | private String id; 26 | 27 | private String name; 28 | 29 | private Date startDate; 30 | 31 | private String address; 32 | 33 | private String userId; 34 | } 35 | -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/java/com/springboot/springbootswagger/model/User.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootswagger.model; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiModelProperty; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Data; 7 | import lombok.NoArgsConstructor; 8 | 9 | import java.util.Date; 10 | 11 | /** 12 | * @Version: 1.0 13 | * @Desc: 14 | */ 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | @ApiModel(value = "用户演示类", description = "请求参数类") 19 | public class User { 20 | @ApiModelProperty(example = "1", notes = "用户ID") 21 | private Long id; 22 | @ApiModelProperty(example = "geekdigging", notes = "用户名") 23 | private String nickName; 24 | @ApiModelProperty(example = "1570689455000", notes = "创建时间") 25 | private Date createDate; 26 | @ApiModelProperty(example = "18", notes = "用户年龄") 27 | private Integer age; 28 | } 29 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/interceptor/ActionInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.interceptor; 2 | 3 | import com.jfinal.aop.Before; 4 | import com.jfinal.aop.Interceptor; 5 | import com.jfinal.aop.Invocation; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | 9 | /** 10 | * Created with IntelliJ IDEA. 11 | * 12 | * @User: weishiyao 13 | * @Date: 2020/6/21 14 | * @Time: 0:55 15 | * @email: inwsy@hotmail.com 16 | * Description: 17 | */ 18 | public class ActionInterceptor implements Interceptor { 19 | 20 | @Override 21 | public void intercept(Invocation inv) { 22 | System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>ActionInterceptor>>>>>>>>>>>>>>>>>>>>>>>>>>>:Before invoking " + inv.getActionKey()); 23 | inv.invoke(); 24 | System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>ActionInterceptor>>>>>>>>>>>>>>>>>>>>>>>>>>>:After invoking " + inv.getActionKey()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/java/com/springboot/springbootjpaquerydsl/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpaquerydsl.controller; 2 | 3 | import com.springboot.springbootjpaquerydsl.dto.UserDTO; 4 | import com.springboot.springbootjpaquerydsl.service.UserService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RestController; 8 | 9 | import java.util.List; 10 | 11 | /** 12 | * Created with IntelliJ IDEA. 13 | * 14 | * @Date: 2019/9/26 15 | * @Time: 0:22 16 | * @email: inwsy@hotmail.com 17 | * Description: 18 | */ 19 | @RestController 20 | public class UserController { 21 | 22 | @Autowired 23 | UserService userService; 24 | 25 | @GetMapping("/userDto") 26 | public List userDto() { 27 | return userService.selectAllUserDTOList(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /spring-boot-jpa-querydsl/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | application: 5 | name: spring-boot-jpa-hikari 6 | jpa: 7 | database: mysql 8 | show-sql: true 9 | generate-ddl: true 10 | database-platform: org.hibernate.dialect.MySQL5InnoDBDialect 11 | hibernate: 12 | ddl-auto: update 13 | properties: 14 | hibernate: 15 | format_sql: true 16 | datasource: 17 | url: jdbc:mysql://192.168.0.128:3306/test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false 18 | username: root 19 | password: 123456 20 | driver-class-name: com.mysql.cj.jdbc.Driver 21 | type: com.zaxxer.hikari.HikariDataSource 22 | hikari: 23 | auto-commit: true 24 | minimum-idle: 2 25 | idle-timeout: 60000 26 | connection-timeout: 30000 27 | max-lifetime: 1800000 28 | pool-name: DatebookHikariCP 29 | maximum-pool-size: 5 -------------------------------------------------------------------------------- /spring-boot-webflux/src/main/java/com/springboot/springbootwebflux/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootwebflux.service.impl; 2 | 3 | import com.springboot.springbootwebflux.model.User; 4 | import com.springboot.springbootwebflux.service.UserSerivice; 5 | import org.springframework.stereotype.Service; 6 | import reactor.core.publisher.Flux; 7 | import reactor.core.publisher.Mono; 8 | 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | /** 13 | * @Version: 1.0 14 | * @Desc: 15 | */ 16 | @Service 17 | public class UserServiceImpl implements UserSerivice { 18 | 19 | private static Map map = new HashMap<>(); 20 | 21 | static { 22 | map.put(1L, new User(1L, "www.geekdigging.com", 18)); 23 | map.put(2L, new User(2L, "极客挖掘机", 28)); 24 | } 25 | 26 | @Override 27 | public Mono getUserById(Long id) { 28 | 29 | return Mono.just(map.get(id)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /spring-boot-quartz/src/main/java/com/springboot/springbootquartz/entity/JobEntity.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquartz.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | import javax.persistence.*; 8 | 9 | /** 10 | * @Version: 1.0 11 | * @Desc: 12 | */ 13 | @Entity 14 | @Table(name = "JOB_ENTITY") 15 | @Data 16 | @AllArgsConstructor 17 | @NoArgsConstructor 18 | public class JobEntity { 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | private Integer id; 22 | private String name; //job名称 23 | private String jobGroup; //job组名 24 | private String cron; //执行的cron 25 | private String parameter; //job的参数 26 | private String description; //job描述信息 27 | private String vmParam; //vm参数 28 | private String jarPath; //job的jar路径 29 | private String status; //job的执行状态,这里我设置为OPEN/CLOSE且只有该值为OPEN才会执行该Job 30 | } 31 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/simple/SimpleSend.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.simple; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.amqp.core.AmqpTemplate; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Component; 11 | 12 | /** 13 | * SimpleSend 14 | */ 15 | @Component 16 | public class SimpleSend { 17 | 18 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 19 | 20 | @Autowired 21 | private AmqpTemplate amqpTemplate; 22 | 23 | public void send() { 24 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 25 | String message = "Hello Spring Boot " + simpleDateFormat.format(new Date()); 26 | amqpTemplate.convertAndSend("simple", message); 27 | logger.info("消息推送成功!"); 28 | } 29 | } -------------------------------------------------------------------------------- /spring-boot-quartz/sql/job_entity_init.sql: -------------------------------------------------------------------------------- 1 | SET FOREIGN_KEY_CHECKS=0; 2 | DROP TABLE IF EXISTS `job_entity`; 3 | CREATE TABLE `job_entity` ( 4 | `id` int(11) NOT NULL AUTO_INCREMENT, 5 | `name` varchar(255) DEFAULT NULL, 6 | `job_group` varchar(255) DEFAULT NULL, 7 | `cron` varchar(255) DEFAULT NULL, 8 | `parameter` varchar(255) NOT NULL, 9 | `description` varchar(255) DEFAULT NULL, 10 | `vm_param` varchar(255) DEFAULT NULL, 11 | `jar_path` varchar(255) DEFAULT NULL, 12 | `status` varchar(255) DEFAULT NULL, 13 | PRIMARY KEY (`id`) 14 | ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; 15 | INSERT INTO `job_entity` VALUES ('1', 'first', 'helloworld', '0/2 * * * * ? ', '1', '第一个', '', null, 'OPEN'); 16 | INSERT INTO `job_entity` VALUES ('2', 'second', 'helloworld', '0/5 * * * * ? ', '2', '第二个', null, null, 'OPEN'); 17 | INSERT INTO `job_entity` VALUES ('4', 'third', 'helloworld', '0/15 * * * * ? ', '3', '第三个', null, null, 'OPEN'); 18 | INSERT INTO `job_entity` VALUES ('5', 'four', 'helloworld', '0 0/1 * * * ? *', '4', '第四个', null, null, 'CLOSE'); -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/topic/TopicSend.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.topic; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.amqp.core.AmqpTemplate; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * TopicSend 11 | */ 12 | @Component 13 | public class TopicSend { 14 | 15 | private final Logger logger = LoggerFactory.getLogger(this.getClass()); 16 | 17 | @Autowired 18 | private AmqpTemplate rabbitTemplate; 19 | 20 | public void send1() { 21 | String message = "message 1"; 22 | logger.info("send:{}", message); 23 | rabbitTemplate.convertAndSend("topicExchange", "topic.message", message); 24 | } 25 | 26 | public void send2() { 27 | String message = "message 2"; 28 | logger.info("send:{}", message); 29 | rabbitTemplate.convertAndSend("topicExchange", "topic.messages", message); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/model/base/BaseUser.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.model.base; 2 | 3 | import com.jfinal.plugin.activerecord.Model; 4 | import com.jfinal.plugin.activerecord.IBean; 5 | 6 | /** 7 | * Generated by JFinal, do not modify this file. 8 | */ 9 | @SuppressWarnings("serial") 10 | public abstract class BaseUser> extends Model implements IBean { 11 | 12 | public void setId(java.lang.String id) { 13 | set("id", id); 14 | } 15 | 16 | public java.lang.String getId() { 17 | return getStr("id"); 18 | } 19 | 20 | public void setCreateDate(java.util.Date createDate) { 21 | set("create_date", createDate); 22 | } 23 | 24 | public java.util.Date getCreateDate() { 25 | return get("create_date"); 26 | } 27 | 28 | public void setName(java.lang.String name) { 29 | set("name", name); 30 | } 31 | 32 | public java.lang.String getName() { 33 | return getStr("name"); 34 | } 35 | 36 | public void setAge(java.lang.Integer age) { 37 | set("age", age); 38 | } 39 | 40 | public java.lang.Integer getAge() { 41 | return getInt("age"); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/controller/TestController.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.controller; 2 | 3 | import org.springframework.security.access.prepost.PreAuthorize; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RequestMethod; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * Created with IntelliJ IDEA. 10 | * 11 | * @Date: 2020/8/10 12 | * @Time: 21:37 13 | * @email: inwsy@hotmail.com 14 | * Description: 15 | */ 16 | @RestController 17 | public class TestController { 18 | // 测试普通权限 19 | @PreAuthorize("hasAuthority('ROLE_NORMAL')") 20 | @RequestMapping(value="/normal/test", method = RequestMethod.GET) 21 | public String test1() { 22 | return "ROLE_NORMAL /normal/test接口调用成功!"; 23 | } 24 | 25 | // 测试管理员权限 26 | @PreAuthorize("hasAuthority('ROLE_ADMIN')") 27 | @RequestMapping(value = "/admin/test", method = RequestMethod.GET) 28 | public String test2() { 29 | return "ROLE_ADMIN /admin/test接口调用成功!"; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /spring-boot-mybatis-plus/src/main/resources/spy.properties: -------------------------------------------------------------------------------- 1 | module.log=com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory 2 | # \u81EA\u5B9A\u4E49\u65E5\u5FD7\u6253\u5370 3 | logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger 4 | #\u65E5\u5FD7\u8F93\u51FA\u5230\u63A7\u5236\u53F0 5 | appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger 6 | # \u4F7F\u7528\u65E5\u5FD7\u7CFB\u7EDF\u8BB0\u5F55 sql 7 | #appender=com.p6spy.engine.spy.appender.Slf4JLogger 8 | # \u8BBE\u7F6E p6spy driver \u4EE3\u7406 9 | deregisterdrivers=true 10 | # \u53D6\u6D88JDBC URL\u524D\u7F00 11 | useprefix=true 12 | # \u914D\u7F6E\u8BB0\u5F55 Log \u4F8B\u5916,\u53EF\u53BB\u6389\u7684\u7ED3\u679C\u96C6\u6709error,info,batch,debug,statement,commit,rollback,result,resultset. 13 | excludecategories=info,debug,result,batch,resultset 14 | # \u65E5\u671F\u683C\u5F0F 15 | dateformat=yyyy-MM-dd HH:mm:ss 16 | # \u5B9E\u9645\u9A71\u52A8\u53EF\u591A\u4E2A 17 | #driverlist=org.h2.Driver 18 | # \u662F\u5426\u5F00\u542F\u6162SQL\u8BB0\u5F55 19 | outagedetection=true 20 | # \u6162SQL\u8BB0\u5F55\u6807\u51C6 2 \u79D2 21 | outagedetectioninterval=2 -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.service; 2 | 3 | import com.geekdigging.springbootsecurityjwt.model.entity.User; 4 | import com.geekdigging.springbootsecurityjwt.repository.UserRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.core.userdetails.UserDetails; 7 | import org.springframework.security.core.userdetails.UserDetailsService; 8 | import org.springframework.security.core.userdetails.UsernameNotFoundException; 9 | import org.springframework.stereotype.Service; 10 | 11 | /** 12 | * Created with IntelliJ IDEA. 13 | * 14 | * @Date: 2020/8/10 15 | * @Time: 20:09 16 | * @email: inwsy@hotmail.com 17 | * Description: 18 | */ 19 | @Service 20 | public class UserService implements UserDetailsService { 21 | 22 | @Autowired 23 | UserRepository userRepository; 24 | 25 | @Override 26 | public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException { 27 | User user = userRepository.findByUsername(s); 28 | if (user == null) { 29 | throw new UsernameNotFoundException("用户不存在"); 30 | } 31 | return user; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /spring-boot-jpa-druid/src/main/java/com/springcloud/springbootjpadruid/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springcloud.springbootjpadruid.controller; 2 | 3 | import com.springcloud.springbootjpadruid.model.UserModel; 4 | import com.springcloud.springbootjpadruid.repository.UserRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.domain.Sort; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import java.util.List; 10 | 11 | @RestController 12 | public class UserController { 13 | 14 | @Autowired 15 | UserRepository userRepository; 16 | 17 | /** 18 | * 查询用户列表 19 | * @return 20 | */ 21 | @GetMapping("/user") 22 | public List user() { 23 | return userRepository.findAll(Sort.by("id").descending()); 24 | } 25 | 26 | /** 27 | * 新增或更新用户信息 28 | * @param user 29 | * @return 30 | */ 31 | @PostMapping("/user") 32 | public UserModel user(@RequestBody UserModel user) { 33 | return userRepository.save(user); 34 | } 35 | 36 | /** 37 | * 根据id删除用户 38 | * @param id 39 | * @return 40 | */ 41 | @DeleteMapping("/user") 42 | public String deleteUserById(String id) { 43 | userRepository.deleteById(id); 44 | return "success"; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/src/main/java/com/springboot/springbootjpahikari/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootjpahikari.controller; 2 | 3 | import com.springboot.springbootjpahikari.model.UserModel; 4 | import com.springboot.springbootjpahikari.repository.UserRepository; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.domain.Sort; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import java.util.List; 10 | 11 | @RestController 12 | public class UserController { 13 | 14 | @Autowired 15 | UserRepository userRepository; 16 | 17 | /** 18 | * 查询用户列表 19 | * @return 20 | */ 21 | @GetMapping("/user") 22 | public List user() { 23 | return userRepository.findAll(Sort.by("id").descending()); 24 | } 25 | 26 | /** 27 | * 新增或更新用户信息 28 | * @param user 29 | * @return 30 | */ 31 | @PostMapping("/user") 32 | public UserModel user(@RequestBody UserModel user) { 33 | return userRepository.save(user); 34 | } 35 | 36 | /** 37 | * 根据id删除用户 38 | * @param id 39 | * @return 40 | */ 41 | @DeleteMapping("/user") 42 | public String deleteUserById(String id) { 43 | userRepository.deleteById(id); 44 | return "success"; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /spring-boot-quartz/src/main/resources/quartz.properties: -------------------------------------------------------------------------------- 1 | #ID\u8BBE\u7F6E\u4E3A\u81EA\u52A8\u83B7\u53D6 \u6BCF\u4E00\u4E2A\u5FC5\u987B\u4E0D\u540C \uFF08\u6240\u6709\u8C03\u5EA6\u5668\u5B9E\u4F8B\u4E2D\u662F\u552F\u4E00\u7684\uFF09 2 | org.quartz.scheduler.instanceId=AUTO 3 | #\u6307\u5B9A\u8C03\u5EA6\u7A0B\u5E8F\u7684\u4E3B\u7EBF\u7A0B\u662F\u5426\u5E94\u8BE5\u662F\u5B88\u62A4\u7EBF\u7A0B 4 | org.quartz.scheduler.makeSchedulerThreadDaemon=true 5 | #ThreadPool\u5B9E\u73B0\u7684\u7C7B\u540D 6 | org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool 7 | #ThreadPool\u914D\u7F6E\u7EBF\u7A0B\u5B88\u62A4\u8FDB\u7A0B 8 | org.quartz.threadPool.makeThreadsDaemons=true 9 | #\u7EBF\u7A0B\u6570\u91CF 10 | org.quartz.threadPool.threadCount:20 11 | #\u7EBF\u7A0B\u4F18\u5148\u7EA7 12 | org.quartz.threadPool.threadPriority:5 13 | #\u6570\u636E\u4FDD\u5B58\u65B9\u5F0F\u4E3A\u6301\u4E45\u5316 14 | org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX 15 | #StdJDBCDelegate\u8BF4\u660E\u652F\u6301\u96C6\u7FA4 16 | org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate 17 | #quartz\u5185\u90E8\u8868\u7684\u524D\u7F00 18 | org.quartz.jobStore.tablePrefix=QRTZ_ 19 | #\u662F\u5426\u52A0\u5165\u96C6\u7FA4 20 | org.quartz.jobStore.isClustered=true 21 | #\u5BB9\u8BB8\u7684\u6700\u5927\u4F5C\u4E1A\u5EF6\u957F\u65F6\u95F4 22 | org.quartz.jobStore.misfireThreshold=25000 -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/java/com/springboot/springbootswagger/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootswagger.service.impl; 2 | 3 | import com.google.common.collect.Lists; 4 | import com.google.common.collect.Maps; 5 | import com.springboot.springbootswagger.model.User; 6 | import com.springboot.springbootswagger.service.UserService; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.Date; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * @Version: 1.0 15 | * @Desc: 16 | */ 17 | @Service 18 | public class UserServiceImpl implements UserService { 19 | 20 | private static Map USER_MAP = Maps.newHashMap(); 21 | 22 | static { 23 | USER_MAP.put(1L, new User(1L, "geekdigging", new Date(), 18)); 24 | USER_MAP.put(2L, new User(2L, "极客挖掘机", new Date(), 28)); 25 | } 26 | 27 | @Override 28 | public User getUserById(Long id) { 29 | return USER_MAP.get(id); 30 | } 31 | 32 | @Override 33 | public List getAllUsers() { 34 | return Lists.newArrayList(USER_MAP.values().iterator()); 35 | } 36 | 37 | @Override 38 | public User saveUser(User user) { 39 | USER_MAP.put(user.getId(), user); 40 | return user; 41 | } 42 | 43 | @Override 44 | public void deleteById(Long id) { 45 | USER_MAP.remove(id); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /spring-boot-mybatis/sql/user.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat Premium Data Transfer 3 | 4 | Source Server : localhost 5 | Source Server Type : MySQL 6 | Source Server Version : 50719 7 | Source Host : localhost:3306 8 | Source Schema : test 9 | 10 | Target Server Type : MySQL 11 | Target Server Version : 50719 12 | File Encoding : 65001 13 | 14 | Date: 28/09/2019 21:20:47 15 | */ 16 | 17 | SET NAMES utf8mb4; 18 | SET FOREIGN_KEY_CHECKS = 0; 19 | 20 | -- ---------------------------- 21 | -- Table structure for user 22 | -- ---------------------------- 23 | DROP TABLE IF EXISTS `user`; 24 | CREATE TABLE `user` ( 25 | `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, 26 | `age` int(11) NOT NULL, 27 | `create_date` datetime(0) NULL DEFAULT NULL, 28 | `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, 29 | PRIMARY KEY (`id`) USING BTREE 30 | ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; 31 | 32 | -- ---------------------------- 33 | -- Records of user 34 | -- ---------------------------- 35 | INSERT INTO `user` VALUES ('a0ac692d-e1f1-11e9-9a69-0242ac110002', 108, '2019-09-28 21:12:31', 'geekdigging.com'); 36 | INSERT INTO `user` VALUES ('b9168576-e1f1-11e9-9a69-0242ac110002', 18, '2019-09-28 21:13:12', 'www.geekdigging.com'); 37 | 38 | SET FOREIGN_KEY_CHECKS = 1; 39 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/config/TopicConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.config; 2 | 3 | import org.springframework.amqp.core.Binding; 4 | import org.springframework.amqp.core.BindingBuilder; 5 | import org.springframework.amqp.core.Queue; 6 | import org.springframework.amqp.core.TopicExchange; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | /** 11 | * TopicConfig 12 | */ 13 | @Configuration 14 | public class TopicConfig { 15 | 16 | private final String message = "topic.message"; 17 | private final String messages = "topic.messages"; 18 | 19 | @Bean 20 | public Queue queueMessage() { 21 | return new Queue(this.message); 22 | } 23 | 24 | @Bean 25 | public Queue queueMessages() { 26 | return new Queue(this.messages); 27 | } 28 | 29 | @Bean 30 | TopicExchange exchange() { 31 | return new TopicExchange("topicExchange"); 32 | } 33 | 34 | @Bean 35 | Binding bindingExchangeMessage(Queue queueMessage, TopicExchange exchange) { 36 | return BindingBuilder.bind(queueMessage).to(exchange).with("topic.message"); 37 | } 38 | 39 | @Bean 40 | Binding bindingExchangeMessages(Queue queueMessages, TopicExchange exchange) { 41 | return BindingBuilder.bind(queueMessages).to(exchange).with("topic.#"); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.service; 2 | 3 | import com.geekdigging.demo.model.User; 4 | import com.jfinal.plugin.activerecord.Page; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | /** 9 | * Created with IntelliJ IDEA. 10 | * 11 | * @User: weishiyao 12 | * @Date: 2020/6/21 13 | * @Time: 15:37 14 | * @email: inwsy@hotmail.com 15 | * Description: 16 | */ 17 | public class UserService { 18 | 19 | private static final User dao = new User().dao(); 20 | 21 | // 分页查询 22 | public Page userPage() { 23 | return dao.paginate(1, 10, "select *", "from user where age > ?", 18); 24 | } 25 | 26 | public User findById(String id) { 27 | System.out.println(">>>>>>>>>>>>>>>>UserService.findById()>>>>>>>>>>>>>>>>>>>>>>>>>"); 28 | return dao.findById(id); 29 | } 30 | 31 | public void save(User user) { 32 | System.out.println(">>>>>>>>>>>>>>>>UserService.save()>>>>>>>>>>>>>>>>>>>>>>>>>"); 33 | user.save(); 34 | } 35 | 36 | public void update(User user) { 37 | System.out.println(">>>>>>>>>>>>>>>>UserService.update()>>>>>>>>>>>>>>>>>>>>>>>>>"); 38 | user.update(); 39 | } 40 | 41 | public void deleteById(String id) { 42 | System.out.println(">>>>>>>>>>>>>>>>UserService.deleteById()>>>>>>>>>>>>>>>>>>>>>>>>>"); 43 | dao.deleteById(id); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-clienta/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.springboot 7 | spring-boot-admin 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-admin-clienta 12 | 0.0.1-SNAPSHOT 13 | spring-boot-admin-clienta 14 | spring-boot-admin-clienta 15 | 16 | 17 | 1.8 18 | 2.1.5 19 | 20 | 21 | 22 | 23 | de.codecentric 24 | spring-boot-admin-starter-client 25 | 26 | 27 | 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-maven-plugin 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/controller/JwtAuthController.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.controller; 2 | 3 | import com.geekdigging.springbootsecurityjwt.model.entity.User; 4 | import com.geekdigging.springbootsecurityjwt.service.AuthService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.security.core.AuthenticationException; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RequestMethod; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | /** 13 | * Created with IntelliJ IDEA. 14 | * 15 | * @Date: 2020/8/10 16 | * @Time: 21:36 17 | * @email: inwsy@hotmail.com 18 | * Description: 19 | */ 20 | @RestController 21 | public class JwtAuthController { 22 | @Autowired 23 | private AuthService authService; 24 | 25 | // 登录 26 | @RequestMapping(value = "/authentication/login", method = RequestMethod.POST) 27 | public String createToken(String username, String password) throws AuthenticationException { 28 | return authService.login(username, password); 29 | } 30 | 31 | // 注册 32 | @RequestMapping(value = "/authentication/register", method = RequestMethod.POST) 33 | public User register(@RequestBody User addedUser) throws AuthenticationException { 34 | return authService.register(addedUser); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/springboot/springbootmybatisxml/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisxml.controller; 2 | 3 | import com.springboot.springbootmybatisxml.mapper.UserMapper; 4 | import com.springboot.springbootmybatisxml.model.User; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import java.util.Date; 10 | import java.util.List; 11 | 12 | /** 13 | * @Version: 1.0 14 | * @Desc: 15 | */ 16 | @RestController 17 | @Slf4j 18 | public class UserController { 19 | 20 | @Autowired 21 | UserMapper userMapper; 22 | 23 | @GetMapping("/getUsers") 24 | public List getUsers() { 25 | return userMapper.getAll(); 26 | } 27 | 28 | @GetMapping("/getUser/{id}") 29 | public User getUser(@PathVariable("id") String id) { 30 | return userMapper.getUser(id); 31 | } 32 | 33 | @PostMapping("/add") 34 | public Long save(@RequestBody User user) { 35 | user.setCreateDate(new Date()); 36 | return userMapper.insertUser(user); 37 | } 38 | 39 | @PostMapping("/update") 40 | public Long update(@RequestBody User user) { 41 | return userMapper.updateUser(user); 42 | } 43 | 44 | @DeleteMapping("/delete/{id}") 45 | public Long delete(@PathVariable("id") String id) { 46 | return userMapper.deleteUser(id); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/springboot/springbootmybatisannotation/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisannotation.controller; 2 | 3 | import com.springboot.springbootmybatisannotation.mapper.UserMapper; 4 | import com.springboot.springbootmybatisannotation.model.User; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.*; 8 | 9 | import java.util.Date; 10 | import java.util.List; 11 | 12 | /** 13 | * @Version: 1.0 14 | * @Desc: 15 | */ 16 | @RestController 17 | @Slf4j 18 | public class UserController { 19 | 20 | @Autowired 21 | UserMapper userMapper; 22 | 23 | @GetMapping("/getUsers") 24 | public List getUsers() { 25 | return userMapper.getAll(); 26 | } 27 | 28 | @GetMapping("/getUser/{id}") 29 | public User getUser(@PathVariable("id") String id) { 30 | return userMapper.getUser(id); 31 | } 32 | 33 | @PostMapping("/add") 34 | public Long save(@RequestBody User user) { 35 | user.setCreateDate(new Date()); 36 | return userMapper.insertUser(user); 37 | } 38 | 39 | @PostMapping("/update") 40 | public Long update(@RequestBody User user) { 41 | return userMapper.updateUser(user); 42 | } 43 | 44 | @DeleteMapping("/delete/{id}") 45 | public Long delete(@PathVariable("id") String id) { 46 | return userMapper.deleteUser(id); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | spring-boot-mybatis 7 | com.springboot 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-mybatis-xml 12 | 0.0.1-SNAPSHOT 13 | spring-boot-mybatis-xml 14 | spring-boot-mybatis-xml 15 | jar 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 1.8 21 | 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter 27 | 28 | 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-maven-plugin 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/springboot/springbootmybatisannotation/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmybatisannotation.mapper; 2 | 3 | 4 | import com.springboot.springbootmybatisannotation.model.User; 5 | import org.apache.ibatis.annotations.*; 6 | import org.springframework.stereotype.Service; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * @Version: 1.0 12 | * @Desc: 13 | */ 14 | public interface UserMapper { 15 | 16 | @Select("select * from user") 17 | @Results({ 18 | @Result(property = "id", column = "id"), 19 | @Result(property = "nickName", column = "nick_name"), 20 | @Result(property = "age", column = "age"), 21 | @Result(property = "createDate", column = "create_date") 22 | }) 23 | List getAll(); 24 | 25 | @Select("SELECT * FROM user WHERE id = #{id}") 26 | @Results({ 27 | @Result(property = "nickName", column = "nick_name") 28 | }) 29 | User getUser(String id); 30 | 31 | @Insert("INSERT INTO user(id, nick_name, age, create_date) VALUES(#{id}, #{nickName}, #{age}, #{createDate})") 32 | @SelectKey(keyProperty = "id", resultType = String.class, before = true, statement = "select uuid() as id from dual") 33 | Long insertUser(User user); 34 | 35 | @Update("UPDATE user SET nick_name = #{nickName}, age = #{age} WHERE create_date = #{createDate}") 36 | Long updateUser(User user); 37 | 38 | @Delete("DELETE FROM user WHERE id = #{id}") 39 | Long deleteUser(String id); 40 | } 41 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/main/java/com/springboot/springbootrabbitmq/config/FanoutConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq.config; 2 | 3 | import org.springframework.amqp.core.Binding; 4 | import org.springframework.amqp.core.BindingBuilder; 5 | import org.springframework.amqp.core.FanoutExchange; 6 | import org.springframework.amqp.core.Queue; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.context.annotation.Configuration; 9 | 10 | /** 11 | * FanoutConfig 12 | */ 13 | @Configuration 14 | public class FanoutConfig { 15 | @Bean 16 | public Queue MessageA() { 17 | return new Queue("fanout.A"); 18 | } 19 | 20 | @Bean 21 | public Queue MessageB() { 22 | return new Queue("fanout.B"); 23 | } 24 | 25 | @Bean 26 | public Queue MessageC() { 27 | return new Queue("fanout.C"); 28 | } 29 | 30 | @Bean 31 | FanoutExchange fanoutExchange() { 32 | return new FanoutExchange("fanoutExchange"); 33 | } 34 | 35 | @Bean 36 | Binding bindingExchangeA(Queue MessageA, FanoutExchange fanoutExchange) { 37 | return BindingBuilder.bind(MessageA).to(fanoutExchange); 38 | } 39 | 40 | @Bean 41 | Binding bindingExchangeB(Queue MessageB, FanoutExchange fanoutExchange) { 42 | return BindingBuilder.bind(MessageB).to(fanoutExchange); 43 | } 44 | 45 | @Bean 46 | Binding bindingExchangeC(Queue MessageC, FanoutExchange fanoutExchange) { 47 | return BindingBuilder.bind(MessageC).to(fanoutExchange); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo.controller; 2 | 3 | import com.geekdigging.demo.interceptor.AuthInterceptor; 4 | import com.geekdigging.demo.model.User; 5 | import com.geekdigging.demo.service.UserService; 6 | import com.jfinal.aop.Before; 7 | import com.jfinal.aop.Inject; 8 | import com.jfinal.core.ActionKey; 9 | import com.jfinal.core.Controller; 10 | 11 | import java.util.Date; 12 | 13 | /** 14 | * Created with IntelliJ IDEA. 15 | * 16 | * @User: weishiyao 17 | * @Date: 2020/6/21 18 | * @Time: 0:59 19 | * @email: inwsy@hotmail.com 20 | * Description: 21 | */ 22 | public class UserController extends Controller { 23 | 24 | @Inject 25 | UserService service; 26 | 27 | public void findById() { 28 | renderJson(service.findById("1")); 29 | } 30 | 31 | public void save() { 32 | User user = new User(); 33 | user.set("id", "2"); 34 | user.set("create_date", new Date()); 35 | user.set("name", "小红"); 36 | user.set("age", 24); 37 | service.save(user); 38 | renderNull(); 39 | } 40 | 41 | public void update() { 42 | User user = new User(); 43 | user.set("id", "2"); 44 | user.set("create_date", new Date()); 45 | user.set("name", "小红"); 46 | user.set("age", 19); 47 | service.update(user); 48 | renderNull(); 49 | } 50 | 51 | public void deleteById() { 52 | service.deleteById(getPara("id")); 53 | renderNull(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /spring-boot-mail/src/test/java/com/springboot/springbootmail/SpringBootMailApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootmail; 2 | 3 | import com.springboot.springbootmail.service.MailService; 4 | 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.boot.test.context.SpringBootTest; 9 | import org.springframework.test.context.junit4.SpringRunner; 10 | import org.thymeleaf.TemplateEngine; 11 | import org.thymeleaf.context.Context; 12 | 13 | @RunWith(SpringRunner.class) 14 | @SpringBootTest 15 | public class SpringBootMailApplicationTests { 16 | 17 | @Autowired 18 | MailService mailService; 19 | 20 | @Autowired 21 | TemplateEngine templateEngine; 22 | 23 | @Test 24 | public void sendSimpleEmail() { 25 | mailService.sendSimpleEmail("inwsy@hotmail.com", "测试邮件题目", "测试邮件内容"); 26 | } 27 | 28 | @Test 29 | public void sendHTMLTemplateMail() { 30 | Context context = new Context(); 31 | context.setVariable("code", "123456"); 32 | String emailHTMLContent = templateEngine.process("email", context); 33 | 34 | mailService.sendHTMLEmail("inwsy@hotmail.com", "测试 HTML 模版邮件", emailHTMLContent); 35 | } 36 | 37 | @Test 38 | public void sendAttachmentsMail() { 39 | 40 | String fileName = "图片.jpg"; 41 | String filePath = "C:\\Users\\inwsy\\Downloads\\0370279582fe3e2a8012060c896a5dd.jpg"; 42 | 43 | mailService.sendAttachmentsMail("inwsy@hotmail.com", "测试带附件的邮件", "详细请查阅附件", fileName, filePath); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-annotation/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | spring-boot-mybatis 7 | com.springboot 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-mybatis-annotation 12 | 0.0.1-SNAPSHOT 13 | spring-boot-mybatis-annotation 14 | spring-boot-mybatis-annotation 15 | jar 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 1.8 21 | 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter 27 | 28 | 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-maven-plugin 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.9.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-rabbitmq 13 | 0.0.1-SNAPSHOT 14 | demo 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-amqp 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-test 30 | test 31 | 32 | 33 | org.springframework.amqp 34 | spring-rabbit-test 35 | test 36 | 37 | 38 | 39 | 40 | 41 | 42 | org.springframework.boot 43 | spring-boot-maven-plugin 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-mvc-latency/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.springboot 7 | spring-boot-analysis 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-mvc-latency 12 | 0.0.1-SNAPSHOT 13 | spring-boot-mvc-latency 14 | spring-boot-mvc-latency 15 | jar 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 1.8 21 | 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-maven-plugin 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/java/com/springboot/springbootswagger/config/SwaggerConfig.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootswagger.config; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import springfox.documentation.builders.ApiInfoBuilder; 7 | import springfox.documentation.builders.PathSelectors; 8 | import springfox.documentation.builders.RequestHandlerSelectors; 9 | import springfox.documentation.service.ApiInfo; 10 | import springfox.documentation.spi.DocumentationType; 11 | import springfox.documentation.spring.web.plugins.Docket; 12 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 13 | 14 | /** 15 | * @Version: 1.0 16 | * @Desc: 17 | */ 18 | @Configuration 19 | @EnableSwagger2 20 | public class SwaggerConfig { 21 | @Value("${swagger.show}") 22 | private boolean swaggerShow; 23 | 24 | @Bean 25 | public Docket swaggerSpringMvcPlugin() { 26 | return new Docket(DocumentationType.SWAGGER_2) 27 | .enable(swaggerShow) 28 | .apiInfo(apiInfo()) 29 | .select() 30 | .apis(RequestHandlerSelectors.basePackage("com.springboot.springbootswagger")) 31 | .paths(PathSelectors.any()) 32 | .build(); 33 | } 34 | 35 | private ApiInfo apiInfo() { 36 | return new ApiInfoBuilder() 37 | .title("Swagger2 演示接口RESTful APIs") 38 | .version("1.0") 39 | .build(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /spring-boot-scheduler/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.9.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-scheduler 13 | 0.0.1-SNAPSHOT 14 | spring-boot-scheduler 15 | spring-boot-scheduler 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-test 30 | test 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.springframework.boot 38 | spring-boot-maven-plugin 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /spring-boot-quick-start/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.8.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-quick-start 13 | 0.0.1-SNAPSHOT 14 | spring-boot-quick-start 15 | spring-boot-quick-start 16 | 17 | 18 | 11 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-web 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-test 30 | test 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.springframework.boot 38 | spring-boot-maven-plugin 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /springboot-security-jwt/src/main/java/com/geekdigging/springbootsecurityjwt/model/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.springbootsecurityjwt.model.entity; 2 | 3 | import lombok.Data; 4 | import org.springframework.security.core.GrantedAuthority; 5 | import org.springframework.security.core.userdetails.UserDetails; 6 | 7 | import javax.persistence.*; 8 | import java.util.Collection; 9 | import java.util.List; 10 | 11 | /** 12 | * Created with IntelliJ IDEA. 13 | * 14 | * @Date: 2020/8/10 15 | * @Time: 15:08 16 | * @email: inwsy@hotmail.com 17 | * Description: 18 | */ 19 | @Entity 20 | @Data 21 | public class User implements UserDetails { 22 | 23 | @Id 24 | @GeneratedValue 25 | private Long id; 26 | 27 | private String username; 28 | 29 | private String password; 30 | 31 | @ManyToMany(cascade = {CascadeType.REFRESH},fetch = FetchType.EAGER) 32 | private List roles; 33 | 34 | 35 | @Override 36 | public Collection getAuthorities() { 37 | return null; 38 | } 39 | 40 | @Override 41 | public String getPassword() { 42 | return password; 43 | } 44 | 45 | @Override 46 | public String getUsername() { 47 | return username; 48 | } 49 | 50 | @Override 51 | public boolean isAccountNonExpired() { 52 | return true; 53 | } 54 | 55 | @Override 56 | public boolean isAccountNonLocked() { 57 | return true; 58 | } 59 | 60 | @Override 61 | public boolean isCredentialsNonExpired() { 62 | return true; 63 | } 64 | 65 | @Override 66 | public boolean isEnabled() { 67 | return true; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/java/com/springboot/springbootthymeleaf/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootthymeleaf.controller; 2 | 3 | import com.springboot.springbootthymeleaf.model.CourseModel; 4 | import com.springboot.springbootthymeleaf.model.UserModel; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | import java.util.ArrayList; 10 | import java.util.HashMap; 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | /** 15 | * @Date: 2019/9/16 15:22 16 | * @Version: 1.0 17 | * @Desc: 18 | */ 19 | @Controller 20 | public class HelloController { 21 | 22 | @GetMapping("/hello") 23 | public String hello(HttpServletRequest request) { 24 | // 构建测试数据 25 | Map map = new HashMap<>(); 26 | 27 | UserModel userModel = new UserModel(); 28 | userModel.setId(1L); 29 | userModel.setName("Spring Boot"); 30 | userModel.setAge(18); 31 | 32 | map.put("user", userModel); 33 | 34 | List list = new ArrayList<>(); 35 | 36 | for (int i = 0; i < 2; i++) { 37 | CourseModel courseMode = new CourseModel(); 38 | courseMode.setId((long) i); 39 | courseMode.setName("Spring Boot:" + i); 40 | courseMode.setAddress("课程地点:" + i); 41 | list.add(courseMode); 42 | } 43 | 44 | map.put("list", list); 45 | 46 | map.put("flag", true); 47 | 48 | request.setAttribute("data", map); 49 | return "hello"; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /spring-boot-scheduler/src/main/java/com/springboot/springbootscheduler/task/Task.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootscheduler.task; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.scheduling.annotation.Scheduled; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.text.SimpleDateFormat; 9 | import java.util.Date; 10 | 11 | /** 12 | * Created with IntelliJ IDEA. 13 | * 14 | * @Date: 2019/10/5 15 | * @Time: 23:32 16 | * @email: inwsy@hotmail.com 17 | * Description: 18 | */ 19 | @Component 20 | public class Task { 21 | 22 | private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); 23 | 24 | private final Logger logger = LoggerFactory.getLogger(Task.class); 25 | 26 | /** 27 | * cron表达式 28 | */ 29 | @Scheduled(cron = "*/5 * * * * ?") 30 | private void task1() { 31 | logger.info("task1 正在执行,现在时间:{}", dateFormat.format(new Date())); 32 | } 33 | 34 | /** 35 | * 上一次开始执行时间点之后5秒再执行 36 | */ 37 | @Scheduled(fixedRate = 5000) 38 | public void task2() { 39 | logger.info("task2 正在执行,现在时间:{}", dateFormat.format(new Date())); 40 | } 41 | 42 | /** 43 | * 上一次执行完毕时间点之后5秒再执行 44 | */ 45 | @Scheduled(fixedDelay = 5000) 46 | public void task3() { 47 | logger.info("task3 正在执行,现在时间:{}", dateFormat.format(new Date())); 48 | } 49 | 50 | /** 51 | * 第一次延迟1秒后执行,之后按fixedRate的规则每5秒执行一次 52 | */ 53 | @Scheduled(initialDelay = 1000, fixedRate = 5000) 54 | public void task4() { 55 | logger.info("task4 正在执行,现在时间:{}", dateFormat.format(new Date())); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/src/main/resources/templates/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | Hello Spring Boot 8 | 9 | 10 | 11 |
12 |
用户信息:
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
#姓名年龄
29 |
课程信息:
30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 |
#课程名称课程地点
46 | 47 |
如果 flag 为 true 你将可以看到这行字:)
48 | 49 |
50 | 51 | 52 | -------------------------------------------------------------------------------- /spring-boot-redis/src/main/java/com/springboot/springbootredis/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootredis.service.impl; 2 | 3 | import com.springboot.springbootredis.model.User; 4 | import com.springboot.springbootredis.service.UserService; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.cache.annotation.CacheEvict; 7 | import org.springframework.cache.annotation.CachePut; 8 | import org.springframework.cache.annotation.Cacheable; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | 14 | /** 15 | * @Version: 1.0 16 | * @Desc: 17 | */ 18 | @Service 19 | @Slf4j 20 | public class UserServiceImpl implements UserService { 21 | 22 | private static final Map USER_MAP = new HashMap<>(); 23 | 24 | static { 25 | USER_MAP.put(1L, new User(1L, "geekdigging.com", 18)); 26 | USER_MAP.put(2L, new User(2L, "geekdigging.com", 19)); 27 | USER_MAP.put(3L, new User(3L, "geekdigging.com", 20)); 28 | } 29 | 30 | @CachePut(value = "user", key = "#user.id") 31 | @Override 32 | public User save(User user) { 33 | USER_MAP.put(user.getId(), user); 34 | log.info("进入 save 方法,当前存储对象:{}", user); 35 | return user; 36 | } 37 | 38 | @Cacheable(value = "user", key = "#id") 39 | @Override 40 | public User get(Long id) { 41 | log.info("进入 get 方法,当前获取对象:{}", USER_MAP.get(id)); 42 | return USER_MAP.get(id); 43 | } 44 | 45 | @CacheEvict(value = "user", key = "#id") 46 | @Override 47 | public void delete(Long id) { 48 | USER_MAP.remove(id); 49 | log.info("进入 delete 方法,删除成功"); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /spring-boot-swagger/src/main/java/com/springboot/springbootswagger/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootswagger.controller; 2 | 3 | import com.springboot.springbootswagger.model.User; 4 | import com.springboot.springbootswagger.service.UserService; 5 | import io.swagger.annotations.Api; 6 | import io.swagger.annotations.ApiImplicitParam; 7 | import io.swagger.annotations.ApiImplicitParams; 8 | import io.swagger.annotations.ApiOperation; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.*; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * @Version: 1.0 16 | * @Desc: 17 | */ 18 | @Api(value = "用户管理演示") 19 | @RestController 20 | public class UserController { 21 | 22 | @Autowired 23 | UserService userService; 24 | 25 | @GetMapping("/getUserById/{id}") 26 | @ApiOperation(value = "获取用户信息", notes = "根据用户 id 获取用户信息", tags = "查询用户信息类") 27 | public User getUserById(@PathVariable Long id) { 28 | return userService.getUserById(id); 29 | } 30 | 31 | @GetMapping("/getAllUsers") 32 | @ApiOperation(value = "获取全部用户信息", notes = "获取全部用户信息", tags = "查询用户信息类") 33 | public List getAllUsers() { 34 | return userService.getAllUsers(); 35 | } 36 | 37 | @PostMapping("/saveUser") 38 | @ApiOperation(value = "新增/修改用户信息") 39 | public User saveUser(@RequestBody User user) { 40 | return userService.saveUser(user); 41 | } 42 | 43 | @DeleteMapping("/deleteById") 44 | @ApiOperation(value = "删除用户信息", notes = "根据用户 id 删除用户信息") 45 | public String deleteById(@PathVariable Long id) { 46 | userService.deleteById(id); 47 | return "success"; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-eureka-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.springboot 7 | spring-boot-admin 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-eureka-server 12 | 0.0.1-SNAPSHOT 13 | spring-boot-eureka-server 14 | spring-boot-eureka-server 15 | 16 | 17 | UTF-8 18 | UTF-8 19 | 1.8 20 | 21 | 22 | 23 | 24 | de.codecentric 25 | spring-boot-admin-starter-client 26 | 27 | 28 | org.springframework.cloud 29 | spring-cloud-starter-netflix-eureka-server 30 | 31 | 32 | 33 | 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-maven-plugin 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /spring-boot-mail/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.9.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-mail 13 | 0.0.1-SNAPSHOT 14 | spring-boot-mail 15 | spring-boot-mail 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-mail 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-thymeleaf 29 | 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-starter-test 34 | test 35 | 36 | 37 | 38 | 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-maven-plugin 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.springboot 7 | spring-boot-admin 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-admin-client 12 | 0.0.1-SNAPSHOT 13 | spring-boot-admin-client 14 | spring-boot-admin-client 15 | jar 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 1.8 21 | 22 | 23 | 24 | 25 | de.codecentric 26 | spring-boot-admin-starter-client 27 | 28 | 29 | org.springframework.cloud 30 | spring-cloud-starter-netflix-eureka-client 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.springframework.boot 38 | spring-boot-maven-plugin 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /spring-boot-admin/spring-boot-admin-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.springboot 7 | spring-boot-admin 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-admin-server 12 | 0.0.1-SNAPSHOT 13 | spring-boot-admin-server 14 | spring-boot-admin-server 15 | jar 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 1.8 21 | 22 | 23 | 24 | 25 | de.codecentric 26 | spring-boot-admin-starter-server 27 | 28 | 29 | org.springframework.cloud 30 | spring-cloud-starter-netflix-eureka-client 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.springframework.boot 38 | spring-boot-maven-plugin 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /spring-boot-analysis/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.9.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-analysis 13 | 0.0.1-SNAPSHOT 14 | spring-boot-analysis 15 | spring-boot-analysis 16 | pom 17 | 18 | 19 | spring-boot-mvc-latency 20 | spring-boot-webflux-latency 21 | 22 | 23 | 24 | UTF-8 25 | UTF-8 26 | 1.8 27 | 28 | 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-test 35 | test 36 | 37 | 38 | 39 | 40 | 41 | 42 | org.springframework.boot 43 | spring-boot-maven-plugin 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /spring-boot-thymeleaf/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.8.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-thymeleaf 13 | 0.0.1-SNAPSHOT 14 | spring-boot-thymeleaf 15 | spring-boot-thymeleaf 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-thymeleaf 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-web 29 | 30 | 31 | 32 | org.springframework.boot 33 | spring-boot-starter-test 34 | test 35 | 36 | 37 | 38 | 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-maven-plugin 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /spring-boot-analysis/spring-boot-webflux-latency/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.springboot 7 | spring-boot-analysis 8 | 0.0.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | spring-boot-webflux-latency 12 | 0.0.1-SNAPSHOT 13 | spring-boot-webflux-latency 14 | spring-boot-webflux-latency 15 | jar 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 1.8 21 | 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-webflux 27 | 28 | 29 | io.projectreactor 30 | reactor-test 31 | test 32 | 33 | 34 | 35 | 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-maven-plugin 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /spring-boot-rabbitmq/src/test/java/com/springboot/springbootrabbitmq/DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootrabbitmq; 2 | 3 | import com.springboot.springbootrabbitmq.fanout.FanoutSend; 4 | import com.springboot.springbootrabbitmq.many.SimpleManySend; 5 | import com.springboot.springbootrabbitmq.many.SimpleManySend1; 6 | import com.springboot.springbootrabbitmq.simple.SimpleSend; 7 | 8 | import com.springboot.springbootrabbitmq.topic.TopicSend; 9 | import org.junit.Test; 10 | import org.junit.runner.RunWith; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.boot.test.context.SpringBootTest; 13 | import org.springframework.test.context.junit4.SpringRunner; 14 | 15 | @RunWith(SpringRunner.class) 16 | @SpringBootTest 17 | public class DemoApplicationTests { 18 | 19 | @Autowired 20 | SimpleSend simpleSend; 21 | 22 | @Autowired 23 | SimpleManySend simpleManySend; 24 | 25 | @Autowired 26 | SimpleManySend1 simpleManySend1; 27 | 28 | @Autowired 29 | TopicSend topicSend; 30 | 31 | @Autowired 32 | FanoutSend fanoutSend; 33 | 34 | @Test 35 | public void simpleSend() { 36 | simpleSend.send(); 37 | } 38 | 39 | @Test 40 | public void simpleOneSend() { 41 | for (int i = 0; i < 100; i ++) { 42 | simpleManySend.send(i); 43 | } 44 | } 45 | 46 | @Test 47 | public void simpleManySend() { 48 | for (int i = 0; i < 100; i ++) { 49 | simpleManySend.send(i); 50 | simpleManySend1.send(i); 51 | } 52 | } 53 | 54 | @Test 55 | public void topicSend1() { 56 | topicSend.send1(); 57 | } 58 | 59 | @Test 60 | public void topicSend2() { 61 | topicSend.send2(); 62 | } 63 | 64 | @Test 65 | public void fanoutSend() { 66 | fanoutSend.send(); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/resources/logging.properties: -------------------------------------------------------------------------------- 1 | 2 | # 下载地址: 3 | # https://github.com/undertow-io/undertow/blob/master/examples/src/main/resources/logging.properties 4 | 5 | # 6 | # JBoss, Home of Professional Open Source. 7 | # Copyright 2012 Red Hat, Inc., and individual contributors 8 | # as indicated by the @author tags. 9 | # 10 | # Licensed under the Apache License, Version 2.0 (the "License"); 11 | # you may not use this file except in compliance with the License. 12 | # You may obtain a copy of the License at 13 | # 14 | # http://www.apache.org/licenses/LICENSE-2.0 15 | # 16 | # Unless required by applicable law or agreed to in writing, software 17 | # distributed under the License is distributed on an "AS IS" BASIS, 18 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | # See the License for the specific language governing permissions and 20 | # limitations under the License. 21 | # 22 | 23 | # Additional logger names to configure (root logger is always configured) 24 | loggers=org.xnio.listener,org.xnio.ssl,org.apache,io.undertow.util.TestHttpClient 25 | 26 | # Root logger configuration 27 | logger.level=DEBUG 28 | logger.handlers=CONSOLE 29 | 30 | # Console handler configuration 31 | handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler 32 | handler.CONSOLE.properties=autoFlush,target 33 | handler.CONSOLE.target=SYSTEM_ERR 34 | handler.CONSOLE.level=ALL 35 | handler.CONSOLE.autoFlush=true 36 | handler.CONSOLE.formatter=PATTERN 37 | 38 | # The log format pattern 39 | formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter 40 | formatter.PATTERN.properties=pattern 41 | formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p (%t) [%c] <%F:%L> %m%n 42 | 43 | logger.org.xnio.listener.level=DEBUG 44 | 45 | logger.org.xnio.ssl.level=DEBUG 46 | 47 | logger.org.apache.level=DEBUG 48 | logger.org.apache.useParentHandlers=false 49 | logger.io.undertow.util.TestHttpClient.level=DEBUG -------------------------------------------------------------------------------- /spring-boot-actuator/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.8.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-actuator 13 | 0.0.1-SNAPSHOT 14 | spring-boot-actuator 15 | spring-boot-actuator 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-actuator 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-security 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-starter-web 33 | 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-starter-test 38 | test 39 | 40 | 41 | 42 | 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-maven-plugin 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /spring-boot-webflux/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.9.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-webflux 13 | 0.0.1-SNAPSHOT 14 | spring-boot-webflux 15 | spring-boot-webflux 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-webflux 25 | 26 | 27 | 28 | org.projectlombok 29 | lombok 30 | true 31 | 32 | 33 | 34 | org.springframework.boot 35 | spring-boot-starter-test 36 | test 37 | 38 | 39 | io.projectreactor 40 | reactor-test 41 | test 42 | 43 | 44 | 45 | 46 | 47 | 48 | org.springframework.boot 49 | spring-boot-maven-plugin 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /spring-boot-jpa-hikari/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.8.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-jpa-hikari 13 | 0.0.1-SNAPSHOT 14 | spring-boot-jpa-hikari 15 | spring-boot-jpa-hikari 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-data-jpa 25 | 26 | 27 | org.springframework.boot 28 | spring-boot-starter-web 29 | 30 | 31 | 32 | mysql 33 | mysql-connector-java 34 | runtime 35 | 36 | 37 | org.projectlombok 38 | lombok 39 | true 40 | 41 | 42 | org.springframework.boot 43 | spring-boot-starter-test 44 | test 45 | 46 | 47 | 48 | 49 | 50 | 51 | org.springframework.boot 52 | spring-boot-maven-plugin 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /spring-boot-quick-start/src/main/java/com/springboot/springbootquickstart/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.springboot.springbootquickstart.controller; 2 | 3 | import com.springboot.springbootquickstart.model.UserModel; 4 | import org.springframework.web.bind.annotation.*; 5 | 6 | import java.util.*; 7 | import java.util.concurrent.ConcurrentHashMap; 8 | 9 | /** 10 | * Created with IntelliJ IDEA. 11 | * 12 | * @Date: 2019/9/11 13 | * @Time: 22:15 14 | * @email: inwsy@hotmail.com 15 | * Description: 16 | */ 17 | @RestController 18 | public class UserController { 19 | 20 | // 创建线程安全的Map,用作数据存储 21 | static Map users = new ConcurrentHashMap(); 22 | 23 | /** 24 | * 查询用户列表 25 | * @return 26 | */ 27 | @GetMapping("/") 28 | public List getUserList() { 29 | List list = new ArrayList(users.values()); 30 | return list; 31 | } 32 | 33 | /** 34 | * 创建User 35 | * @param userModel 36 | * @return 37 | */ 38 | @PostMapping("/") 39 | public UserModel postUser(@ModelAttribute UserModel userModel) { 40 | users.put(userModel.getId(), userModel); 41 | return users.get(userModel.getId()); 42 | } 43 | 44 | /** 45 | * {id} 根据 url 中的 id 获取 user 信息 46 | * url中的id可通过@PathVariable绑定到函数的参数中 47 | * @param id 48 | * @return 49 | */ 50 | @GetMapping("/{id}") 51 | public UserModel getUser(@PathVariable Long id) { 52 | return users.get(id); 53 | } 54 | 55 | /** 56 | * 根据 id 更新用户信息 57 | * @param id 58 | * @param userModel 59 | * @return 60 | */ 61 | @PutMapping("/{id}") 62 | public UserModel putUser(@PathVariable Long id, @ModelAttribute UserModel userModel) { 63 | UserModel u = users.get(id); 64 | u.setName(userModel.getName()); 65 | u.setAge(userModel.getAge()); 66 | users.put(id, u); 67 | return users.get(userModel.getId()); 68 | } 69 | 70 | /** 71 | * 根据 id 删除用户信息 72 | * @param id 73 | * @return 74 | */ 75 | @DeleteMapping("/{id}") 76 | public String deleteUser(@PathVariable Long id) { 77 | users.remove(id); 78 | return "success"; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /spring-boot-mybatis/spring-boot-mybatis-xml/src/main/resources/mybatis/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | id, nick_name, age, create_date 14 | 15 | 16 | 21 | 22 | 29 | 30 | 31 | 32 | select uuid() as id from dual 33 | 34 | INSERT INTO 35 | user 36 | (id, nick_name, age, create_date) 37 | VALUES 38 | (#{id}, #{nickName}, #{age}, #{createDate}) 39 | 40 | 41 | 42 | UPDATE 43 | user 44 | SET 45 | nick_name = #{nickName}, 46 | age = #{age}, 47 | create_date = #{createDate} 48 | WHERE 49 | id = #{id} 50 | 51 | 52 | 53 | DELETE FROM 54 | user 55 | WHERE 56 | id = #{id} 57 | 58 | 59 | -------------------------------------------------------------------------------- /jfinal-demo/src/main/java/com/geekdigging/demo/_JFinalDemoGenerator.java: -------------------------------------------------------------------------------- 1 | package com.geekdigging.demo; 2 | 3 | import com.geekdigging.demo.config.DemoConfig; 4 | import com.jfinal.kit.PathKit; 5 | import com.jfinal.plugin.activerecord.dialect.MysqlDialect; 6 | import com.jfinal.plugin.activerecord.generator.Generator; 7 | import com.jfinal.plugin.druid.DruidPlugin; 8 | 9 | import javax.sql.DataSource; 10 | 11 | 12 | /** 13 | * Created with IntelliJ IDEA. 14 | * 15 | * @User: weishiyao 16 | * @Date: 2020/6/21 17 | * @Time: 15:45 18 | * @email: inwsy@hotmail.com 19 | * Description: 20 | */ 21 | public class _JFinalDemoGenerator { 22 | 23 | public static DataSource getDataSource() { 24 | DruidPlugin druidPlugin = DemoConfig.createDruidPlugin(); 25 | druidPlugin.start(); 26 | return druidPlugin.getDataSource(); 27 | } 28 | 29 | public static void main(String[] args) { 30 | // base model 所使用的包名 31 | String baseModelPackageName = "com.geekdigging.demo.model.base"; 32 | // base model 文件保存路径 33 | String baseModelOutputDir = PathKit.getWebRootPath() + "/src/main/java/com/geekdigging/demo/model/base"; 34 | 35 | // model 所使用的包名 (MappingKit 默认使用的包名) 36 | String modelPackageName = "com.geekdigging.demo.model"; 37 | // model 文件保存路径 (MappingKit 与 DataDictionary 文件默认保存路径) 38 | String modelOutputDir = baseModelOutputDir + "/.."; 39 | 40 | // 创建生成器 41 | Generator generator = new Generator(getDataSource(), baseModelPackageName, baseModelOutputDir, modelPackageName, modelOutputDir); 42 | 43 | // 配置是否生成备注 44 | generator.setGenerateRemarks(true); 45 | 46 | // 设置数据库方言 47 | generator.setDialect(new MysqlDialect()); 48 | 49 | // 设置是否生成链式 setter 方法 50 | generator.setGenerateChainSetter(false); 51 | 52 | // 添加不需要生成的表名 53 | generator.addExcludedTable("adv", "data", "rate", "douban2019"); 54 | 55 | // 设置是否在 Model 中生成 dao 对象 56 | generator.setGenerateDaoInModel(false); 57 | 58 | // 设置是否生成字典文件 59 | generator.setGenerateDataDictionary(false); 60 | 61 | // 设置需要被移除的表名前缀用于生成modelName。例如表名 "osc_user",移除前缀 "osc_"后生成的model名为 "User"而非 OscUser 62 | generator.setRemovedTableNamePrefixes("t_"); 63 | 64 | // 生成 65 | generator.generate(); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /spring-boot-swagger/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.9.RELEASE 9 | 10 | 11 | com.springboot 12 | spring-boot-swagger 13 | 0.0.1-SNAPSHOT 14 | spring-boot-swagger 15 | spring-boot-swagger 16 | 17 | 18 | 1.8 19 | 2.9.2 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-web 26 | 27 | 28 | 29 | 30 | io.springfox 31 | springfox-swagger2 32 | ${swagger.version} 33 | 34 | 35 | 36 | io.springfox 37 | springfox-swagger-ui 38 | ${swagger.version} 39 | 40 | 41 | 42 | org.projectlombok 43 | lombok 44 | true 45 | 46 | 47 | org.springframework.boot 48 | spring-boot-starter-test 49 | test 50 | 51 | 52 | 53 | 54 | 55 | 56 | org.springframework.boot 57 | spring-boot-maven-plugin 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /spring-boot-jpa-druid/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.1.8.RELEASE 9 | 10 | 11 | com.springcloud 12 | spring-boot-jpa-druid 13 | 0.0.1-SNAPSHOT 14 | spring-boot-jpa-druid 15 | spring-boot-jpa-druid 16 | 17 | 18 | 1.1.20 19 | 1.8 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-data-jpa 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-web 30 | 31 | 32 | 33 | mysql 34 | mysql-connector-java 35 | runtime 36 | 37 | 38 | 39 | com.alibaba 40 | druid-spring-boot-starter 41 | ${druid.version} 42 | 43 | 44 | org.projectlombok 45 | lombok 46 | true 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-starter-test 51 | test 52 | 53 | 54 | 55 | 56 | 57 | 58 | org.springframework.boot 59 | spring-boot-maven-plugin 60 | 61 | 62 | 63 | 64 | 65 | --------------------------------------------------------------------------------