├── .gitignore
├── 2.x
├── spring-boot-hello
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── HelloApplication.java
│ │ │ └── controller
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── HelloApplicationTests.java
├── spring-boot-banner
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── application.properties
│ │ ├── banner.gif
│ │ └── banner.txt
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── banner
│ │ └── BannerApplication.java
├── spring-boot-docker
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ ├── docker
│ │ │ └── Dockerfile
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── DockerApplication.java
│ │ │ └── controller
│ │ │ └── DockerController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── DockerApplicationTests.java
├── spring-boot-helloWorld
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ └── controller
│ │ │ └── HelloWorldController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-webflux
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── WebFluxApplication.java
│ │ │ └── web
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── WebFluxApplicationTests.java
├── spring-boot-package-war
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ ├── controller
│ │ │ └── HelloWorldController.java
│ │ │ └── ServletInitializer.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── dockercompose-springboot-mysql-nginx
│ ├── app
│ │ ├── Dockerfile
│ │ └── src
│ │ │ └── main
│ │ │ ├── resources
│ │ │ ├── application-dev.properties
│ │ │ ├── application-docker.properties
│ │ │ └── application.properties
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── repository
│ │ │ └── VisitorRepository.java
│ │ │ └── ComposeApplication.java
│ └── nginx
│ │ └── conf.d
│ │ └── app.conf
├── spring-boot-commandLineRunner
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── application.properties
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ ├── runner
│ │ ├── Runner.java
│ │ ├── OrderRunner1.java
│ │ └── OrderRunner2.java
│ │ └── CommandLineRunnerApplication.java
├── spring-boot-thymeleaf
│ ├── spring-boot-thymeleaf
│ │ └── src
│ │ │ ├── main
│ │ │ ├── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── templates
│ │ │ │ │ ├── hello.html
│ │ │ │ │ ├── if.html
│ │ │ │ │ ├── switch.html
│ │ │ │ │ ├── eq.html
│ │ │ │ │ └── string.html
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── ThymeleafApplication.java
│ │ │ │ └── web
│ │ │ │ └── HelloController.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── ThymeleafApplicationTests.java
│ └── spring-boot-thymeleaf-layout
│ │ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ ├── layout
│ │ │ │ ├── left.html
│ │ │ │ ├── footer.html
│ │ │ │ ├── header.html
│ │ │ │ └── copyright.html
│ │ │ │ ├── index.html
│ │ │ │ ├── home.html
│ │ │ │ ├── fragment.html
│ │ │ │ ├── layout.html
│ │ │ │ └── base.html
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── TLayoutApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── TLayoutApplicationTests.java
├── spring-boot-admin-simple
│ ├── spring-boot-admin-server
│ │ └── src
│ │ │ ├── main
│ │ │ └── resources
│ │ │ │ └── application.properties
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── AdminServerApplicationTests.java
│ └── spring-boot-admin-client
│ │ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── AdminClientApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── AdminClientApplicationTests.java
├── spring-boot-scheduler
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── SchedulerApplication.java
│ │ │ └── task
│ │ │ └── SchedulerTask.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── SchedulerApplicationTests.java
├── spring-boot-memcache-spymemcached
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── MemcacheApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MemcacheApplicationTests.java
├── spring-boot-package
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application-dev.properties
│ │ │ ├── application-pro.properties
│ │ │ └── application-test.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── controller
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── PackageApplicationTests.java
├── spring-boot-swagger
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── logback.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── SwaggerApplication.java
│ │ │ └── repository
│ │ │ └── MessageRepository.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── SwaggerApplicationTests.java
├── spring-boot-mybatis
│ ├── spring-boot-mybatis-xml
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── neo
│ │ │ │ │ ├── enums
│ │ │ │ │ └── UserSexEnum.java
│ │ │ │ │ ├── mapper
│ │ │ │ │ └── UserMapper.java
│ │ │ │ │ └── MybatisXmlApplication.java
│ │ │ └── resources
│ │ │ │ └── application.properties
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── MybatisXmlApplicationTests.java
│ ├── spring-boot-mybatis-annotation
│ │ └── src
│ │ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── neo
│ │ │ │ │ ├── enums
│ │ │ │ │ └── UserSexEnum.java
│ │ │ │ │ └── MybatisAnnotationApplication.java
│ │ │ └── resources
│ │ │ │ └── application.properties
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── MybatisAnnotationApplicationTests.java
│ ├── spring-boot-mybatis-xml-mulidatasource
│ │ └── src
│ │ │ ├── main
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── enums
│ │ │ │ └── UserSexEnum.java
│ │ │ │ ├── mapper
│ │ │ │ ├── test1
│ │ │ │ │ └── User1Mapper.java
│ │ │ │ └── test2
│ │ │ │ │ └── User2Mapper.java
│ │ │ │ └── MXMApplication.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── MXMApplicationTests.java
│ └── spring-boot-mybatis-annotation-mulidatasource
│ │ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── enums
│ │ │ └── UserSexEnum.java
│ │ │ └── MAMApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MAMApplicationTests.java
├── spring-boot-elasticsearch
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── service
│ │ │ └── CustomersInterface.java
│ │ │ └── ElasticsearchApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ElasticsearchApplicationTests.java
├── spring-boot-web
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── static
│ │ │ │ ├── css
│ │ │ │ └── starter.css
│ │ │ │ └── images
│ │ │ │ └── favicon.png
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── WebApplication.java
│ │ │ ├── repository
│ │ │ └── UserRepository.java
│ │ │ └── web
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── WebApplicationTests.java
├── spring-boot-web-thymeleaf
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── static
│ │ │ └── favicon.ico
│ │ ├── application.properties
│ │ └── logback.xml
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── repository
│ │ └── MessageRepository.java
├── spring-boot-file-upload
│ └── src
│ │ └── main
│ │ └── resources
│ │ ├── templates
│ │ ├── from_file.html
│ │ ├── uploadStatus.html
│ │ └── upload.html
│ │ └── application.properties
├── spring-boot-mongodb
│ ├── spring-boot-mongodb
│ │ └── src
│ │ │ ├── main
│ │ │ ├── resources
│ │ │ │ └── application.properties
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── MongoDBApplication.java
│ │ │ │ └── repository
│ │ │ │ └── UserRepository.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── MongoDBApplicationTests.java
│ └── spring-boot-multi-mongodb
│ │ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── repository
│ │ │ ├── primary
│ │ │ │ └── PrimaryRepository.java
│ │ │ └── secondary
│ │ │ │ └── SecondaryRepository.java
│ │ │ └── MultiMongodbApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MultiMongodbApplicationTests.java
├── spring-boot-shiro
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── templates
│ │ │ │ ├── 403.html
│ │ │ │ ├── index.html
│ │ │ │ ├── userInfo.html
│ │ │ │ ├── userInfoAdd.html
│ │ │ │ ├── userInfoDel.html
│ │ │ │ └── login.html
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── sevice
│ │ │ └── UserInfoService.java
│ │ │ ├── dao
│ │ │ └── UserInfoDao.java
│ │ │ └── ShiroApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ShiroApplicationTests.java
├── spring-boot-jpa
│ ├── spring-boot-jpa
│ │ └── src
│ │ │ ├── main
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── model
│ │ │ │ └── UserInfo.java
│ │ │ │ ├── repository
│ │ │ │ └── AddressRepository.java
│ │ │ │ ├── service
│ │ │ │ └── UserDetailService.java
│ │ │ │ └── JpaApplication.java
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── JpaApplicationTests.java
│ └── spring-boot-multi-Jpa
│ │ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── MultiJpaApplication.java
│ │ │ └── repository
│ │ │ ├── test1
│ │ │ └── UserTest1Repository.java
│ │ │ └── test2
│ │ │ └── UserTest2Repository.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MultiJpaApplicationTests.java
├── spring-boot-rabbitmq
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── RabbitMQApplication.java
│ │ │ └── rabbit
│ │ │ ├── many
│ │ │ ├── NeoReceiver1.java
│ │ │ ├── NeoReceiver2.java
│ │ │ └── NeoSender.java
│ │ │ ├── fanout
│ │ │ ├── FanoutReceiverA.java
│ │ │ ├── FanoutReceiverB.java
│ │ │ ├── FanoutReceiverC.java
│ │ │ └── FanoutSender.java
│ │ │ ├── topic
│ │ │ ├── TopicReceiver.java
│ │ │ └── TopicReceiver2.java
│ │ │ └── object
│ │ │ └── ObjectReceiver.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── RabbitMQApplicationTests.java
├── spring-boot-mybatis-plus
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── mapper
│ │ │ │ └── UserMapper.java
│ │ │ │ ├── model
│ │ │ │ └── User.java
│ │ │ │ └── MyBatisPlusApplication.java
│ │ └── resources
│ │ │ ├── db
│ │ │ ├── data-h2.sql
│ │ │ └── schema-h2.sql
│ │ │ └── application.yml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MyBatisPlusApplicationTests.java
├── spring-boot-fastDFS
│ └── src
│ │ └── main
│ │ └── resources
│ │ ├── application.properties
│ │ ├── fdfs_client.conf
│ │ └── templates
│ │ ├── uploadStatus.html
│ │ └── upload.html
├── spring-boot-mail
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ └── emailTemplate.html
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── MailApplication.java
│ │ │ └── service
│ │ │ └── MailService.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MailApplicationTests.java
├── spring-boot-jpa-thymeleaf-curd
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── templates
│ │ │ └── hello.html
│ │ └── application.properties
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ ├── repository
│ │ └── UserRepository.java
│ │ └── service
│ │ └── UserService.java
├── spring-boot-actuator
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── ActuatorApplication.java
│ │ │ └── controller
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ActuatorApplicationTests.java
└── spring-boot-redis
│ └── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── config
│ │ └── SessionConfig.java
│ │ └── RedisApplication.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── RedisApplicationTests.java
├── spring-boot-banner
└── src
│ └── main
│ ├── resources
│ ├── application.properties
│ ├── banner.gif
│ └── banner.txt
│ └── java
│ └── com
│ └── neo
│ └── banner
│ └── BannerApplication.java
├── spring-boot-docker
└── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ ├── docker
│ │ └── Dockerfile
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── DockerApplication.java
│ │ └── controller
│ │ └── DockerController.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── DockerApplicationTests.java
├── spring-boot-hello
└── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── HelloApplication.java
│ │ └── controller
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── HelloApplicationTests.java
├── spring-boot-webflux
└── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── WebFluxApplication.java
│ │ └── web
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── WebFluxApplicationTests.java
├── 1.x
├── spring-boot-helloWorld
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ └── controller
│ │ │ └── HelloWorldController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-package-war
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ ├── controller
│ │ │ └── HelloWorldController.java
│ │ │ └── ServletInitializer.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-thymeleaf
│ └── src
│ │ └── main
│ │ └── resources
│ │ ├── application.properties
│ │ └── templates
│ │ └── hello.html
├── spring-boot-admin-simple
│ ├── spring-boot-admin-server
│ │ └── src
│ │ │ ├── main
│ │ │ └── resources
│ │ │ │ └── application.properties
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── AdminServerApplicationTests.java
│ └── spring-boot-admin-client
│ │ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ └── AdminClientApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── AdminClientApplicationTests.java
├── spring-boot-scheduler
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ └── task
│ │ │ └── SchedulerTask.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-mybatis-xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── enums
│ │ │ │ └── UserSexEnum.java
│ │ │ │ ├── mapper
│ │ │ │ └── UserMapper.java
│ │ │ │ └── Application.java
│ │ └── resources
│ │ │ └── application.properties
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-mybatis-annotation
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── enums
│ │ │ │ └── UserSexEnum.java
│ │ │ │ └── Application.java
│ │ └── resources
│ │ │ └── application.properties
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-mybatis-mulidatasource
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── enums
│ │ │ └── UserSexEnum.java
│ │ │ ├── mapper
│ │ │ ├── test1
│ │ │ │ └── User1Mapper.java
│ │ │ └── test2
│ │ │ │ └── User2Mapper.java
│ │ │ └── Application.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-mybatis-annotation-mulidatasource
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── enums
│ │ │ └── UserSexEnum.java
│ │ │ └── Application.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-web
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── static
│ │ │ │ ├── css
│ │ │ │ └── starter.css
│ │ │ │ └── images
│ │ │ │ └── favicon.png
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── domain
│ │ │ └── UserRepository.java
│ │ │ ├── Application.java
│ │ │ └── config
│ │ │ └── SessionConfig.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-mongodb
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── dao
│ │ │ └── UserDao.java
│ │ │ └── Application.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-file-upload
│ └── src
│ │ └── main
│ │ └── resources
│ │ └── templates
│ │ ├── from_file.html
│ │ ├── uploadStatus.html
│ │ └── upload.html
├── spring-boot-shiro
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── templates
│ │ │ │ ├── 403.html
│ │ │ │ ├── index.html
│ │ │ │ ├── userInfo.html
│ │ │ │ ├── userInfoAdd.html
│ │ │ │ ├── userInfoDel.html
│ │ │ │ └── login.html
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── sevice
│ │ │ └── UserInfoService.java
│ │ │ ├── dao
│ │ │ └── UserInfoDao.java
│ │ │ └── SpringBootShiroApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── SpringBootShiroApplicationTests.java
├── spring-boot-multi-mongodb
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.yml
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── model
│ │ │ └── repository
│ │ │ │ ├── primary
│ │ │ │ └── PrimaryRepository.java
│ │ │ │ └── secondary
│ │ │ │ └── SecondaryRepository.java
│ │ │ └── config
│ │ │ ├── PrimaryMongoConfig.java
│ │ │ ├── props
│ │ │ └── MultipleMongoProperties.java
│ │ │ └── SecondaryMongoConfig.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-rabbitmq
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ └── rabbit
│ │ │ ├── many
│ │ │ ├── NeoReceiver1.java
│ │ │ ├── NeoReceiver2.java
│ │ │ ├── NeoSender.java
│ │ │ └── NeoSender2.java
│ │ │ ├── fanout
│ │ │ ├── FanoutReceiverA.java
│ │ │ ├── FanoutReceiverB.java
│ │ │ ├── FanoutReceiverC.java
│ │ │ └── FanoutSender.java
│ │ │ ├── topic
│ │ │ ├── TopicReceiver.java
│ │ │ └── TopicReceiver2.java
│ │ │ └── object
│ │ │ └── ObjectReceiver.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-fastDFS
│ └── src
│ │ └── main
│ │ └── resources
│ │ ├── application.properties
│ │ ├── fdfs_client.conf
│ │ └── templates
│ │ ├── uploadStatus.html
│ │ └── upload.html
├── spring-boot-mail
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ └── emailTemplate.html
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ └── service
│ │ │ └── MailService.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
├── spring-boot-jpa-thymeleaf-curd
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── templates
│ │ │ └── hello.html
│ │ └── application.properties
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ ├── repository
│ │ └── UserRepository.java
│ │ └── service
│ │ └── UserService.java
└── spring-boot-actuator
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.yml
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── ActuatorApplication.java
│ │ └── controller
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── ActuatorApplicationTests.java
├── spring-boot-helloWorld
└── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── Application.java
│ │ └── controller
│ │ └── HelloWorldController.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── ApplicationTests.java
├── spring-boot-commandLineRunner
└── src
│ └── main
│ ├── resources
│ └── application.properties
│ └── java
│ └── com
│ └── neo
│ ├── runner
│ ├── Runner.java
│ ├── OrderRunner1.java
│ └── OrderRunner2.java
│ └── CommandLineRunnerApplication.java
├── dockercompose-springboot-mysql-nginx
├── app
│ ├── Dockerfile
│ └── src
│ │ └── main
│ │ ├── resources
│ │ ├── application-dev.properties
│ │ ├── application-docker.properties
│ │ └── application.properties
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ ├── repository
│ │ └── VisitorRepository.java
│ │ └── ComposeApplication.java
└── nginx
│ └── conf.d
│ └── app.conf
├── spring-boot-package
├── spring-boot-package-war
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── Application.java
│ │ │ ├── controller
│ │ │ └── HelloWorldController.java
│ │ │ └── ServletInitializer.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ApplicationTests.java
└── spring-boot-package
│ └── src
│ ├── main
│ ├── resources
│ │ ├── application-dev.properties
│ │ ├── application-pro.properties
│ │ └── application-test.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ └── controller
│ │ └── HelloController.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── PackageApplicationTests.java
├── spring-boot-thymeleaf
├── spring-boot-thymeleaf
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ ├── hello.html
│ │ │ │ ├── if.html
│ │ │ │ ├── switch.html
│ │ │ │ ├── eq.html
│ │ │ │ └── string.html
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── ThymeleafApplication.java
│ │ │ └── web
│ │ │ └── HelloController.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── ThymeleafApplicationTests.java
└── spring-boot-thymeleaf-layout
│ └── src
│ ├── main
│ ├── resources
│ │ ├── application.properties
│ │ └── templates
│ │ │ ├── layout
│ │ │ ├── left.html
│ │ │ ├── footer.html
│ │ │ ├── header.html
│ │ │ └── copyright.html
│ │ │ ├── index.html
│ │ │ ├── home.html
│ │ │ ├── fragment.html
│ │ │ ├── layout.html
│ │ │ └── base.html
│ └── java
│ │ └── com
│ │ └── neo
│ │ └── TLayoutApplication.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── TLayoutApplicationTests.java
├── spring-boot-scheduler
└── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── SchedulerApplication.java
│ │ └── task
│ │ └── SchedulerTask.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── SchedulerApplicationTests.java
├── spring-boot-memcache-spymemcached
└── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ └── MemcacheApplication.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── MemcacheApplicationTests.java
├── spring-boot-mybatis
├── spring-boot-mybatis-xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── enums
│ │ │ │ └── UserSexEnum.java
│ │ │ │ ├── mapper
│ │ │ │ └── UserMapper.java
│ │ │ │ └── MybatisXmlApplication.java
│ │ └── resources
│ │ │ └── application.properties
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MybatisXmlApplicationTests.java
├── spring-boot-mybatis-annotation
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── neo
│ │ │ │ ├── enums
│ │ │ │ └── UserSexEnum.java
│ │ │ │ └── MybatisAnnotationApplication.java
│ │ └── resources
│ │ │ └── application.properties
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MybatisAnnotationApplicationTests.java
├── spring-boot-mybatis-xml-mulidatasource
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── enums
│ │ │ └── UserSexEnum.java
│ │ │ ├── mapper
│ │ │ ├── test1
│ │ │ │ └── User1Mapper.java
│ │ │ └── test2
│ │ │ │ └── User2Mapper.java
│ │ │ └── MXMApplication.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MXMApplicationTests.java
└── spring-boot-mybatis-annotation-mulidatasource
│ └── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── enums
│ │ └── UserSexEnum.java
│ │ └── MAMApplication.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── MAMApplicationTests.java
├── spring-boot-web
└── src
│ ├── main
│ ├── resources
│ │ └── static
│ │ │ ├── css
│ │ │ └── starter.css
│ │ │ └── images
│ │ │ └── favicon.png
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── WebApplication.java
│ │ └── repository
│ │ └── UserRepository.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── WebApplicationTests.java
├── spring-boot-web-thymeleaf
└── src
│ └── main
│ ├── resources
│ ├── static
│ │ └── favicon.ico
│ ├── application.properties
│ └── logback.xml
│ └── java
│ └── com
│ └── neo
│ └── repository
│ └── MessageRepository.java
├── spring-boot-file-upload
└── src
│ └── main
│ └── resources
│ ├── templates
│ ├── from_file.html
│ ├── uploadStatus.html
│ └── upload.html
│ └── application.properties
├── spring-boot-mongodb
├── spring-boot-mongodb
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── MongoDBApplication.java
│ │ │ └── repository
│ │ │ └── UserRepository.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── MongoDBApplicationTests.java
└── spring-boot-multi-mongodb
│ └── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── repository
│ │ ├── primary
│ │ │ └── PrimaryRepository.java
│ │ └── secondary
│ │ │ └── SecondaryRepository.java
│ │ └── MultiMongodbApplication.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── MultiMongodbApplicationTests.java
├── spring-boot-jpa
├── spring-boot-jpa
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── neo
│ │ │ ├── model
│ │ │ └── UserInfo.java
│ │ │ ├── repository
│ │ │ └── AddressRepository.java
│ │ │ ├── JpaApplication.java
│ │ │ └── service
│ │ │ └── UserDetailService.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── neo
│ │ └── JpaApplicationTests.java
└── spring-boot-multi-Jpa
│ └── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── MultiJpaApplication.java
│ │ └── repository
│ │ ├── test1
│ │ └── UserTest1Repository.java
│ │ └── test2
│ │ └── UserTest2Repository.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── MultiJpaApplicationTests.java
├── spring-boot-rabbitmq
└── src
│ ├── main
│ ├── resources
│ │ └── application.properties
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── RabbitMQApplication.java
│ │ └── rabbit
│ │ ├── many
│ │ ├── NeoReceiver1.java
│ │ ├── NeoReceiver2.java
│ │ ├── NeoSender.java
│ │ └── NeoSender2.java
│ │ ├── fanout
│ │ ├── FanoutReceiverB.java
│ │ ├── FanoutReceiverC.java
│ │ ├── FanoutReceiverA.java
│ │ └── FanoutSender.java
│ │ ├── topic
│ │ ├── TopicReceiver.java
│ │ └── TopicReceiver2.java
│ │ └── object
│ │ └── ObjectReceiver.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── RabbitMQApplicationTests.java
├── spring-boot-mail
└── src
│ ├── main
│ ├── resources
│ │ ├── application.properties
│ │ └── templates
│ │ │ └── emailTemplate.html
│ └── java
│ │ └── com
│ │ └── neo
│ │ ├── MailApplication.java
│ │ └── service
│ │ └── MailService.java
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── MailApplicationTests.java
├── spring-boot-jpa-thymeleaf-curd
└── src
│ └── main
│ ├── resources
│ ├── templates
│ │ └── hello.html
│ └── application.properties
│ └── java
│ └── com
│ └── neo
│ ├── repository
│ └── UserRepository.java
│ └── service
│ └── UserService.java
└── spring-boot-redis
└── src
├── main
└── java
│ └── com
│ └── neo
│ ├── config
│ └── SessionConfig.java
│ └── RedisApplication.java
└── test
└── java
└── com
└── neo
└── RedisApplicationTests.java
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | target/
3 | *.iml
4 |
5 |
--------------------------------------------------------------------------------
/2.x/spring-boot-hello/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-banner/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-docker/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-hello/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-webflux/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/1.x/spring-boot-helloWorld/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/2.x/spring-boot-banner/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/2.x/spring-boot-docker/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/2.x/spring-boot-helloWorld/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/2.x/spring-boot-webflux/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-helloWorld/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/1.x/spring-boot-package-war/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/2.x/spring-boot-package-war/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/spring-boot-commandLineRunner/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/2.x/dockercompose-springboot-mysql-nginx/app/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.5-jdk-8
--------------------------------------------------------------------------------
/2.x/spring-boot-commandLineRunner/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dockercompose-springboot-mysql-nginx/app/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM maven:3.8.3-openjdk-17
2 |
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package-war/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/1.x/spring-boot-thymeleaf/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.thymeleaf.cache: false
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.thymeleaf.cache=false
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.thymeleaf.cache=false
--------------------------------------------------------------------------------
/spring-boot-scheduler/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-scheduler
2 |
3 |
--------------------------------------------------------------------------------
/1.x/spring-boot-admin-simple/spring-boot-admin-server/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8000
2 |
3 |
--------------------------------------------------------------------------------
/1.x/spring-boot-scheduler/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-scheduler
2 |
3 |
--------------------------------------------------------------------------------
/2.x/spring-boot-admin-simple/spring-boot-admin-server/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8000
2 |
3 |
--------------------------------------------------------------------------------
/2.x/spring-boot-scheduler/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-scheduler
2 |
3 |
--------------------------------------------------------------------------------
/spring-boot-memcache-spymemcached/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | memcache.ip=localhost
2 | memcache.port=11211
--------------------------------------------------------------------------------
/2.x/spring-boot-memcache-spymemcached/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | memcache.ip=192.168.0.161
2 | memcache.port=11211
--------------------------------------------------------------------------------
/2.x/spring-boot-package/src/main/resources/application-dev.properties:
--------------------------------------------------------------------------------
1 | info.app.name=spring-boot-test
2 | info.app.version= 1.0.0
--------------------------------------------------------------------------------
/2.x/spring-boot-package/src/main/resources/application-pro.properties:
--------------------------------------------------------------------------------
1 | info.app.name=spring-boot-pro
2 | info.app.version= 1.0.0
--------------------------------------------------------------------------------
/2.x/spring-boot-package/src/main/resources/application-test.properties:
--------------------------------------------------------------------------------
1 | info.app.name=spring-boot-uat
2 | info.app.version= 1.0.0
--------------------------------------------------------------------------------
/2.x/spring-boot-swagger/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | logging.level.io.swagger.models.parameters.AbstractSerializableParameter=error
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package/src/main/resources/application-dev.properties:
--------------------------------------------------------------------------------
1 | info.app.name=spring-boot-test
2 | info.app.version= 1.0.0
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package/src/main/resources/application-pro.properties:
--------------------------------------------------------------------------------
1 | info.app.name=spring-boot-pro
2 | info.app.version= 1.0.0
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package/src/main/resources/application-test.properties:
--------------------------------------------------------------------------------
1 | info.app.name=spring-boot-uat
2 | info.app.version= 1.0.0
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-xml/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-annotation/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/spring-boot-banner/src/main/resources/banner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/spring-boot-banner/src/main/resources/banner.gif
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-mulidatasource/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-banner/src/main/resources/banner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/2.x/spring-boot-banner/src/main/resources/banner.gif
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-annotation-mulidatasource/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-elasticsearch/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.data.elasticsearch.cluster-name=es-mongodb
2 | spring.data.elasticsearch.cluster-nodes=192.168.0.53:9300
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/spring-boot-web/src/main/resources/static/css/starter.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | }
4 |
5 | .starter-template {
6 | padding: 40px 15px;
7 | text-align: center;
8 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-web/src/main/resources/static/css/starter.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | }
4 |
5 | .starter-template {
6 | padding: 40px 15px;
7 | text-align: center;
8 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-web/src/main/resources/static/css/starter.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding-top: 50px;
3 | }
4 |
5 | .starter-template {
6 | padding: 40px 15px;
7 | text-align: center;
8 | }
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/spring-boot-web/src/main/resources/static/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/spring-boot-web/src/main/resources/static/images/favicon.png
--------------------------------------------------------------------------------
/1.x/spring-boot-mongodb/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-mongodb
2 |
3 | spring.data.mongodb.uri=mongodb://192.168.9.61:20000/test
4 |
5 |
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/spring-boot-web-thymeleaf/src/main/resources/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/spring-boot-web-thymeleaf/src/main/resources/static/favicon.ico
--------------------------------------------------------------------------------
/1.x/spring-boot-web/src/main/resources/static/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/1.x/spring-boot-web/src/main/resources/static/images/favicon.png
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-annotation-mulidatasource/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-web/src/main/resources/static/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/2.x/spring-boot-web/src/main/resources/static/images/favicon.png
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-annotation-mulidatasource/src/main/java/com/neo/enums/UserSexEnum.java:
--------------------------------------------------------------------------------
1 | package com.neo.enums;
2 |
3 | public enum UserSexEnum {
4 | MAN, WOMAN
5 | }
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-web-thymeleaf/src/main/resources/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/2.x/spring-boot-web-thymeleaf/src/main/resources/static/favicon.ico
--------------------------------------------------------------------------------
/spring-boot-file-upload/src/main/resources/templates/from_file.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/spring-boot-file-upload/src/main/resources/templates/from_file.html
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-mongodb/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spring-boot-mongodb
2 |
3 | spring.data.mongodb.uri=mongodb://119.0.0.6:27017/test
4 |
5 |
6 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | com.neo.title=\u7EAF\u6D01\u7684\u5FAE\u7B11
2 | com.neo.description=\u5206\u4EAB\u751F\u6D3B\u548C\u6280\u672F
--------------------------------------------------------------------------------
/1.x/spring-boot-file-upload/src/main/resources/templates/from_file.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/1.x/spring-boot-file-upload/src/main/resources/templates/from_file.html
--------------------------------------------------------------------------------
/2.x/spring-boot-file-upload/src/main/resources/templates/from_file.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ityouknow/spring-boot-examples/HEAD/2.x/spring-boot-file-upload/src/main/resources/templates/from_file.html
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | com.neo.title=\u7EAF\u6D01\u7684\u5FAE\u7B11
2 | com.neo.description=\u5206\u4EAB\u751F\u6D3B\u548C\u6280\u672F
--------------------------------------------------------------------------------
/1.x/spring-boot-admin-simple/spring-boot-admin-client/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8001
2 |
3 | spring.boot.admin.url=http://localhost:8000
4 | management.security.enabled=false
5 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-mongodb/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spring-boot-mongodb
2 |
3 | spring.data.mongodb.uri=mongodb://192.168.0.75:20000/test
4 |
5 |
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-docker/src/main/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8-jdk-alpine
2 | VOLUME /tmp
3 | ADD spring-boot-docker-1.0.jar app.jar
4 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
--------------------------------------------------------------------------------
/spring-boot-docker/src/main/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:17-jdk-alpine
2 | VOLUME /tmp
3 | ADD spring-boot-docker-1.0.jar app.jar
4 | ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/resources/templates/403.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403
6 |
7 |
8 | 403没有权限
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/resources/templates/403.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 403
6 |
7 |
8 | 403没有权限
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-web-thymeleaf/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | # Allow Thymeleaf templates to be reloaded at dev time
2 | spring.thymeleaf.cache: false
3 | server.tomcat.access_log_enabled: true
4 | server.tomcat.basedir: target/tomcat
--------------------------------------------------------------------------------
/spring-boot-web-thymeleaf/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | # Allow Thymeleaf templates to be reloaded at dev time
2 | spring.thymeleaf.cache: false
3 | server.tomcat.access_log_enabled: true
4 | server.tomcat.basedir: target/tomcat
--------------------------------------------------------------------------------
/1.x/spring-boot-multi-mongodb/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | mongodb:
2 | primary:
3 | host: 192.168.9.60
4 | port: 20000
5 | database: test
6 | secondary:
7 | host: 192.168.9.61
8 | port: 20000
9 | database: test1
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | index
6 |
7 |
8 | index
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/model/UserInfo.java:
--------------------------------------------------------------------------------
1 | package com.neo.model;
2 |
3 | public interface UserInfo {
4 | String getUserName();
5 | String getEmail();
6 | String getHobby();
7 | String getIntroduction();
8 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | index
6 |
7 |
8 | index
9 |
10 |
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/model/UserInfo.java:
--------------------------------------------------------------------------------
1 | package com.neo.model;
2 |
3 | public interface UserInfo {
4 | String getUserName();
5 | String getEmail();
6 | String getHobby();
7 | String getIntroduction();
8 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/resources/templates/userInfo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UserInfo
6 |
7 |
8 | 用户查询界面
9 |
10 |
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/resources/templates/userInfoAdd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Add
6 |
7 |
8 | 用户添加界面
9 |
10 |
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/resources/templates/userInfoDel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Del
6 |
7 |
8 | 用户删除界面
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/resources/templates/userInfo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UserInfo
6 |
7 |
8 | 用户查询界面
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/resources/templates/userInfoAdd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Add
6 |
7 |
8 | 用户添加界面
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/resources/templates/userInfoDel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Del
6 |
7 |
8 | 用户删除界面
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spring-boot-rabbitmq
2 |
3 | spring.rabbitmq.host=192.168.0.56
4 | spring.rabbitmq.port=5672
5 | spring.rabbitmq.username=zzq
6 | spring.rabbitmq.password=zzq
7 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spring-boot-rabbitmq
2 |
3 | spring.rabbitmq.host=192.0.0.6
4 | spring.rabbitmq.port=5672
5 | spring.rabbitmq.username=admin
6 | spring.rabbitmq.password=admin
7 |
8 |
--------------------------------------------------------------------------------
/2.x/spring-boot-admin-simple/spring-boot-admin-client/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=8001
2 |
3 | spring.application.name=Admin Client
4 | spring.boot.admin.client.url=http://localhost:8000
5 | management.endpoints.web.exposure.include=*
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-rabbitmq-example
2 |
3 | spring.rabbitmq.host=192.168.0.86
4 | spring.rabbitmq.port=5672
5 | spring.rabbitmq.username=admin
6 | spring.rabbitmq.password=123456
7 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis-plus/src/main/java/com/neo/mapper/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper;
2 |
3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 | import com.neo.model.User;
5 |
6 | public interface UserMapper extends BaseMapper {
7 |
8 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-swagger/src/test/java/com/neo/SwaggerApplicationTests.java:
--------------------------------------------------------------------------------
1 |
2 | package com.neo;
3 |
4 |
5 |
6 | import org.junit.Test;
7 |
8 | public class SwaggerApplicationTests {
9 |
10 | @Test
11 | public void test() {
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/java/com/neo/sevice/UserInfoService.java:
--------------------------------------------------------------------------------
1 | package com.neo.sevice;
2 |
3 | import com.neo.entity.UserInfo;
4 |
5 | public interface UserInfoService {
6 | /**通过username查找用户信息;*/
7 | public UserInfo findByUsername(String username);
8 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/java/com/neo/sevice/UserInfoService.java:
--------------------------------------------------------------------------------
1 | package com.neo.sevice;
2 |
3 | import com.neo.model.UserInfo;
4 |
5 | public interface UserInfoService {
6 | /**通过username查找用户信息;*/
7 | public UserInfo findByUsername(String username);
8 | }
--------------------------------------------------------------------------------
/2.x/dockercompose-springboot-mysql-nginx/app/src/main/resources/application-dev.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://localhost:3306/test
2 | spring.datasource.username=root
3 | spring.datasource.password=root
4 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver
--------------------------------------------------------------------------------
/2.x/dockercompose-springboot-mysql-nginx/app/src/main/resources/application-docker.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://mysql:3306/test
2 | spring.datasource.username=root
3 | spring.datasource.password=root
4 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver
--------------------------------------------------------------------------------
/dockercompose-springboot-mysql-nginx/app/src/main/resources/application-dev.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://localhost:3306/test
2 | spring.datasource.username=root
3 | spring.datasource.password=root
4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
--------------------------------------------------------------------------------
/dockercompose-springboot-mysql-nginx/app/src/main/resources/application-docker.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://mysql:3306/test
2 | spring.datasource.username=root
3 | spring.datasource.password=root
4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
--------------------------------------------------------------------------------
/dockercompose-springboot-mysql-nginx/app/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.jpa.properties.hibernate.hbm2ddl.auto=update
2 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
3 | spring.jpa.show-sql=true
4 |
5 | spring.profiles.active=dev
--------------------------------------------------------------------------------
/2.x/dockercompose-springboot-mysql-nginx/app/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.jpa.properties.hibernate.hbm2ddl.auto=update
2 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
3 | spring.jpa.show-sql=true
4 |
5 | spring.profiles.active=dev
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis-plus/src/main/java/com/neo/model/User.java:
--------------------------------------------------------------------------------
1 | package com.neo.model;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class User {
7 | private Long id;
8 | private String name;
9 | private Integer age;
10 | private String email;
11 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-fastDFS/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | #http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties
2 | #search multipart
3 | spring.http.multipart.max-file-size=10MB
4 | spring.http.multipart.max-request-size=10MB
5 |
6 |
--------------------------------------------------------------------------------
/2.x/spring-boot-file-upload/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | #http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties
2 | #search multipart
3 | spring.servlet.multipart.max-file-size=10MB
4 | spring.servlet.multipart.max-request-size=10MB
--------------------------------------------------------------------------------
/2.x/spring-boot-swagger/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/spring-boot-file-upload/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | #http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties
2 | #search multipart
3 | spring.servlet.multipart.max-file-size=10000MB
4 | spring.servlet.multipart.max-request-size=10000MB
--------------------------------------------------------------------------------
/2.x/spring-boot-web-thymeleaf/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/spring-boot-web-thymeleaf/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/2.x/spring-boot-fastDFS/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | #http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties
2 | #search multipart
3 | spring.servlet.http.multipart.max-file-size=10MB
4 | spring.servlet.http.multipart.max-request-size=10MB
5 |
6 |
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/repository/AddressRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.Address;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface AddressRepository extends JpaRepository {
7 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-mail/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-mail
2 |
3 | spring.mail.host=smtp.163.com
4 | spring.mail.username=xxoo@xxoo.com
5 | spring.mail.password=xxoo
6 | spring.mail.default-encoding=UTF-8
7 |
8 | mail.fromMail.addr=xxoo@xxoo.com
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/repository/AddressRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.Address;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface AddressRepository extends JpaRepository {
7 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-mail/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-mail
2 |
3 | spring.mail.host=smtp.163.com
4 | spring.mail.username=xxoo@xxoo.com
5 | spring.mail.password=xxoo
6 | spring.mail.default-encoding=UTF-8
7 |
8 | mail.fromMail.addr=xxoo@xxoo.com
9 |
10 |
--------------------------------------------------------------------------------
/spring-boot-mail/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spirng-boot-mail
2 |
3 | spring.mail.host=smtp.126.com
4 | spring.mail.username=xxxx@126.com
5 | spring.mail.password=Zxxxxxxx
6 |
7 | spring.mail.default-encoding=UTF-8
8 |
9 | mail.fromMail.addr=ixxxxw@126.com
10 |
11 |
--------------------------------------------------------------------------------
/1.x/spring-boot-fastDFS/src/main/resources/fdfs_client.conf:
--------------------------------------------------------------------------------
1 | connect_timeout = 60
2 | network_timeout = 60
3 | charset = UTF-8
4 | http.tracker_http_port = 8080
5 | http.anti_steal_token = no
6 | http.secret_key = 123456
7 |
8 | tracker_server = 192.168.53.85:22122
9 | tracker_server = 192.168.53.86:22122
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-fastDFS/src/main/resources/fdfs_client.conf:
--------------------------------------------------------------------------------
1 | connect_timeout = 60
2 | network_timeout = 60
3 | charset = UTF-8
4 | http.tracker_http_port = 8080
5 | http.anti_steal_token = no
6 | http.secret_key = 123456
7 |
8 | tracker_server = 192.168.53.85:22122
9 | tracker_server = 192.168.53.86:22122
10 |
--------------------------------------------------------------------------------
/spring-boot-file-upload/src/main/resources/templates/uploadStatus.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot - Upload Status
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/1.x/spring-boot-file-upload/src/main/resources/templates/uploadStatus.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot - Upload Status
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/1.x/spring-boot-thymeleaf/src/main/resources/templates/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello Thymeleaf!
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-file-upload/src/main/resources/templates/uploadStatus.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot - Upload Status
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/spring-boot-jpa-thymeleaf-curd/src/main/resources/templates/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello Thymeleaf!
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/1.x/spring-boot-jpa-thymeleaf-curd/src/main/resources/templates/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello Thymeleaf!
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa-thymeleaf-curd/src/main/resources/templates/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello Thymeleaf!
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spring-boot-multi-mongodb
2 |
3 | mongodb.primary.uri=mongodb://119.0.0.6:27017
4 | mongodb.primary.database=primary
5 | mongodb.secondary.uri=mongodb://119.0.0.6:27017
6 | mongodb.secondary.database=secondary
7 |
8 |
9 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 | Hello World
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/hello.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello
6 |
7 |
8 | Hello World
9 |
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=spring-boot-multi-mongodb
2 |
3 | mongodb.primary.uri=mongodb://192.168.0.75:20000
4 | mongodb.primary.database=primary
5 | mongodb.secondary.uri=mongodb://192.168.0.75:20000
6 | mongodb.secondary.database=secondary
7 |
8 |
9 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis-plus/src/main/resources/db/data-h2.sql:
--------------------------------------------------------------------------------
1 | DELETE FROM user;
2 |
3 | INSERT INTO user (id, name, age, email) VALUES
4 | (1, 'neo', 18, 'smile1@ityouknow.com'),
5 | (2, 'keep', 36, 'smile@ityouknow.com'),
6 | (3, 'pure', 28, 'smile@ityouknow.com'),
7 | (4, 'smile', 21, 'smile@ityouknow.com'),
8 | (5, 'it', 24, 'smile@ityouknow.com');
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/java/com/neo/dao/UserInfoDao.java:
--------------------------------------------------------------------------------
1 | package com.neo.dao;
2 |
3 | import com.neo.entity.UserInfo;
4 | import org.springframework.data.repository.CrudRepository;
5 |
6 | public interface UserInfoDao extends CrudRepository {
7 | /**通过username查找用户信息;*/
8 | public UserInfo findByUsername(String username);
9 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/java/com/neo/dao/UserInfoDao.java:
--------------------------------------------------------------------------------
1 | package com.neo.dao;
2 |
3 | import com.neo.model.UserInfo;
4 | import org.springframework.data.repository.CrudRepository;
5 |
6 | public interface UserInfoDao extends CrudRepository {
7 | /**通过username查找用户信息;*/
8 | public UserInfo findByUsername(String username);
9 | }
--------------------------------------------------------------------------------
/dockercompose-springboot-mysql-nginx/app/src/main/java/com/neo/repository/VisitorRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.entity.Visitor;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface VisitorRepository extends JpaRepository {
7 | Visitor findByIp(String ip);
8 | }
9 |
--------------------------------------------------------------------------------
/2.x/dockercompose-springboot-mysql-nginx/app/src/main/java/com/neo/repository/VisitorRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.entity.Visitor;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface VisitorRepository extends JpaRepository {
7 | Visitor findByIp(String ip);
8 | }
9 |
--------------------------------------------------------------------------------
/2.x/spring-boot-elasticsearch/src/main/java/com/neo/service/CustomersInterface.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | import com.neo.model.Customer;
4 |
5 | import java.util.List;
6 |
7 | public interface CustomersInterface {
8 |
9 | public List searchCity(Integer pageNumber, Integer pageSize, String searchContent);
10 |
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis-plus/src/main/resources/db/schema-h2.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE IF EXISTS user;
2 |
3 | CREATE TABLE user
4 | (
5 | id BIGINT(20) NOT NULL COMMENT '主键ID',
6 | name VARCHAR(30) NULL DEFAULT NULL COMMENT '姓名',
7 | age INT(11) NULL DEFAULT NULL COMMENT '年龄',
8 | email VARCHAR(50) NULL DEFAULT NULL COMMENT '邮箱',
9 | PRIMARY KEY (id)
10 | );
--------------------------------------------------------------------------------
/1.x/spring-boot-multi-mongodb/src/main/java/com/neo/model/repository/primary/PrimaryRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.model.repository.primary;
2 |
3 | import org.springframework.data.mongodb.repository.MongoRepository;
4 |
5 | /**
6 | * @author neo
7 | */
8 | public interface PrimaryRepository extends MongoRepository {
9 | }
10 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-annotation/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | mybatis.type-aliases-package=com.neo.entity
2 |
3 | spring.datasource.driverClassName = com.mysql.jdbc.Driver
4 | spring.datasource.url = jdbc:mysql://localhost:3306/test1?useUnicode=true&characterEncoding=utf-8
5 | spring.datasource.username = root
6 | spring.datasource.password = root
7 |
--------------------------------------------------------------------------------
/2.x/spring-boot-actuator/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | info.app.name=spring-boot-actuator
2 | info.app.version= 1.0.0
3 | info.app.test=test
4 |
5 | management.endpoints.web.exposure.include=*
6 | management.endpoint.health.show-details=always
7 | #management.endpoints.web.base-path=/manage
8 |
9 | management.endpoint.shutdown.enabled=true
10 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/left.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | left
6 |
7 |
8 |
9 | 我是 左侧
10 |
11 |
12 |
--------------------------------------------------------------------------------
/1.x/spring-boot-actuator/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | server:
2 | port: 8080
3 | management:
4 | security:
5 | enabled: false #关掉安全认证
6 | port: 8088 #管理端口调整成8088
7 | context-path: /monitor #actuator的访问路径
8 | endpoints:
9 | shutdown:
10 | enabled: true
11 |
12 | info:
13 | app:
14 | name: spring-boot-actuator
15 | version: 1.0.0
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/left.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | left
6 |
7 |
8 |
9 | 我是 左侧
10 |
11 |
12 |
--------------------------------------------------------------------------------
/1.x/spring-boot-multi-mongodb/src/main/java/com/neo/model/repository/secondary/SecondaryRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.model.repository.secondary;
2 |
3 | import org.springframework.data.mongodb.repository.MongoRepository;
4 |
5 | /**
6 | * @author neo
7 | */
8 | public interface SecondaryRepository extends MongoRepository {
9 | }
10 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | footer
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/spring-boot-helloWorld/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | public class ApplicationTests {
8 |
9 | @Test
10 | public void contextLoads() {
11 | System.out.println("hello word");
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/spring-boot-jpa-thymeleaf-curd/src/main/java/com/neo/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface UserRepository extends JpaRepository {
7 |
8 | User findById(long id);
9 |
10 | void deleteById(Long id);
11 | }
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | footer
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/header.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | header
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/1.x/spring-boot-jpa-thymeleaf-curd/src/main/java/com/neo/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.entity.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface UserRepository extends JpaRepository {
7 |
8 | User findById(long id);
9 |
10 | Long deleteById(Long id);
11 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-web/src/main/java/com/neo/domain/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.domain;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | public interface UserRepository extends JpaRepository {
6 |
7 | User findByUserName(String userName);
8 |
9 | User findByUserNameOrEmail(String username, String email);
10 |
11 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa-thymeleaf-curd/src/main/java/com/neo/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface UserRepository extends JpaRepository {
7 |
8 | User findById(long id);
9 |
10 | void deleteById(Long id);
11 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/header.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | header
6 |
7 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/copyright.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 | © 2018
10 |
11 |
12 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout/copyright.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 |
9 | © 2018
10 |
11 |
12 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/java/com/neo/repository/primary/PrimaryRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.primary;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.mongodb.repository.MongoRepository;
5 |
6 | /**
7 | * @author neo
8 | */
9 | public interface PrimaryRepository extends MongoRepository {
10 | }
11 |
--------------------------------------------------------------------------------
/spring-boot-redis/src/main/java/com/neo/config/SessionConfig.java:
--------------------------------------------------------------------------------
1 | package com.neo.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
5 |
6 | @Configuration
7 | @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 86400*30)
8 | public class SessionConfig {
9 | }
--------------------------------------------------------------------------------
/spring-boot-web-thymeleaf/src/main/java/com/neo/repository/MessageRepository.java:
--------------------------------------------------------------------------------
1 |
2 | package com.neo.repository;
3 |
4 | import com.neo.model.Message;
5 |
6 | public interface MessageRepository {
7 |
8 | Iterable findAll();
9 |
10 | Message save(Message message);
11 |
12 | Message findMessage(Long id);
13 |
14 | void deleteMessage(Long id);
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-fastDFS/src/main/resources/templates/uploadStatus.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot - Upload Status
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/2.x/spring-boot-fastDFS/src/main/resources/templates/uploadStatus.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot - Upload Status
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/java/com/neo/repository/primary/PrimaryRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.primary;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.mongodb.repository.MongoRepository;
5 |
6 | /**
7 | * @author neo
8 | */
9 | public interface PrimaryRepository extends MongoRepository {
10 | }
11 |
--------------------------------------------------------------------------------
/2.x/spring-boot-redis/src/main/java/com/neo/config/SessionConfig.java:
--------------------------------------------------------------------------------
1 | package com.neo.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
5 |
6 | @Configuration
7 | @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 86400*30)
8 | public class SessionConfig {
9 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-web-thymeleaf/src/main/java/com/neo/repository/MessageRepository.java:
--------------------------------------------------------------------------------
1 |
2 | package com.neo.repository;
3 |
4 | import com.neo.model.Message;
5 |
6 | public interface MessageRepository {
7 |
8 | Iterable findAll();
9 |
10 | Message save(Message message);
11 |
12 | Message findMessage(Long id);
13 |
14 | void deleteMessage(Long id);
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-hello/src/test/java/com/neo/HelloApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 |
7 | @SpringBootTest
8 | public class HelloApplicationTests {
9 |
10 |
11 | @Test
12 | void contextLoads() {
13 | System.out.println("Hello Spring Boot 2.x!");
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/java/com/neo/repository/secondary/SecondaryRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.secondary;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.mongodb.repository.MongoRepository;
5 |
6 | /**
7 | * @author neo
8 | */
9 | public interface SecondaryRepository extends MongoRepository {
10 | }
11 |
--------------------------------------------------------------------------------
/1.x/spring-boot-web/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/java/com/neo/repository/secondary/SecondaryRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.secondary;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.mongodb.repository.MongoRepository;
5 |
6 | /**
7 | * @author neo
8 | */
9 | public interface SecondaryRepository extends MongoRepository {
10 | }
11 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | mybatis.type-aliases-package=com.neo.model
2 |
3 | spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
4 | spring.datasource.username=root
5 | spring.datasource.password=root
6 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
--------------------------------------------------------------------------------
/1.x/spring-boot-helloWorld/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/1.x/spring-boot-web/src/main/java/com/neo/config/SessionConfig.java:
--------------------------------------------------------------------------------
1 | package com.neo.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
5 |
6 | @Configuration
7 | @EnableRedisHttpSession(maxInactiveIntervalInSeconds = 86400*30)
8 | public class SessionConfig {
9 |
10 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-helloWorld/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | mybatis.type-aliases-package=com.neo.model
2 |
3 | spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
4 | spring.datasource.username=root
5 | spring.datasource.password=root
6 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
--------------------------------------------------------------------------------
/spring-boot-helloWorld/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/neo/mapper/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper;
2 |
3 | import java.util.List;
4 |
5 | import com.neo.model.User;
6 |
7 | public interface UserMapper {
8 |
9 | List getAll();
10 |
11 | User getOne(Long id);
12 |
13 | void insert(User user);
14 |
15 | void update(User user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/spring-boot-web/src/main/java/com/neo/WebApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class WebApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(WebApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/1.x/spring-boot-package-war/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/neo/mapper/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper;
2 |
3 | import java.util.List;
4 |
5 | import com.neo.model.User;
6 |
7 | public interface UserMapper {
8 |
9 | List getAll();
10 |
11 | User getOne(Long id);
12 |
13 | void insert(User user);
14 |
15 | void update(User user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-package-war/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-web/src/main/java/com/neo/WebApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class WebApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(WebApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-mail/src/main/java/com/neo/MailApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MailApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MailApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/1.x/spring-boot-fastDFS/src/main/resources/templates/upload.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot file upload example
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-fastDFS/src/main/resources/templates/upload.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot file upload example
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-hello/src/main/java/com/neo/HelloApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class HelloApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(HelloApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mail/src/main/java/com/neo/MailApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MailApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MailApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-redis/src/main/java/com/neo/RedisApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class RedisApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(RedisApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/java/com/neo/ShiroApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ShiroApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ShiroApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-docker/src/main/java/com/neo/DockerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class DockerApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(DockerApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-file-upload/src/main/resources/templates/upload.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot file upload example
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/spring-boot-hello/src/main/java/com/neo/HelloApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class HelloApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(HelloApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-mail/src/main/resources/templates/emailTemplate.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 您好,这是验证邮件,请点击下面的链接完成验证,
9 | 激活账号
10 |
11 |
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package-war/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
6 |
7 | @RunWith(SpringJUnit4ClassRunner.class)
8 | public class ApplicationTests {
9 |
10 | @Test
11 | public void contextLoads() {
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/spring-boot-redis/src/main/java/com/neo/RedisApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class RedisApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(RedisApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Index
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/1.x/spring-boot-file-upload/src/main/resources/templates/upload.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot file upload example
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mail/src/main/resources/templates/emailTemplate.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 您好,这是验证邮件,请点击下面的链接完成验证,
9 | 激活账号
10 |
11 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-xml/src/main/java/com/neo/mapper/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper;
2 |
3 | import java.util.List;
4 |
5 | import com.neo.entity.UserEntity;
6 |
7 | public interface UserMapper {
8 |
9 | List getAll();
10 |
11 | UserEntity getOne(Long id);
12 |
13 | void insert(UserEntity user);
14 |
15 | void update(UserEntity user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-docker/src/main/java/com/neo/DockerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class DockerApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(DockerApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-file-upload/src/main/resources/templates/upload.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Spring Boot file upload example
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mail/src/main/resources/templates/emailTemplate.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Title
6 |
7 |
8 | 您好,这是验证邮件,请点击下面的链接完成验证,
9 | 激活账号
10 |
11 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Index
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/2.x/spring-boot-web/src/main/java/com/neo/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface UserRepository extends JpaRepository {
7 |
8 | User findByUserName(String userName);
9 |
10 | User findByUserNameOrEmail(String username, String email);
11 |
12 | }
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/JpaApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class JpaApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(JpaApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-web/src/main/java/com/neo/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface UserRepository extends JpaRepository {
7 |
8 | User findByUserName(String userName);
9 |
10 | User findByUserNameOrEmail(String username, String email);
11 |
12 | }
--------------------------------------------------------------------------------
/spring-boot-webflux/src/main/java/com/neo/WebFluxApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class WebFluxApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(WebFluxApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-webflux/src/main/java/com/neo/WebFluxApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class WebFluxApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(WebFluxApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-docker/src/main/java/com/neo/controller/DockerController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class DockerController {
8 |
9 | @RequestMapping("/")
10 | public String index() {
11 | return "Hello Docker!";
12 | }
13 | }
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package-war/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/RabbitMQApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class RabbitMQApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(RabbitMQApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/1.x/spring-boot-actuator/src/main/java/com/neo/ActuatorApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ActuatorApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ActuatorApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-actuator/src/main/java/com/neo/ActuatorApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ActuatorApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ActuatorApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-docker/src/main/java/com/neo/controller/DockerController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class DockerController {
8 |
9 | @RequestMapping("/")
10 | public String index() {
11 | return "Hello Docker!";
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis-plus/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | # DataSource Config
2 | spring:
3 | datasource:
4 | driver-class-name: org.h2.Driver
5 | schema: classpath:db/schema-h2.sql
6 | data: classpath:db/data-h2.sql
7 | url: jdbc:h2:mem:test
8 | username: root
9 | password: test
10 |
11 | # Logger Config
12 | logging:
13 | level:
14 | com.neo: debug
15 |
--------------------------------------------------------------------------------
/2.x/spring-boot-package/src/main/java/com/neo/controller/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/RabbitMQApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class RabbitMQApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(RabbitMQApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-banner/src/main/java/com/neo/banner/BannerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo.banner;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class BannerApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(BannerApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-hello/src/main/java/com/neo/controller/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloController {
8 |
9 | @RequestMapping("/")
10 | public String index() {
11 | return "Hello Spring Boot 3.x!";
12 | }
13 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-actuator/src/main/java/com/neo/controller/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-actuator/src/main/java/com/neo/controller/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-banner/src/main/java/com/neo/banner/BannerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo.banner;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class BannerApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(BannerApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-hello/src/main/java/com/neo/controller/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloController {
8 |
9 | @RequestMapping("/")
10 | public String index() {
11 | return "Hello Spring Boot 2.0!";
12 | }
13 | }
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/mapper/test1/User1Mapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper.test1;
2 |
3 | import com.neo.model.User;
4 |
5 | import java.util.List;
6 |
7 | public interface User1Mapper {
8 |
9 | List getAll();
10 |
11 | User getOne(Long id);
12 |
13 | void insert(User user);
14 |
15 | void update(User user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/mapper/test2/User2Mapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper.test2;
2 |
3 | import java.util.List;
4 |
5 | import com.neo.model.User;
6 |
7 | public interface User2Mapper {
8 |
9 | List getAll();
10 |
11 | User getOne(Long id);
12 |
13 | void insert(User user);
14 |
15 | void update(User user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-memcache-spymemcached/src/main/java/com/neo/MemcacheApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MemcacheApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MemcacheApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis-plus/src/main/java/com/neo/MyBatisPlusApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MyBatisPlusApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MyBatisPlusApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/mapper/test1/User1Mapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper.test1;
2 |
3 | import com.neo.model.User;
4 |
5 | import java.util.List;
6 |
7 | public interface User1Mapper {
8 |
9 | List getAll();
10 |
11 | User getOne(Long id);
12 |
13 | void insert(User user);
14 |
15 | void update(User user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/mapper/test2/User2Mapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper.test2;
2 |
3 | import java.util.List;
4 |
5 | import com.neo.model.User;
6 |
7 | public interface User2Mapper {
8 |
9 | List getAll();
10 |
11 | User getOne(Long id);
12 |
13 | void insert(User user);
14 |
15 | void update(User user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 |
8 |
个性化的内容
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/dockercompose-springboot-mysql-nginx/app/src/main/java/com/neo/ComposeApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ComposeApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ComposeApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-helloWorld/src/main/java/com/neo/controller/HelloWorldController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloWorldController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-multi-Jpa/src/main/java/com/neo/MultiJpaApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiJpaApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiJpaApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-memcache-spymemcached/src/main/java/com/neo/MemcacheApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MemcacheApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MemcacheApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-mongodb/src/main/java/com/neo/MongoDBApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MongoDBApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MongoDBApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/home.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 |
8 |
个性化的内容
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/1.x/spring-boot-helloWorld/src/main/java/com/neo/controller/HelloWorldController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloWorldController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-mulidatasource/src/main/java/com/neo/mapper/test1/User1Mapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper.test1;
2 |
3 | import com.neo.entity.UserEntity;
4 |
5 | import java.util.List;
6 |
7 | public interface User1Mapper {
8 |
9 | List getAll();
10 |
11 | UserEntity getOne(Long id);
12 |
13 | void insert(UserEntity user);
14 |
15 | void update(UserEntity user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-mulidatasource/src/main/java/com/neo/mapper/test2/User2Mapper.java:
--------------------------------------------------------------------------------
1 | package com.neo.mapper.test2;
2 |
3 | import java.util.List;
4 |
5 | import com.neo.entity.UserEntity;
6 |
7 | public interface User2Mapper {
8 |
9 | List getAll();
10 |
11 | UserEntity getOne(Long id);
12 |
13 | void insert(UserEntity user);
14 |
15 | void update(UserEntity user);
16 |
17 | void delete(Long id);
18 |
19 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/java/com/neo/SpringBootShiroApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class SpringBootShiroApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(SpringBootShiroApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/dockercompose-springboot-mysql-nginx/app/src/main/java/com/neo/ComposeApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ComposeApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ComposeApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-helloWorld/src/main/java/com/neo/controller/HelloWorldController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloWorldController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-multi-Jpa/src/main/java/com/neo/MultiJpaApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiJpaApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiJpaApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-mongodb/src/main/java/com/neo/MongoDBApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MongoDBApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MongoDBApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-swagger/src/main/java/com/neo/SwaggerApplication.java:
--------------------------------------------------------------------------------
1 |
2 | package com.neo;
3 |
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 |
7 |
8 | @SpringBootApplication
9 | public class SwaggerApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(SwaggerApplication.class, args);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/1.x/spring-boot-package-war/src/main/java/com/neo/controller/HelloWorldController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloWorldController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World xx";
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-elasticsearch/src/main/java/com/neo/ElasticsearchApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ElasticsearchApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ElasticsearchApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/MXMApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MXMApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MXMApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-package-war/src/main/java/com/neo/controller/HelloWorldController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloWorldController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World xx";
12 | }
13 | }
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/main/java/com/neo/MXMApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MXMApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MXMApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package/src/main/java/com/neo/controller/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/service/UserDetailService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | import com.neo.model.UserDetail;
4 | import com.neo.param.UserDetailParam;
5 | import org.springframework.data.domain.Page;
6 | import org.springframework.data.domain.Pageable;
7 |
8 | public interface UserDetailService {
9 | public Page findByCondition(UserDetailParam detailParam, Pageable pageable);
10 | }
11 |
--------------------------------------------------------------------------------
/spring-boot-commandLineRunner/src/main/java/com/neo/runner/Runner.java:
--------------------------------------------------------------------------------
1 | package com.neo.runner;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | public class Runner implements CommandLineRunner {
8 |
9 | @Override
10 | public void run(String... args) throws Exception {
11 | System.out.println("The Runner start to initialize ...");
12 | }
13 | }
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/service/UserDetailService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | import com.neo.model.UserDetail;
4 | import com.neo.param.UserDetailParam;
5 | import org.springframework.data.domain.Page;
6 | import org.springframework.data.domain.Pageable;
7 |
8 | public interface UserDetailService {
9 | public Page findByCondition(UserDetailParam detailParam, Pageable pageable);
10 | }
11 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-annotation-mulidatasource/src/main/java/com/neo/MAMApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MAMApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MAMApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/java/com/neo/ThymeleafApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ThymeleafApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ThymeleafApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-commandLineRunner/src/main/java/com/neo/runner/Runner.java:
--------------------------------------------------------------------------------
1 | package com.neo.runner;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | public class Runner implements CommandLineRunner {
8 |
9 | @Override
10 | public void run(String... args) throws Exception {
11 | System.out.println("The Runner start to initialize ...");
12 | }
13 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-annotation-mulidatasource/src/main/java/com/neo/MAMApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MAMApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MAMApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/java/com/neo/TLayoutApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class TLayoutApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(TLayoutApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/java/com/neo/ThymeleafApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class ThymeleafApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(ThymeleafApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/java/com/neo/MultiMongodbApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiMongodbApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiMongodbApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package-war/src/main/java/com/neo/controller/HelloWorldController.java:
--------------------------------------------------------------------------------
1 | package com.neo.controller;
2 |
3 | import org.springframework.web.bind.annotation.RequestMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 |
6 | @RestController
7 | public class HelloWorldController {
8 |
9 | @RequestMapping("/hello")
10 | public String index() {
11 | return "Hello World";
12 | }
13 | }
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/java/com/neo/TLayoutApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class TLayoutApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(TLayoutApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/fragment.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Fragment - Page
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/1.x/spring-boot-admin-simple/spring-boot-admin-client/src/main/java/com/neo/AdminClientApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class AdminClientApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(AdminClientApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-admin-simple/spring-boot-admin-client/src/main/java/com/neo/AdminClientApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class AdminClientApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(AdminClientApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-multi-mongodb/src/main/java/com/neo/MultiMongodbApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MultiMongodbApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MultiMongodbApplication.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/fragment.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Fragment - Page
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/spring-boot-jpa-thymeleaf-curd/src/main/java/com/neo/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | import com.neo.model.User;
4 |
5 | import java.util.List;
6 |
7 | public interface UserService {
8 |
9 | public List getUserList();
10 |
11 | public User findUserById(long id);
12 |
13 | public void save(User user);
14 |
15 | public void edit(User user);
16 |
17 | public void delete(long id);
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/1.x/spring-boot-jpa-thymeleaf-curd/src/main/java/com/neo/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | import com.neo.entity.User;
4 |
5 | import java.util.List;
6 |
7 | public interface UserService {
8 |
9 | public List getUserList();
10 |
11 | public User findUserById(long id);
12 |
13 | public void save(User user);
14 |
15 | public void edit(User user);
16 |
17 | public void delete(long id);
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mongodb/src/main/java/com/neo/dao/UserDao.java:
--------------------------------------------------------------------------------
1 | package com.neo.dao;
2 |
3 | import com.neo.entity.UserEntity;
4 |
5 | /**
6 | * Created by summer on 2017/5/5.
7 | */
8 | public interface UserDao {
9 |
10 | public void saveUser(UserEntity user);
11 |
12 | public UserEntity findUserByUserName(String userName);
13 |
14 | public int updateUser(UserEntity user);
15 |
16 | public void deleteUserById(Long id);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa-thymeleaf-curd/src/main/java/com/neo/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | import com.neo.model.User;
4 |
5 | import java.util.List;
6 |
7 | public interface UserService {
8 |
9 | public List getUserList();
10 |
11 | public User findUserById(long id);
12 |
13 | public void save(User user);
14 |
15 | public void edit(User user);
16 |
17 | public void delete(long id);
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/test/java/com/neo/ShiroApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ShiroApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-banner/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | .__ .__ .__ .__ .___
2 | | |__ ____ | | | | ____ __ _ _____________| | __| _/
3 | | | \_/ __ \| | | | / _ \ \ \/ \/ / _ \_ __ \ | / __ |
4 | | Y \ ___/| |_| |_( <_> ) \ ( <_> ) | \/ |__/ /_/ |
5 | |___| /\___ >____/____/\____/ \/\_/ \____/|__| |____/\____ |
6 | \/ \/ \/
--------------------------------------------------------------------------------
/spring-boot-webflux/src/test/java/com/neo/WebFluxApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 WebFluxApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mail/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 | public class Application {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(Application.class, args);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mongodb/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 | public class Application {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(Application.class, args);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-mulidatasource/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 | public class Application {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(Application.class, args);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-banner/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 | .__ .__ .__ .__ .___
2 | | |__ ____ | | | | ____ __ _ _____________| | __| _/
3 | | | \_/ __ \| | | | / _ \ \ \/ \/ / _ \_ __ \ | / __ |
4 | | Y \ ___/| |_| |_( <_> ) \ ( <_> ) | \/ |__/ /_/ |
5 | |___| /\___ >____/____/\____/ \/\_/ \____/|__| |____/\____ |
6 | \/ \/ \/
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-multi-Jpa/src/main/java/com/neo/repository/test1/UserTest1Repository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.test1;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface UserTest1Repository extends JpaRepository {
7 | User findById(long id);
8 | User findByUserName(String userName);
9 | User findByUserNameOrEmail(String username, String email);
10 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-package/src/test/java/com/neo/PackageApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 PackageApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-webflux/src/test/java/com/neo/WebFluxApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 WebFluxApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-jpa/src/test/java/com/neo/JpaApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 JpaApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-multi-Jpa/src/main/java/com/neo/repository/test1/UserTest1Repository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.test1;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 | public interface UserTest1Repository extends JpaRepository {
7 | User findById(long id);
8 | User findByUserName(String userName);
9 | User findByUserNameOrEmail(String username, String email);
10 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-xml/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | mybatis.config-locations=classpath:mybatis/mybatis-config.xml
2 | mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
3 | mybatis.type-aliases-package=com.neo.entity
4 |
5 | spring.datasource.driverClassName = com.mysql.jdbc.Driver
6 | spring.datasource.url = jdbc:mysql://localhost:3306/test1?useUnicode=true&characterEncoding=utf-8
7 | spring.datasource.username = root
8 | spring.datasource.password = root
9 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-jpa/src/test/java/com/neo/JpaApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 JpaApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-multi-Jpa/src/main/java/com/neo/repository/test2/UserTest2Repository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.test2;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 |
7 | public interface UserTest2Repository extends JpaRepository {
8 | User findById(long id);
9 | User findByUserName(String userName);
10 | User findByUserNameOrEmail(String username, String email);
11 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-annotation-mulidatasource/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 | public class Application {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(Application.class, args);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-multi-Jpa/src/main/java/com/neo/repository/test2/UserTest2Repository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository.test2;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.data.jpa.repository.JpaRepository;
5 |
6 |
7 | public interface UserTest2Repository extends JpaRepository {
8 | User findById(long id);
9 | User findByUserName(String userName);
10 | User findByUserNameOrEmail(String username, String email);
11 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis-plus/src/test/java/com/neo/MyBatisPlusApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MyBatisPlusApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-memcache-spymemcached/src/test/java/com/neo/MemcacheApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MemcacheApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-mongodb/src/main/java/com/neo/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.User;
4 |
5 | /**
6 | * Created by summer on 2017/5/5.
7 | */
8 | public interface UserRepository {
9 |
10 | public void saveUser(User user);
11 |
12 | public User findUserByUserName(String userName);
13 |
14 | public long updateUser(User user);
15 |
16 | public void deleteUserById(Long id);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/spring-boot-webflux/src/main/java/com/neo/web/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.web;
2 |
3 | import org.springframework.web.bind.annotation.GetMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 | import reactor.core.publisher.Mono;
6 |
7 | @RestController
8 | public class HelloController {
9 |
10 | @GetMapping("/hello")
11 | public Mono hello() {
12 | return Mono.just("Welcome to reactive world ~");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/test/java/com/neo/SpringBootShiroApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 SpringBootShiroApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-memcache-spymemcached/src/test/java/com/neo/MemcacheApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MemcacheApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-mongodb/src/main/java/com/neo/repository/UserRepository.java:
--------------------------------------------------------------------------------
1 | package com.neo.repository;
2 |
3 | import com.neo.model.User;
4 |
5 | /**
6 | * Created by summer on 2017/5/5.
7 | */
8 | public interface UserRepository {
9 |
10 | public void saveUser(User user);
11 |
12 | public User findUserByUserName(String userName);
13 |
14 | public long updateUser(User user);
15 |
16 | public void deleteUserById(Long id);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-webflux/src/main/java/com/neo/web/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.web;
2 |
3 | import org.springframework.web.bind.annotation.GetMapping;
4 | import org.springframework.web.bind.annotation.RestController;
5 | import reactor.core.publisher.Mono;
6 |
7 | @RestController
8 | public class HelloController {
9 |
10 | @GetMapping("/hello")
11 | public Mono hello() {
12 | return Mono.just("Welcome to reactive world ~");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package/src/test/java/com/neo/PackageApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 PackageApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-xml/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.neo.mapper")
9 | public class Application {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(Application.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-shiro/src/main/resources/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Login
6 |
7 |
8 | 错误信息:
9 |
14 |
15 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-jpa/src/main/java/com/neo/JpaApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.boot.autoconfigure.domain.EntityScan;
6 |
7 | @SpringBootApplication
8 | public class JpaApplication {
9 |
10 | public static void main(String[] args) {
11 | SpringApplication.run(JpaApplication.class, args);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/2.x/spring-boot-shiro/src/main/resources/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Login
6 |
7 |
8 | 错误信息:
9 |
14 |
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mail/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mongodb/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-scheduler/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 Application {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(Application.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/test/java/com/neo/ThymeleafApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ThymeleafApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/test/java/com/neo/TLayoutApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 TLayoutApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/test/java/com/neo/ThymeleafApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ThymeleafApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-annotation/src/main/java/com/neo/Application.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.neo.mapper")
9 | public class Application {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(Application.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-xml/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-scheduler/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mail/src/test/java/com/neo/MailApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MailApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-swagger/src/main/java/com/neo/repository/MessageRepository.java:
--------------------------------------------------------------------------------
1 |
2 | package com.neo.repository;
3 |
4 | import com.neo.model.Message;
5 |
6 | import java.util.List;
7 |
8 | public interface MessageRepository {
9 |
10 | List findAll();
11 |
12 | Message save(Message message);
13 |
14 | Message update(Message message);
15 |
16 | Message updateText(Message message);
17 |
18 | Message findMessage(Long id);
19 |
20 | void deleteMessage(Long id);
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/test/java/com/neo/TLayoutApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 TLayoutApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-mail/src/test/java/com/neo/MailApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MailApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-admin-simple/spring-boot-admin-client/src/test/java/com/neo/AdminClientApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 AdminClientApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-admin-simple/spring-boot-admin-server/src/test/java/com/neo/AdminServerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 AdminServerApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-multi-mongodb/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-admin-simple/spring-boot-admin-client/src/test/java/com/neo/AdminClientApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 AdminClientApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-admin-simple/spring-boot-admin-server/src/test/java/com/neo/AdminServerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 AdminServerApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-docker/src/test/java/com/neo/DockerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 DockerApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello docker");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-annotation/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-mulidatasource/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/test/java/com/neo/RabbitMQApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 RabbitMQApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/test/java/com/neo/RabbitMQApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 RabbitMQApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-scheduler/src/test/java/com/neo/SchedulerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 SchedulerApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-scheduler/src/test/java/com/neo/SchedulerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 SchedulerApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | mybatis.config-location=classpath:mybatis/mybatis-config.xml
2 | mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
3 | mybatis.type-aliases-package=com.neo.model
4 |
5 | spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
6 | spring.datasource.username=root
7 | spring.datasource.password=root
8 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
9 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | mybatis.config-location=classpath:mybatis/mybatis-config.xml
2 | mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
3 | mybatis.type-aliases-package=com.neo.model
4 |
5 | spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
6 | spring.datasource.username=root
7 | spring.datasource.password=root
8 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
9 |
--------------------------------------------------------------------------------
/spring-boot-scheduler/src/main/java/com/neo/SchedulerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 SchedulerApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(SchedulerApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mybatis-annotation-mulidatasource/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-scheduler/src/main/java/com/neo/SchedulerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 SchedulerApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(SchedulerApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-mongodb/src/test/java/com/neo/MongoDBApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MongoDBApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-mongodb/src/test/java/com/neo/MongoDBApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MongoDBApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-package-war/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.SpringApplicationConfiguration;
6 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
7 |
8 | @RunWith(SpringJUnit4ClassRunner.class)
9 | @SpringApplicationConfiguration(classes = Application.class)
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-package-war/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.SpringApplicationConfiguration;
6 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
7 |
8 | @RunWith(SpringJUnit4ClassRunner.class)
9 | @SpringApplicationConfiguration(classes = Application.class)
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml/src/test/java/com/neo/MybatisXmlApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MybatisXmlApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/java/com/neo/web/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.web;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.ui.ModelMap;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 |
7 | @Controller
8 | public class HelloController {
9 |
10 | @RequestMapping("/")
11 | public String index(ModelMap map) {
12 | map.addAttribute("message", "http://www.ityouknow.com");
13 | return "hello";
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/if.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example If/Unless
6 |
7 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/switch.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example switch
6 |
7 |
8 |
9 |
10 |
她是一个姑娘...
11 |
这是一个爷们!
12 |
13 |
未知性别的一个家伙。
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/test/java/com/neo/MXMApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MXMApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/neo/MybatisXmlApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.neo.mapper")
9 | public class MybatisXmlApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(MybatisXmlApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-xml/src/test/java/com/neo/MybatisXmlApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MybatisXmlApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/java/com/neo/web/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.web;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.ui.ModelMap;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 |
7 | @Controller
8 | public class HelloController {
9 |
10 | @RequestMapping("/")
11 | public String index(ModelMap map) {
12 | map.addAttribute("message", "http://www.ityouknow.com");
13 | return "hello";
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/if.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example If/Unless
6 |
7 |
8 |
14 |
15 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/switch.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example switch
6 |
7 |
8 |
9 |
10 |
她是一个姑娘...
11 |
这是一个爷们!
12 |
13 |
未知性别的一个家伙。
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/spring-boot-commandLineRunner/src/main/java/com/neo/runner/OrderRunner1.java:
--------------------------------------------------------------------------------
1 | package com.neo.runner;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.core.annotation.Order;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @Order(1)
9 | public class OrderRunner1 implements CommandLineRunner {
10 |
11 | @Override
12 | public void run(String... args) throws Exception {
13 | System.out.println("The OrderRunner1 start to initialize ...");
14 | }
15 | }
--------------------------------------------------------------------------------
/spring-boot-commandLineRunner/src/main/java/com/neo/runner/OrderRunner2.java:
--------------------------------------------------------------------------------
1 | package com.neo.runner;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.core.annotation.Order;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @Order(2)
9 | public class OrderRunner2 implements CommandLineRunner {
10 |
11 | @Override
12 | public void run(String... args) throws Exception {
13 | System.out.println("The OrderRunner2 start to initialize ...");
14 | }
15 | }
--------------------------------------------------------------------------------
/spring-boot-jpa-thymeleaf-curd/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://127.0.0.1/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC&useSSL=true
2 | spring.datasource.username=root
3 | spring.datasource.password=root
4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
5 |
6 | spring.jpa.properties.hibernate.hbm2ddl.auto=create
7 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
8 | spring.jpa.show-sql= true
9 |
10 | spring.thymeleaf.cache=false
11 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml-mulidatasource/src/test/java/com/neo/MXMApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MXMApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-xml/src/main/java/com/neo/MybatisXmlApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.neo.mapper")
9 | public class MybatisXmlApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(MybatisXmlApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoReceiver1.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "neo")
9 | public class NeoReceiver1 {
10 |
11 | @RabbitHandler
12 | public void process(String neo) {
13 | System.out.println("Receiver 1: " + neo);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoReceiver2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "neo")
9 | public class NeoReceiver2 {
10 |
11 | @RabbitHandler
12 | public void process(String neo) {
13 | System.out.println("Receiver 2: " + neo);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/eq.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example gt eq
6 |
7 |
8 |
9 |
EQ
10 |
11 |
12 |
13 |
14 |
favorites
15 |
16 |
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-jpa-thymeleaf-curd/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://127.0.0.1/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC&useSSL=true
2 | spring.datasource.username=root
3 | spring.datasource.password=root
4 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver
5 |
6 | spring.jpa.properties.hibernate.hbm2ddl.auto=update
7 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
8 | spring.jpa.show-sql= true
9 |
10 | spring.thymeleaf.cache=false
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoReceiver1.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "neo")
9 | public class NeoReceiver1 {
10 |
11 | @RabbitHandler
12 | public void process(String neo) {
13 | System.out.println("Receiver 1: " + neo);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoReceiver2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "neo")
9 | public class NeoReceiver2 {
10 |
11 | @RabbitHandler
12 | public void process(String neo) {
13 | System.out.println("Receiver 2: " + neo);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-commandLineRunner/src/main/java/com/neo/runner/OrderRunner1.java:
--------------------------------------------------------------------------------
1 | package com.neo.runner;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.core.annotation.Order;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @Order(1)
9 | public class OrderRunner1 implements CommandLineRunner {
10 |
11 | @Override
12 | public void run(String... args) throws Exception {
13 | System.out.println("The OrderRunner1 start to initialize ...");
14 | }
15 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-commandLineRunner/src/main/java/com/neo/runner/OrderRunner2.java:
--------------------------------------------------------------------------------
1 | package com.neo.runner;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.core.annotation.Order;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @Order(2)
9 | public class OrderRunner2 implements CommandLineRunner {
10 |
11 | @Override
12 | public void run(String... args) throws Exception {
13 | System.out.println("The OrderRunner2 start to initialize ...");
14 | }
15 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa-thymeleaf-curd/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:mysql://127.0.0.1/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC&useSSL=true
2 | spring.datasource.username=root
3 | spring.datasource.password=root
4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
5 |
6 | spring.jpa.properties.hibernate.hbm2ddl.auto=create
7 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
8 | spring.jpa.show-sql= true
9 |
10 | spring.thymeleaf.cache=false
--------------------------------------------------------------------------------
/2.x/spring-boot-mongodb/spring-boot-multi-mongodb/src/test/java/com/neo/MultiMongodbApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MultiMongodbApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoReceiver1.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "neo")
9 | public class NeoReceiver1 {
10 |
11 | @RabbitHandler
12 | public void process(String neo) {
13 | System.out.println("Receiver 1: " + neo);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoReceiver2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "neo")
9 | public class NeoReceiver2 {
10 |
11 | @RabbitHandler
12 | public void process(String neo) {
13 | System.out.println("Receiver 2: " + neo);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/eq.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example gt eq
6 |
7 |
8 |
9 |
EQ
10 |
11 |
12 |
13 |
14 |
favorites
15 |
16 |
17 |
--------------------------------------------------------------------------------
/spring-boot-mongodb/spring-boot-multi-mongodb/src/test/java/com/neo/MultiMongodbApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MultiMongodbApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-annotation-mulidatasource/src/test/java/com/neo/MAMApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MAMApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-annotation-mulidatasource/src/test/java/com/neo/MAMApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MAMApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-annotation/src/test/java/com/neo/MybatisAnnotationApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MybatisAnnotationApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-annotation/src/test/java/com/neo/MybatisAnnotationApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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 MybatisAnnotationApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | System.out.println("hello world");
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/neo/MybatisAnnotationApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.neo.mapper")
9 | public class MybatisAnnotationApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(MybatisAnnotationApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-package-war/src/main/java/com/neo/ServletInitializer.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder;
4 | import org.springframework.boot.context.web.SpringBootServletInitializer;
5 |
6 | /**
7 | * Created by summer on 2017/5/8.
8 | */
9 | public class ServletInitializer extends SpringBootServletInitializer {
10 | @Override
11 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
12 | return application.sources(Application.class);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-web/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class ApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello web");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mybatis/spring-boot-mybatis-annotation/src/main/java/com/neo/MybatisAnnotationApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.neo.mapper")
9 | public class MybatisAnnotationApplication {
10 |
11 | public static void main(String[] args) {
12 | SpringApplication.run(MybatisAnnotationApplication.class, args);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/2.x/spring-boot-package-war/src/main/java/com/neo/ServletInitializer.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder;
4 | import org.springframework.boot.context.web.SpringBootServletInitializer;
5 |
6 | /**
7 | * Created by summer on 2017/5/8.
8 | */
9 | public class ServletInitializer extends SpringBootServletInitializer {
10 | @Override
11 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
12 | return application.sources(Application.class);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/spring-boot-mail/src/main/java/com/neo/service/MailService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | /**
4 | * Created by summer on 2017/5/4.
5 | */
6 | public interface MailService {
7 |
8 | void sendSimpleMail(String to, String subject, String content);
9 |
10 | void sendHtmlMail(String to, String subject, String content);
11 |
12 | void sendAttachmentsMail(String to, String subject, String content, String filePath);
13 |
14 | void sendInlineResourceMail(String to, String subject, String content, String rscPath, String rscId);
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverB.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.B")
9 | public class FanoutReceiverB {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver B: " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverC.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.C")
9 | public class FanoutReceiverC {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver C: " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/topic/TopicReceiver.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.topic;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "topic.message")
9 | public class TopicReceiver {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("Topic Receiver1 : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-web/src/test/java/com/neo/WebApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class WebApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello web");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/1.x/spring-boot-helloWorld/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class ApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello word");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverA.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.A")
9 | public class FanoutReceiverA {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver A : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverB.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.B")
9 | public class FanoutReceiverB {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver B: " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverC.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.C")
9 | public class FanoutReceiverC {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver C: " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/topic/TopicReceiver.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.topic;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "topic.message")
9 | public class TopicReceiver {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("Topic Receiver1 : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/topic/TopicReceiver2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.topic;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "topic.messages")
9 | public class TopicReceiver2 {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("Topic Receiver2 : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-helloWorld/src/test/java/com/neo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class ApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello word");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-mail/src/main/java/com/neo/service/MailService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | /**
4 | * Created by summer on 2017/5/4.
5 | */
6 | public interface MailService {
7 |
8 | void sendSimpleMail(String to, String subject, String content);
9 |
10 | void sendHtmlMail(String to, String subject, String content);
11 |
12 | void sendAttachmentsMail(String to, String subject, String content, String filePath);
13 |
14 | void sendInlineResourceMail(String to, String subject, String content, String rscPath, String rscId);
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverA.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.A")
9 | public class FanoutReceiverA {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver A : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverB.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.B")
9 | public class FanoutReceiverB {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver B: " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverC.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.C")
9 | public class FanoutReceiverC {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver C: " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/topic/TopicReceiver.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.topic;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "topic.message")
9 | public class TopicReceiver {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("Topic Receiver1 : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/topic/TopicReceiver2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.topic;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "topic.messages")
9 | public class TopicReceiver2 {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("Topic Receiver2 : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-web/src/test/java/com/neo/WebApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class WebApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello web");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutReceiverA.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "fanout.A")
9 | public class FanoutReceiverA {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("fanout Receiver A : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/topic/TopicReceiver2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.topic;
2 |
3 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
4 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @RabbitListener(queues = "topic.messages")
9 | public class TopicReceiver2 {
10 |
11 | @RabbitHandler
12 | public void process(String message) {
13 | System.out.println("Topic Receiver2 : " + message);
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/spring-boot-redis/src/test/java/com/neo/RedisApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class RedisApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello web");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-redis/src/test/java/com/neo/RedisApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class RedisApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello web");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/spring-boot-scheduler/src/main/java/com/neo/task/SchedulerTask.java:
--------------------------------------------------------------------------------
1 | package com.neo.task;
2 |
3 | import org.springframework.scheduling.annotation.Scheduled;
4 | import org.springframework.stereotype.Component;
5 |
6 | import java.util.Date;
7 |
8 | /**
9 | * Created by summer on 2016/12/1.
10 | */
11 |
12 | @Component
13 | public class SchedulerTask {
14 |
15 | private int count=0;
16 |
17 | @Scheduled(cron="*/6 * * * * ?")
18 | private void process(){
19 | System.out.println("this is scheduler task runing "+(count++));
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/string.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example String
6 |
7 |
8 |
9 |
text
10 |
neo
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/1.x/spring-boot-scheduler/src/main/java/com/neo/task/SchedulerTask.java:
--------------------------------------------------------------------------------
1 | package com.neo.task;
2 |
3 | import org.springframework.scheduling.annotation.Scheduled;
4 | import org.springframework.stereotype.Component;
5 |
6 | import java.util.Date;
7 |
8 | /**
9 | * Created by summer on 2016/12/1.
10 | */
11 |
12 | @Component
13 | public class SchedulerTask {
14 |
15 | private int count=0;
16 |
17 | @Scheduled(cron="*/6 * * * * ?")
18 | private void process(){
19 | System.out.println("this is scheduler task runing "+(count++));
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/2.x/spring-boot-docker/src/test/java/com/neo/DockerApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class DockerApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello docker");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-scheduler/src/main/java/com/neo/task/SchedulerTask.java:
--------------------------------------------------------------------------------
1 | package com.neo.task;
2 |
3 | import org.springframework.scheduling.annotation.Scheduled;
4 | import org.springframework.stereotype.Component;
5 |
6 | import java.util.Date;
7 |
8 | /**
9 | * Created by summer on 2016/12/1.
10 | */
11 |
12 | @Component
13 | public class SchedulerTask {
14 |
15 | private int count=0;
16 |
17 | @Scheduled(cron="*/6 * * * * ?")
18 | private void process(){
19 | System.out.println("this is scheduler task runing "+(count++));
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf/src/main/resources/templates/string.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Example String
6 |
7 |
8 |
9 |
text
10 |
neo
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/1.x/spring-boot-actuator/src/test/java/com/neo/ActuatorApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class ActuatorApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello word");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-actuator/src/test/java/com/neo/ActuatorApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class ActuatorApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("hello word");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/object/ObjectReceiver.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.object;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
5 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
6 | import org.springframework.stereotype.Component;
7 |
8 | @Component
9 | @RabbitListener(queues = "object")
10 | public class ObjectReceiver {
11 |
12 | @RabbitHandler
13 | public void process(User user) {
14 | System.out.println("Receiver object : " + user);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/1.x/spring-boot-multi-mongodb/src/main/java/com/neo/config/PrimaryMongoConfig.java:
--------------------------------------------------------------------------------
1 | package com.neo.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
5 |
6 | /**
7 | * @author neo
8 | */
9 | @Configuration
10 | @EnableMongoRepositories(basePackages = "com.neo.model.repository.primary",
11 | mongoTemplateRef = PrimaryMongoConfig.MONGO_TEMPLATE)
12 | public class PrimaryMongoConfig {
13 |
14 | protected static final String MONGO_TEMPLATE = "primaryMongoTemplate";
15 | }
16 |
--------------------------------------------------------------------------------
/1.x/spring-boot-multi-mongodb/src/main/java/com/neo/config/props/MultipleMongoProperties.java:
--------------------------------------------------------------------------------
1 | package com.neo.config.props;
2 |
3 | import lombok.Data;
4 | import org.springframework.boot.autoconfigure.mongo.MongoProperties;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 |
7 | /**
8 | * @author neo
9 | */
10 | @Data
11 | @ConfigurationProperties(prefix = "mongodb")
12 | public class MultipleMongoProperties {
13 |
14 | private MongoProperties primary = new MongoProperties();
15 | private MongoProperties secondary = new MongoProperties();
16 | }
17 |
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/object/ObjectReceiver.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.object;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
5 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
6 | import org.springframework.stereotype.Component;
7 |
8 | @Component
9 | @RabbitListener(queues = "object")
10 | public class ObjectReceiver {
11 |
12 | @RabbitHandler
13 | public void process(User user) {
14 | System.out.println("Receiver object : " + user);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/2.x/spring-boot-hello/src/test/java/com/neo/HelloApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class HelloApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("Hello Spring Boot 2.0!");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/object/ObjectReceiver.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.object;
2 |
3 | import com.neo.model.User;
4 | import org.springframework.amqp.rabbit.annotation.RabbitHandler;
5 | import org.springframework.amqp.rabbit.annotation.RabbitListener;
6 | import org.springframework.stereotype.Component;
7 |
8 | @Component
9 | @RabbitListener(queues = "object")
10 | public class ObjectReceiver {
11 |
12 | @RabbitHandler
13 | public void process(User user) {
14 | System.out.println("Receiver object : " + user);
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/spring-boot-package/spring-boot-package-war/src/main/java/com/neo/ServletInitializer.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder;
4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
5 |
6 | /**
7 | * Created by summer on 2017/5/8.
8 | */
9 | public class ServletInitializer extends SpringBootServletInitializer {
10 | @Override
11 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
12 | return application.sources(Application.class);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-mail/src/main/java/com/neo/service/MailService.java:
--------------------------------------------------------------------------------
1 | package com.neo.service;
2 |
3 | /**
4 | * Created by summer on 2017/5/4.
5 | */
6 | public interface MailService {
7 |
8 | public void sendSimpleMail(String to, String subject, String content);
9 |
10 | public void sendHtmlMail(String to, String subject, String content);
11 |
12 | public void sendAttachmentsMail(String to, String subject, String content, String filePath);
13 |
14 | public void sendInlineResourceMail(String to, String subject, String content, String rscPath, String rscId);
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Layout
6 |
7 |
8 |
9 |
10 |
11 |
content
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/layout.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Layout
6 |
7 |
8 |
9 |
10 |
11 |
content
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/1.x/spring-boot-multi-mongodb/src/main/java/com/neo/config/SecondaryMongoConfig.java:
--------------------------------------------------------------------------------
1 | package com.neo.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
5 |
6 | /**
7 | * @author neo
8 | */
9 | @Configuration
10 | @EnableMongoRepositories(basePackages = "com.neo.model.repository.secondary",
11 | mongoTemplateRef = SecondaryMongoConfig.MONGO_TEMPLATE)
12 | public class SecondaryMongoConfig {
13 |
14 | protected static final String MONGO_TEMPLATE = "secondaryMongoTemplate";
15 | }
16 |
--------------------------------------------------------------------------------
/dockercompose-springboot-mysql-nginx/nginx/conf.d/app.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | charset utf-8;
4 | access_log off;
5 |
6 | location / {
7 | proxy_pass http://app:8080;
8 | proxy_set_header Host $host:$server_port;
9 | proxy_set_header X-Forwarded-Host $server_name;
10 | proxy_set_header X-Real-IP $remote_addr;
11 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12 | }
13 |
14 | location /static {
15 | access_log off;
16 | expires 30d;
17 |
18 | alias /app/static;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/2.x/dockercompose-springboot-mysql-nginx/nginx/conf.d/app.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | charset utf-8;
4 | access_log off;
5 |
6 | location / {
7 | proxy_pass http://app:8080;
8 | proxy_set_header Host $host:$server_port;
9 | proxy_set_header X-Forwarded-Host $server_name;
10 | proxy_set_header X-Real-IP $remote_addr;
11 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12 | }
13 |
14 | location /static {
15 | access_log off;
16 | expires 30d;
17 |
18 | alias /app/static;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/2.x/spring-boot-elasticsearch/src/test/java/com/neo/ElasticsearchApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class ElasticsearchApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("Spring Boot Test");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-jpa/spring-boot-multi-Jpa/src/test/java/com/neo/MultiJpaApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class MultiJpaApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("Hello MultiJpa!");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/2.x/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | comm title
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/spring-boot-jpa/spring-boot-multi-Jpa/src/test/java/com/neo/MultiJpaApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.neo;
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.SpringJUnit4ClassRunner;
7 | import org.springframework.test.context.junit4.SpringRunner;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest
11 | public class MultiJpaApplicationTests {
12 |
13 | @Test
14 | public void contextLoads() {
15 | System.out.println("Hello MultiJpa!");
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/spring-boot-thymeleaf/spring-boot-thymeleaf-layout/src/main/resources/templates/base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | comm title
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/2.x/spring-boot-web/src/main/java/com/neo/web/HelloController.java:
--------------------------------------------------------------------------------
1 | package com.neo.web;
2 |
3 | import java.util.Locale;
4 | import java.util.UUID;
5 |
6 | import javax.servlet.http.HttpSession;
7 |
8 | import com.neo.model.User;
9 | import org.springframework.ui.Model;
10 | import org.springframework.web.bind.annotation.RequestMapping;
11 | import org.springframework.web.bind.annotation.RestController;
12 |
13 | @RestController
14 | public class HelloController {
15 |
16 | @RequestMapping("/hello")
17 | public String hello(Locale locale, Model model) {
18 | return "Hello World";
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/spring-boot-commandLineRunner/src/main/java/com/neo/CommandLineRunnerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 |
7 | @SpringBootApplication
8 | public class CommandLineRunnerApplication {
9 |
10 | public static void main(String[] args) {
11 | System.out.println("The service to start.");
12 | SpringApplication.run(CommandLineRunnerApplication.class, args);
13 | System.out.println("The service has started.");
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutSender.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class FanoutSender {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send() {
14 | String context = "hi, fanout msg ";
15 | System.out.println("Sender : " + context);
16 | this.rabbitTemplate.convertAndSend("fanoutExchange","", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoSender.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class NeoSender {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send(int i) {
14 | String context = "spirng boot neo queue"+" ****** "+i;
15 | System.out.println("Sender1 : " + context);
16 | this.rabbitTemplate.convertAndSend("neo", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoSender2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class NeoSender2 {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send(int i) {
14 | String context = "spirng boot neo queue"+" ****** "+i;
15 | System.out.println("Sender2 : " + context);
16 | this.rabbitTemplate.convertAndSend("neo", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutSender.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class FanoutSender {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send() {
14 | String context = "hi, fanout msg ";
15 | System.out.println("Sender : " + context);
16 | this.rabbitTemplate.convertAndSend("fanoutExchange","", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoSender.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class NeoSender {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send(int i) {
14 | String context = "spirng boot neo queue"+" ****** "+i;
15 | System.out.println("Sender1 : " + context);
16 | this.rabbitTemplate.convertAndSend("neo", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/1.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoSender2.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class NeoSender2 {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send(int i) {
14 | String context = "spirng boot neo queue"+" ****** "+i;
15 | System.out.println("Sender2 : " + context);
16 | this.rabbitTemplate.convertAndSend("neo", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-commandLineRunner/src/main/java/com/neo/CommandLineRunnerApplication.java:
--------------------------------------------------------------------------------
1 | package com.neo;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 |
7 | @SpringBootApplication
8 | public class CommandLineRunnerApplication {
9 |
10 | public static void main(String[] args) {
11 | System.out.println("The service to start.");
12 | SpringApplication.run(CommandLineRunnerApplication.class, args);
13 | System.out.println("The service has started.");
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/fanout/FanoutSender.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.fanout;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class FanoutSender {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send() {
14 | String context = "hi, fanout msg ";
15 | System.out.println("Sender : " + context);
16 | this.rabbitTemplate.convertAndSend("fanoutExchange","", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/2.x/spring-boot-rabbitmq/src/main/java/com/neo/rabbit/many/NeoSender.java:
--------------------------------------------------------------------------------
1 | package com.neo.rabbit.many;
2 |
3 | import org.springframework.amqp.core.AmqpTemplate;
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class NeoSender {
9 |
10 | @Autowired
11 | private AmqpTemplate rabbitTemplate;
12 |
13 | public void send(int i) {
14 | String context = "spirng boot neo queue"+" ****** "+i;
15 | System.out.println("Sender1 : " + context);
16 | this.rabbitTemplate.convertAndSend("neo", context);
17 | }
18 |
19 | }
--------------------------------------------------------------------------------