├── .gitignore ├── README.md ├── pom.xml ├── spring-boot-cache ├── pom.xml ├── spring-boot-springcache-ehcache │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springcache │ │ │ │ └── ehcache │ │ │ │ ├── SpringBootSpringcacheEhcacheApplication.java │ │ │ │ ├── config │ │ │ │ └── MyKeyGenerator.java │ │ │ │ ├── pojo │ │ │ │ └── User.java │ │ │ │ └── service │ │ │ │ └── UserService.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── ehcache.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── springcache │ │ └── ehcache │ │ └── SpringBootSpringcacheEhcacheApplicationTests.java └── spring-boot-springcache-redis │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── springcache │ │ │ └── redis │ │ │ ├── SpringBootSpringcacheRedisApplication.java │ │ │ ├── config │ │ │ └── MyKeyGenerator.java │ │ │ ├── pojo │ │ │ └── User.java │ │ │ └── service │ │ │ └── UserService.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── springcache │ └── redis │ └── SpringBootSpringcacheRedisApplicationTests.java ├── spring-boot-dao ├── pom.xml ├── spring-boot-jdbctemplate │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── jdbctemplate │ │ │ │ ├── SpringBootJdbctemplateApplication.java │ │ │ │ ├── pojo │ │ │ │ └── User.java │ │ │ │ └── service │ │ │ │ └── UserService.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── jdbctemplate │ │ └── SpringBootJdbctemplateApplicationTests.java ├── spring-boot-jdbctemplatemulti │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── jdbctemplatemulti │ │ │ │ ├── SpringBootJdbctemplatemultiApplication.java │ │ │ │ ├── config │ │ │ │ ├── DataSourceConfig.java │ │ │ │ └── JdbcTemplateConfig.java │ │ │ │ ├── pojo │ │ │ │ └── User.java │ │ │ │ ├── service1 │ │ │ │ └── UserService1.java │ │ │ │ └── service2 │ │ │ │ └── UserService2.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── jdbctemplatemulti │ │ └── SpringBootJdbctemplatemultiApplicationTests.java ├── spring-boot-jpa │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── jpa │ │ │ │ ├── SpringBootJpaApplication.java │ │ │ │ ├── dao │ │ │ │ └── BookDao.java │ │ │ │ └── pojo │ │ │ │ └── Book.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── jpa │ │ └── SpringBootJpaApplicationTests.java ├── spring-boot-jpamulti │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── jpamulti │ │ │ │ ├── SpringBootJpamultiApplication.java │ │ │ │ ├── config │ │ │ │ ├── DataSourceConfig.java │ │ │ │ ├── JpaConfig1.java │ │ │ │ └── JpaConfig2.java │ │ │ │ ├── dao1 │ │ │ │ └── BookDao1.java │ │ │ │ ├── dao2 │ │ │ │ └── BookDao2.java │ │ │ │ └── pojo │ │ │ │ └── Book.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── jpamulti │ │ └── SpringBootJpamultiApplicationTests.java ├── spring-boot-mybatis-mybatisplus │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── mybatis │ │ │ │ └── mybatisplusmulti │ │ │ │ ├── SpringBootMybatisMybatisplusApplication.java │ │ │ │ ├── config │ │ │ │ └── MyBatisPlusConfig.java │ │ │ │ ├── mapper │ │ │ │ ├── UserMapper.java │ │ │ │ └── UserMapper.xml │ │ │ │ ├── pojo │ │ │ │ └── User.java │ │ │ │ └── service │ │ │ │ ├── UserService.java │ │ │ │ └── impl │ │ │ │ └── UserServiceImpl.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── mybatis │ │ └── mybatisplusmulti │ │ ├── SpringBootMybatisMybatisplusApplicationTests.java │ │ ├── UserMapperTests.java │ │ └── UserServiceTests.java ├── spring-boot-mybatis-mybatisplusmulti │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── mybatis │ │ │ │ └── mybatisplusmulti │ │ │ │ ├── SpringBootMybatisMybatisplusmultiApplication.java │ │ │ │ ├── config │ │ │ │ └── MyBatisPlusConfig.java │ │ │ │ ├── mapper │ │ │ │ └── UserMapper.java │ │ │ │ ├── pojo │ │ │ │ └── User.java │ │ │ │ └── service │ │ │ │ ├── UserService.java │ │ │ │ └── impl │ │ │ │ └── UserServiceImpl.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── mybatis │ │ └── mybatisplusmulti │ │ ├── SpringBootMybatisMybatisplusmultiApplicationTests.java │ │ └── UserServiceTests.java ├── spring-boot-mybatis-tkmybatis │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── mybatis │ │ │ │ └── tkmybatis │ │ │ │ ├── SpringBootMybatisTkmybatisApplication.java │ │ │ │ ├── mapper │ │ │ │ ├── UserMapper.java │ │ │ │ └── UserMapper.xml │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── mybatis │ │ └── tkmybatis │ │ └── SpringBootMybatisTkmybatisApplicationTests.java ├── spring-boot-mybatis │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── mybatis │ │ │ │ ├── SpringBootMybatisApplication.java │ │ │ │ ├── mapper │ │ │ │ ├── UserMapper.java │ │ │ │ ├── UserMapper.xml │ │ │ │ └── UserMapper2.java │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── mapper │ │ │ └── UserMapper.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── mybatis │ │ └── SpringBootMybatisApplicationTests.java └── spring-boot-mybatismulti │ ├── .gitignore │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── mybatismulti │ │ │ ├── SpringBootMybatismultiApplication.java │ │ │ ├── config │ │ │ ├── DataSourceConfig.java │ │ │ ├── MyBatisConfigOne.java │ │ │ └── MyBatisConfigTwo.java │ │ │ ├── mapper1 │ │ │ ├── UserMapper1.java │ │ │ └── UserMapper1.xml │ │ │ ├── mapper2 │ │ │ ├── UserMapper2.java │ │ │ └── UserMapper2.xml │ │ │ └── pojo │ │ │ └── User.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── mybatismulti │ └── SpringBootMybatismultiApplicationTests.java ├── spring-boot-devtools ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── devtools │ │ │ ├── SpringBootDevtoolsApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ ├── .trigger-file │ │ ├── application.properties │ │ └── static │ │ └── index.html │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── devtools │ └── SpringBootDevtoolsApplicationTests.java ├── spring-boot-helloworld ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── helloworld │ │ │ ├── SpringBootHelloworldApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── helloworld │ └── SpringBootHelloworldApplicationTests.java ├── spring-boot-mail ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── mail │ │ │ └── SpringBootMailApplication.java │ └── resources │ │ ├── application.properties │ │ └── templates │ │ ├── mail.ftl │ │ └── mail.html │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── mail │ └── SpringBootMailApplicationTests.java ├── spring-boot-message ├── pom.xml ├── spring-boot-activemq │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── activemq │ │ │ │ ├── SpringBootActivemqApplication.java │ │ │ │ ├── config │ │ │ │ └── ActiveMQConfig.java │ │ │ │ ├── pojo │ │ │ │ └── Message.java │ │ │ │ └── receiver │ │ │ │ └── ActiveMQReceiver.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── activemq │ │ └── SpringBootActivemqApplicationTests.java ├── spring-boot-rabbitmq │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── rabbitmq │ │ │ │ ├── SpringBootRabbitmqApplication.java │ │ │ │ ├── config │ │ │ │ ├── RabbitMQDirectConfig.java │ │ │ │ ├── RabbitMQFanoutConfig.java │ │ │ │ ├── RabbitMQHeadersConfig.java │ │ │ │ └── RabbitMQTopicConfig.java │ │ │ │ └── receiver │ │ │ │ ├── DirectReceiver.java │ │ │ │ ├── FanoutReceiver.java │ │ │ │ ├── HeadersReceiver.java │ │ │ │ └── TopicReceiver.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── rabbitmq │ │ └── SpringBootRabbitmqApplicationTests.java ├── spring-boot-websocket-groupchat │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── websocket │ │ │ │ └── groupchat │ │ │ │ ├── SpringBootWebsocketGroupchatApplication.java │ │ │ │ ├── config │ │ │ │ └── WebSocketConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ └── pojo │ │ │ │ └── GroupChatMessage.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── static │ │ │ └── groupchat.html │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── websocket │ │ └── groupchat │ │ └── SpringBootWebsocketGroupchatApplicationTests.java └── spring-boot-websocket-privatechat │ ├── .gitignore │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zhengjian │ │ │ └── sample │ │ │ └── springboot │ │ │ └── websocket │ │ │ └── privatechat │ │ │ ├── SpringBootWebsocketPrivatechatApplication.java │ │ │ ├── config │ │ │ ├── SecurityConfig.java │ │ │ └── WebSocketConfig.java │ │ │ ├── controller │ │ │ └── HelloController.java │ │ │ └── pojo │ │ │ └── PrivateChatMessage.java │ └── resources │ │ ├── application.properties │ │ └── static │ │ └── privatechat.html │ └── test │ └── java │ └── com │ └── zhengjian │ └── sample │ └── springboot │ └── websocket │ └── privatechat │ └── SpringBootWebsocketPrivatechatApplicationTests.java ├── spring-boot-monitor ├── pom.xml ├── spring-boot-admin-client │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── admin │ │ │ │ └── client │ │ │ │ ├── SpringBootAdminClientApplication.java │ │ │ │ └── config │ │ │ │ ├── MyHealthIndicator.java │ │ │ │ ├── MyInfoContributor.java │ │ │ │ └── SecurityConfig.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── admin │ │ └── client │ │ └── SpringBootAdminClientApplicationTests.java └── spring-boot-admin-server │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zhengjian │ │ │ └── sample │ │ │ └── springboot │ │ │ └── admin │ │ │ └── server │ │ │ └── SpringBootAdminServerApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── zhengjian │ └── sample │ └── springboot │ └── admin │ └── server │ └── SpringBootAdminServerApplicationTests.java ├── spring-boot-nosql ├── pom.xml ├── spring-boot-elasticsearch │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── elasticsearch │ │ │ │ ├── SpringBootElasticsearchApplication.java │ │ │ │ ├── pojo │ │ │ │ └── EsUser.java │ │ │ │ └── repository │ │ │ │ └── EsUserRepository.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── elasticsearch │ │ └── SpringBootElasticsearchApplicationTests.java ├── spring-boot-mongodb │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── mongodb │ │ │ │ ├── SpringBootMongodbApplication.java │ │ │ │ ├── dao │ │ │ │ └── BookDao.java │ │ │ │ └── pojo │ │ │ │ └── Book.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── mongodb │ │ └── SpringBootMongodbApplicationTests.java ├── spring-boot-redis-springsession │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── redis │ │ │ │ └── springsession │ │ │ │ ├── SpringBootRedisSpringsessionApplication.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── redis │ │ └── springsession │ │ └── SpringBootRedisSpringsessionApplicationTests.java └── spring-boot-redis │ ├── .gitignore │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── redis │ │ │ ├── SpringBootRedisApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── redis │ └── SpringBootRedisApplicationTests.java ├── spring-boot-profile ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zhengjian │ │ │ └── sample │ │ │ └── springboot │ │ │ └── profile │ │ │ └── SpringBootProfileApplication.java │ └── resources │ │ ├── application-dev.properties │ │ ├── application-prod.properties │ │ ├── application-test.properties │ │ └── application.properties │ └── test │ └── java │ └── com │ └── zhengjian │ └── sample │ └── springboot │ └── profile │ └── SpringBootProfileApplicationTests.java ├── spring-boot-properties ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── properties │ │ │ ├── SpringBootPropertiesApplication.java │ │ │ └── pojo │ │ │ └── Book.java │ └── resources │ │ ├── application.properties │ │ └── book.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── properties │ └── SpringBootPropertiesApplicationTests.java ├── spring-boot-rest ├── pom.xml ├── spring-boot-jparest │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── jparest │ │ │ │ ├── SpringBootJparestApplication.java │ │ │ │ ├── config │ │ │ │ └── RestConfig.java │ │ │ │ ├── dao │ │ │ │ └── BookDao.java │ │ │ │ └── pojo │ │ │ │ └── Book.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── jparest │ │ └── SpringBootJparestApplicationTests.java └── spring-boot-mongodbrest │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zhengjian │ │ │ └── sample │ │ │ └── springboot │ │ │ └── mongodbrest │ │ │ ├── SpringBootMongodbrestApplication.java │ │ │ ├── config │ │ │ └── RestConfig.java │ │ │ ├── dao │ │ │ └── BookDao.java │ │ │ └── pojo │ │ │ └── Book.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── zhengjian │ └── sample │ └── springboot │ └── mongodbrest │ └── SpringBootMongodbrestApplicationTests.java ├── spring-boot-security ├── pom.xml ├── security.sql ├── spring-boot-shriojava │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── shriojava │ │ │ │ ├── SpringBootShriojavaApplication.java │ │ │ │ ├── config │ │ │ │ └── ShiroConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ └── realm │ │ │ │ └── MyRealm.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── shriojava │ │ └── SpringBootShriojavaApplicationTests.java ├── spring-boot-shriostarter │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── shriostarter │ │ │ │ ├── SpringBootShriostarterApplication.java │ │ │ │ ├── config │ │ │ │ └── ShiroConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ └── realm │ │ │ │ └── MyRealm.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── shriostarter │ │ └── SpringBootShriostarterApplicationTests.java ├── spring-boot-springsecurity-helloworld │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── helloworld │ │ │ │ ├── SpringBootSpringsecurityHelloworldApplication.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── helloworld │ │ └── SpringBootSpringsecurityHelloworldApplicationTests.java ├── spring-boot-springsecurity-httpsecurity │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── httpsecurity │ │ │ │ ├── SpringBootSpringsecurityHttpsecurityApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── httpsecurity │ │ └── SpringBootSpringsecurityHttpsecurityApplicationTests.java ├── spring-boot-springsecurity-httpsecuritymulti │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── httpsecuritymulti │ │ │ │ ├── SpringBootSpringsecurityHttpsecuritymultiApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── httpsecuritymulti │ │ └── SpringBootSpringsecurityHttpsecuritymultiApplicationTests.java ├── spring-boot-springsecurity-jwt │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── jwt │ │ │ │ ├── SpringBootSpringsecurityJwtApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ ├── filter │ │ │ │ ├── JwtFilter.java │ │ │ │ └── JwtLoginFilter.java │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── jwt │ │ └── SpringBootSpringsecurityJwtApplicationTests.java ├── spring-boot-springsecurity-login │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── login │ │ │ │ ├── SpringBootSpringsecurityLoginApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── login │ │ └── SpringBootSpringsecurityLoginApplicationTests.java ├── spring-boot-springsecurity-loginbyjson │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── loginbyjson │ │ │ │ ├── SpringBootSpringsecurityLoginbyjsonApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ └── filter │ │ │ │ └── MyUsernamePasswordAuthenticationFilter.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── loginbyjson │ │ └── SpringBootSpringsecurityLoginbyjsonApplicationTests.java ├── spring-boot-springsecurity-methodsecurity │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── methodsecurity │ │ │ │ ├── SpringBootSpringsecurityMethodsecurityApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ └── service │ │ │ │ └── HelloService.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── methodsecurity │ │ └── SpringBootSpringsecurityMethodsecurityApplicationTests.java ├── spring-boot-springsecurity-oauth2 │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── oauth2 │ │ │ │ ├── SpringBootSpringsecurityOauth2Application.java │ │ │ │ ├── config │ │ │ │ ├── MyAuthorizationServerConfigurer.java │ │ │ │ ├── MyResourceServerConfigurer.java │ │ │ │ └── SecurityConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── oauth2 │ │ └── SpringBootSpringsecurityOauth2ApplicationTests.java ├── spring-boot-springsecurity-urp │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── urp │ │ │ │ ├── SpringBootSpringsecurityUrpApplication.java │ │ │ │ ├── config │ │ │ │ ├── MyAccessDecisionManager.java │ │ │ │ ├── MySecurityMetadataSource.java │ │ │ │ └── SecurityConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ ├── mapper │ │ │ │ ├── MenuMapper.java │ │ │ │ ├── MenuMapper.xml │ │ │ │ ├── UserMapper.java │ │ │ │ └── UserMapper.xml │ │ │ │ ├── pojo │ │ │ │ ├── Menu.java │ │ │ │ ├── Role.java │ │ │ │ └── User.java │ │ │ │ └── service │ │ │ │ ├── MenuService.java │ │ │ │ └── UserService.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── urp │ │ └── SpringBootSpringsecurityUrpApplicationTests.java ├── spring-boot-springsecurity-user │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── user │ │ │ │ ├── SpringBootSpringsecurityUserApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── user │ │ └── SpringBootSpringsecurityUserApplicationTests.java ├── spring-boot-springsecurity-userdb │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── springsecurity │ │ │ │ └── userdb │ │ │ │ ├── SpringBootSpringsecurityUserdbApplication.java │ │ │ │ ├── config │ │ │ │ └── SecurityConfig.java │ │ │ │ ├── controller │ │ │ │ └── HelloController.java │ │ │ │ ├── mapper │ │ │ │ ├── UserMapper.java │ │ │ │ └── UserMapper.xml │ │ │ │ ├── pojo │ │ │ │ ├── Role.java │ │ │ │ └── User.java │ │ │ │ └── service │ │ │ │ └── UserService.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── springsecurity │ │ └── userdb │ │ └── SpringBootSpringsecurityUserdbApplicationTests.java └── spring-boot-springsecurity-verifycode │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── springsecurity │ │ │ └── verifycode │ │ │ ├── SpringBootSpringsecurityVerifycodeApplication.java │ │ │ ├── config │ │ │ ├── SecurityConfig.java │ │ │ ├── VerifyCode.java │ │ │ └── VerifyCodeFilter.java │ │ │ └── controller │ │ │ ├── HelloController.java │ │ │ └── VerifyCodeController.java │ └── resources │ │ ├── application.properties │ │ └── static │ │ └── vercode.html │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── springsecurity │ └── verifycode │ └── SpringBootSpringsecurityVerifycodeApplicationTests.java ├── spring-boot-starter ├── pom.xml ├── spring-boot-mystarter │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── mystarter │ │ │ ├── HelloProperties.java │ │ │ ├── HelloService.java │ │ │ └── HelloServiceAutoConfiguration.java │ │ └── resources │ │ └── META-INF │ │ └── spring.factories └── spring-boot-usemystarter │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── usemystarter │ │ │ └── SpringBootUsemystarterApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── usemystarter │ └── SpringBootUsemystarterApplicationTests.java ├── spring-boot-swagger2 ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── swagger2 │ │ │ ├── SpringBootSwagger2Application.java │ │ │ ├── bean │ │ │ └── User.java │ │ │ ├── config │ │ │ └── Swagger2Config.java │ │ │ └── controller │ │ │ └── UserController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── swagger2 │ └── SpringBootSwagger2ApplicationTests.java ├── spring-boot-task ├── pom.xml ├── spring-boot-quartz │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── quartz │ │ │ │ ├── SpringBootQuartzApplication.java │ │ │ │ ├── config │ │ │ │ └── QuartzConfig.java │ │ │ │ └── job │ │ │ │ ├── MyJob1.java │ │ │ │ └── MyJob2.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── quartz │ │ └── SpringBootQuartzApplicationTests.java └── spring-boot-scheduled │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── scheduled │ │ │ ├── MyScheduled.java │ │ │ └── SpringBootScheduledApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── scheduled │ └── SpringBootScheduledApplicationTests.java ├── spring-boot-test ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── test │ │ │ ├── SpringBootTestApplication.java │ │ │ ├── controller │ │ │ └── HelloController.java │ │ │ ├── pojo │ │ │ └── Book.java │ │ │ └── service │ │ │ └── HelloService.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── test │ ├── SpringBootTestApplicationTests.java │ ├── TestController.java │ ├── TestController2.java │ ├── TestJson.java │ ├── TestService.java │ └── book.json ├── spring-boot-tomcat ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── tomcat │ │ │ ├── SpringBootTomcatApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── cxy35 │ └── sample │ └── springboot │ └── tomcat │ └── SpringBootTomcatApplicationTests.java ├── spring-boot-war ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zhengjian │ │ │ └── sample │ │ │ └── springboot │ │ │ └── war │ │ │ ├── ServletInitializer.java │ │ │ └── SpringBootWarApplication.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── zhengjian │ └── sample │ └── springboot │ └── war │ └── SpringBootWarApplicationTests.java ├── spring-boot-web ├── pom.xml ├── spring-boot-aop │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── aop │ │ │ │ ├── SpringBootAopApplication.java │ │ │ │ ├── config │ │ │ │ └── LogComponent.java │ │ │ │ ├── controller │ │ │ │ └── UserController.java │ │ │ │ └── service │ │ │ │ └── UserService.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── aop │ │ └── SpringBootAopApplicationTests.java ├── spring-boot-controlleradvice │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── controlleradvice │ │ │ │ ├── SpringBootControlleradviceApplication.java │ │ │ │ ├── controller │ │ │ │ ├── MyControllerAdvice.java │ │ │ │ └── TestController.java │ │ │ │ └── pojo │ │ │ │ ├── Author.java │ │ │ │ └── Book.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── controlleradvice │ │ └── SpringBootControlleradviceApplicationTests.java ├── spring-boot-cors │ ├── pom.xml │ ├── spring-boot-corsconsumer │ │ ├── .gitignore │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── cxy35 │ │ │ │ │ └── sample │ │ │ │ │ └── springboot │ │ │ │ │ └── corsconsumer │ │ │ │ │ └── SpringBootCorsconsumerApplication.java │ │ │ └── resources │ │ │ │ ├── application.properties │ │ │ │ └── static │ │ │ │ ├── index.html │ │ │ │ └── jquery3.3.1.js │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── corsconsumer │ │ │ └── SpringBootCorsconsumerApplicationTests.java │ └── spring-boot-corsprovider │ │ ├── .gitignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── corsprovider │ │ │ │ ├── SpringBootCorsproviderApplication.java │ │ │ │ ├── config │ │ │ │ └── MyWebMvcConfigurer.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── corsprovider │ │ └── SpringBootCorsproviderApplicationTests.java ├── spring-boot-exception │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── exception │ │ │ │ ├── SpringBootExceptionApplication.java │ │ │ │ ├── config │ │ │ │ ├── MyErrorAttribute.java │ │ │ │ └── MyErrorViewResolver.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ ├── application.properties │ │ │ ├── static │ │ │ └── error │ │ │ │ ├── 404.html │ │ │ │ ├── 4xx.html │ │ │ │ ├── 500.html │ │ │ │ └── 5xx.html │ │ │ └── templates │ │ │ ├── cxy35.html │ │ │ └── error │ │ │ ├── 4xx.html │ │ │ └── 5xx.html │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── exception │ │ └── SpringBootExceptionApplicationTests.java ├── spring-boot-fileupload │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── fileupload │ │ │ │ ├── SpringBootFileuploadApplication.java │ │ │ │ └── controller │ │ │ │ └── FileUploadController.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── static │ │ │ ├── index.html │ │ │ ├── index2.html │ │ │ ├── index3.html │ │ │ └── jquery3.3.1.js │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── fileupload │ │ └── SpringBootFileuploadApplicationTests.java ├── spring-boot-freemarker │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── freemarker │ │ │ │ ├── SpringBootFreemarkerApplication.java │ │ │ │ ├── controller │ │ │ │ └── UserController.java │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── templates │ │ │ ├── freemarker │ │ │ ├── header.ftl │ │ │ └── user.ftl │ │ │ └── user.ftl │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── freemarker │ │ └── SpringBootFreemarkerApplicationTests.java ├── spring-boot-interceptor │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── interceptor │ │ │ │ ├── SpringBootInterceptorApplication.java │ │ │ │ ├── config │ │ │ │ ├── MyInterceptor.java │ │ │ │ └── WebMvcConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── interceptor │ │ └── SpringBootInterceptorApplicationTests.java ├── spring-boot-json │ ├── pom.xml │ ├── spring-boot-fastjson │ │ ├── .gitignore │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── cxy35 │ │ │ │ │ └── sample │ │ │ │ │ └── springboot │ │ │ │ │ └── fastjson │ │ │ │ │ ├── SpringBootFastjsonApplication.java │ │ │ │ │ ├── config │ │ │ │ │ └── WebMvcConfig.java │ │ │ │ │ ├── controller │ │ │ │ │ └── UserController.java │ │ │ │ │ └── pojo │ │ │ │ │ └── User.java │ │ │ └── resources │ │ │ │ └── application.properties │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── fastjson │ │ │ └── SpringBootFastjsonApplicationTests.java │ ├── spring-boot-gson │ │ ├── .gitignore │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── cxy35 │ │ │ │ │ └── sample │ │ │ │ │ └── springboot │ │ │ │ │ └── gson │ │ │ │ │ ├── SpringBootGsonApplication.java │ │ │ │ │ ├── config │ │ │ │ │ └── WebMvcConfig.java │ │ │ │ │ ├── controller │ │ │ │ │ └── UserController.java │ │ │ │ │ └── pojo │ │ │ │ │ └── User.java │ │ │ └── resources │ │ │ │ └── application.properties │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── gson │ │ │ └── SpringBootGsonApplicationTests.java │ └── spring-boot-jackson │ │ ├── .gitignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── jackson │ │ │ │ ├── SpringBootJacksonApplication.java │ │ │ │ ├── config │ │ │ │ └── WebMvcConfig.java │ │ │ │ ├── controller │ │ │ │ └── UserController.java │ │ │ │ └── pojo │ │ │ │ └── User.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── jackson │ │ └── SpringBootJacksonApplicationTests.java ├── spring-boot-jsp │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── jsp │ │ │ │ ├── SpringBootJspApplication.java │ │ │ │ ├── config │ │ │ │ └── WebMvcConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ ├── resources │ │ │ └── application.properties │ │ └── webapp │ │ │ └── jsp │ │ │ └── hello.jsp │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── jsp │ │ └── SpringBootJspApplicationTests.java ├── spring-boot-paramconverter │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── paramconverter │ │ │ │ ├── SpringBootParamconverterApplication.java │ │ │ │ ├── config │ │ │ │ └── DateConverter.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── paramconverter │ │ └── SpringBootParamconverterApplicationTests.java ├── spring-boot-runner │ ├── pom.xml │ ├── spring-boot-applicationrunner │ │ ├── .gitignore │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ ├── MavenWrapperDownloader.java │ │ │ │ ├── maven-wrapper.jar │ │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── cxy35 │ │ │ │ │ └── sample │ │ │ │ │ └── springboot │ │ │ │ │ └── applicationrunner │ │ │ │ │ ├── SpringBootApplicationrunnerApplication.java │ │ │ │ │ └── config │ │ │ │ │ ├── MyApplicationRunner1.java │ │ │ │ │ └── MyApplicationRunner2.java │ │ │ └── resources │ │ │ │ └── application.properties │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── cxy35 │ │ │ └── sample │ │ │ └── springboot │ │ │ └── applicationrunner │ │ │ └── SpringBootApplicationrunnerApplicationTests.java │ └── spring-boot-commandlinerunner │ │ ├── .gitignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── commandlinerunner │ │ │ │ ├── SpringBootCommandlinerunnerApplication.java │ │ │ │ └── config │ │ │ │ ├── MyCommandLineRunner1.java │ │ │ │ └── MyCommandLineRunner2.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── commandlinerunner │ │ └── SpringBootCommandlinerunnerApplicationTests.java ├── spring-boot-servlet │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── servlet │ │ │ │ ├── SpringBootServletApplication.java │ │ │ │ └── config │ │ │ │ ├── MyFilter.java │ │ │ │ ├── MyRequestListener.java │ │ │ │ └── MyServlet.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── servlet │ │ └── SpringBootServletApplicationTests.java ├── spring-boot-staticresources │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── staticresources │ │ │ │ ├── SpringBootStaticresourcesApplication.java │ │ │ │ └── config │ │ │ │ └── WebMvcConfig.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── resources │ │ │ │ └── hello.js │ │ │ ├── application.properties │ │ │ ├── cxy35 │ │ │ └── hello.js │ │ │ ├── public │ │ │ └── hello.js │ │ │ ├── resources │ │ │ └── hello.js │ │ │ └── static │ │ │ └── hello.js │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── staticresources │ │ └── SpringBootStaticresourcesApplicationTests.java ├── spring-boot-thymeleaf │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── cxy35 │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── thymeleaf │ │ │ │ ├── SpringBootThymeleafApplication.java │ │ │ │ ├── controller │ │ │ │ └── BookController.java │ │ │ │ └── pojo │ │ │ │ └── Book.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── templates │ │ │ └── book.html │ │ └── test │ │ └── java │ │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── thymeleaf │ │ └── SpringBootThymeleafApplicationTests.java ├── spring-boot-viewcontroller │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjiam │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── viewcontroller │ │ │ │ ├── SpringBootViewcontrollerApplication.java │ │ │ │ ├── config │ │ │ │ └── WebMvcConfig.java │ │ │ │ └── controller │ │ │ │ └── HelloController.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── templates │ │ │ └── hello.html │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjiam │ │ └── sample │ │ └── springboot │ │ └── viewcontroller │ │ └── SpringBootViewcontrollerApplicationTests.java ├── spring-boot-welcome │ ├── .gitignore │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── zhengjian │ │ │ │ └── sample │ │ │ │ └── springboot │ │ │ │ └── welcome │ │ │ │ ├── SpringBootWelcomeApplication.java │ │ │ │ └── controller │ │ │ │ └── IndexController.java │ │ └── resources │ │ │ ├── application.properties │ │ │ ├── static │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ │ └── templates │ │ │ └── index.html │ │ └── test │ │ └── java │ │ └── com │ │ └── zhengjian │ │ └── sample │ │ └── springboot │ │ └── welcome │ │ └── SpringBootWelcomeApplicationTests.java └── spring-boot-xml │ ├── .gitignore │ ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties │ ├── mvnw │ ├── mvnw.cmd │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── zhengjian │ │ │ └── sample │ │ │ └── springboot │ │ │ └── xml │ │ │ ├── Hello.java │ │ │ ├── SpringBootXmlApplication.java │ │ │ └── config │ │ │ └── WebMvcConfig.java │ └── resources │ │ ├── application.properties │ │ └── beans.xml │ └── test │ └── java │ └── com │ └── zhengjian │ └── sample │ └── springboot │ └── xml │ └── SpringBootXmlApplicationTests.java └── spring-boot-yaml ├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── cxy35 │ │ └── sample │ │ └── springboot │ │ └── yaml │ │ ├── SpringBootYamlApplication.java │ │ └── pojo │ │ ├── Book.java │ │ └── Chapter.java └── resources │ └── application.yaml └── test └── java └── com └── cxy35 └── sample └── springboot └── yaml └── SpringBootYamlApplicationTests.java /spring-boot-cache/spring-boot-springcache-ehcache/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-ehcache/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-cache/spring-boot-springcache-ehcache/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-ehcache/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-ehcache/src/main/java/com/cxy35/sample/springboot/springcache/ehcache/SpringBootSpringcacheEhcacheApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springcache.ehcache; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cache.annotation.EnableCaching; 6 | 7 | @SpringBootApplication 8 | @EnableCaching 9 | public class SpringBootSpringcacheEhcacheApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootSpringcacheEhcacheApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-ehcache/src/main/java/com/cxy35/sample/springboot/springcache/ehcache/config/MyKeyGenerator.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springcache.ehcache.config; 2 | 3 | import org.springframework.cache.interceptor.KeyGenerator; 4 | import org.springframework.stereotype.Component; 5 | 6 | import java.lang.reflect.Method; 7 | import java.util.Arrays; 8 | 9 | @Component 10 | public class MyKeyGenerator implements KeyGenerator { 11 | @Override 12 | public Object generate(Object o, Method method, Object... objects) { 13 | // 自定义缓存的 key 14 | return method.getName() + ":" + Arrays.toString(objects); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-ehcache/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u81EA\u5B9A\u4E49 Ehcache \u914D\u7F6E\u6587\u4EF6\u7684\u4F4D\u7F6E\u548C\u540D\u79F0 2 | # spring.cache.ehcache.config=classpath:myEhcache.xml 3 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-redis/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-redis/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-cache/spring-boot-springcache-redis/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-redis/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-redis/src/main/java/com/cxy35/sample/springboot/springcache/redis/SpringBootSpringcacheRedisApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springcache.redis; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.cache.annotation.EnableCaching; 6 | 7 | @SpringBootApplication 8 | @EnableCaching // 开启缓存 9 | public class SpringBootSpringcacheRedisApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootSpringcacheRedisApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-redis/src/main/java/com/cxy35/sample/springboot/springcache/redis/config/MyKeyGenerator.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springcache.redis.config; 2 | 3 | import org.springframework.cache.interceptor.KeyGenerator; 4 | import org.springframework.stereotype.Component; 5 | 6 | import java.lang.reflect.Method; 7 | import java.util.Arrays; 8 | 9 | @Component 10 | public class MyKeyGenerator implements KeyGenerator { 11 | @Override 12 | public Object generate(Object o, Method method, Object... objects) { 13 | // 自定义缓存的key 14 | return method.getName() + ":" + Arrays.toString(objects); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-cache/spring-boot-springcache-redis/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Redis \u914D\u7F6E 2 | spring.redis.host=192.168.71.62 3 | spring.redis.port=6379 4 | spring.redis.database=0 5 | spring.redis.password=000000 6 | 7 | # \u8FDE\u63A5\u6C60\u914D\u7F6E\uFF0C Spring Boot \u9ED8\u8BA4\u7528\u7684\u662F lettuce \uFF0C\u800C\u4E0D\u662F Jedis \uFF0C\u9700\u589E\u52A0 commons-pool2 \u4F9D\u8D56 8 | spring.redis.lettuce.pool.min-idle=5 9 | spring.redis.lettuce.pool.max-idle=10 10 | spring.redis.lettuce.pool.max-active=8 11 | spring.redis.lettuce.pool.max-wait=1ms 12 | spring.redis.lettuce.shutdown-timeout=100ms 13 | 14 | # \u7F13\u5B58\u540D\u79F0 15 | spring.cache.cache-names=cache-user -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jdbctemplate/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jdbctemplate/src/main/java/com/cxy35/sample/springboot/jdbctemplate/SpringBootJdbctemplateApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jdbctemplate; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJdbctemplateApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJdbctemplateApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jdbctemplate/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource 2 | spring.datasource.username=root 3 | spring.datasource.password=000000 4 | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/cxy35?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 5 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jdbctemplatemulti/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jdbctemplatemulti/src/main/java/com/cxy35/sample/springboot/jdbctemplatemulti/SpringBootJdbctemplatemultiApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jdbctemplatemulti; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJdbctemplatemultiApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJdbctemplatemultiApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jdbctemplatemulti/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.one.type=com.alibaba.druid.pool.DruidDataSource 2 | spring.datasource.one.username=root 3 | spring.datasource.one.password=000000 4 | spring.datasource.one.url=jdbc:mysql://127.0.0.1:3306/cxy35?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 5 | 6 | spring.datasource.two.type=com.alibaba.druid.pool.DruidDataSource 7 | spring.datasource.two.username=root 8 | spring.datasource.two.password=000000 9 | spring.datasource.two.url=jdbc:mysql://127.0.0.1:3306/cxy35_2?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 10 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jpa/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jpa/src/main/java/com/cxy35/sample/springboot/jpa/SpringBootJpaApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jpa; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJpaApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJpaApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jpamulti/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-jpamulti/src/main/java/com/cxy35/sample/springboot/jpamulti/SpringBootJpamultiApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jpamulti; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJpamultiApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJpamultiApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplus/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplus/src/main/java/com/cxy35/sample/springboot/mybatis/mybatisplusmulti/SpringBootMybatisMybatisplusApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.mybatisplusmulti; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootMybatisMybatisplusApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootMybatisMybatisplusApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplus/src/main/java/com/cxy35/sample/springboot/mybatis/mybatisplusmulti/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplus/src/main/java/com/cxy35/sample/springboot/mybatis/mybatisplusmulti/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.mybatisplusmulti.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.cxy35.sample.springboot.mybatis.mybatisplusmulti.pojo.User; 5 | 6 | /** 7 | * @author cxy35 8 | * @date 2021/1/20 14:06 9 | */ 10 | public interface UserService extends IService { 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplus/src/test/java/com/cxy35/sample/springboot/mybatis/mybatisplusmulti/SpringBootMybatisMybatisplusApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.mybatisplusmulti; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootMybatisMybatisplusApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplusmulti/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplusmulti/src/main/java/com/cxy35/sample/springboot/mybatis/mybatisplusmulti/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.mybatisplusmulti.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.cxy35.sample.springboot.mybatis.mybatisplusmulti.pojo.User; 5 | 6 | /** 7 | * @author cxy35 8 | * @date 2021/1/20 14:05 9 | */ 10 | public interface UserMapper extends BaseMapper { 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplusmulti/src/main/java/com/cxy35/sample/springboot/mybatis/mybatisplusmulti/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.mybatisplusmulti.service; 2 | 3 | import com.baomidou.mybatisplus.extension.service.IService; 4 | import com.cxy35.sample.springboot.mybatis.mybatisplusmulti.pojo.User; 5 | 6 | /** 7 | * @author cxy35 8 | * @date 2021/1/20 14:06 9 | */ 10 | public interface UserService extends IService { 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-mybatisplusmulti/src/test/java/com/cxy35/sample/springboot/mybatis/mybatisplusmulti/SpringBootMybatisMybatisplusmultiApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.mybatisplusmulti; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootMybatisMybatisplusmultiApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-tkmybatis/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-tkmybatis/src/main/java/com/cxy35/sample/springboot/mybatis/tkmybatis/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.tkmybatis.mapper; 2 | 3 | import com.cxy35.sample.springboot.mybatis.tkmybatis.pojo.User; 4 | import tk.mybatis.mapper.common.Mapper; 5 | 6 | import java.util.List; 7 | 8 | public interface UserMapper extends Mapper { 9 | // 测试用,非必须 10 | List selectByRoleId(Integer roleId); 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis-tkmybatis/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource 2 | spring.datasource.driver-class-name=com.mysql.jdbc.Driver 3 | spring.datasource.username=root 4 | spring.datasource.password=000000 5 | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/cxy35?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 6 | 7 | logging.level.com.cxy35.sample.springboot.mybatis.tkmybatis.mapper=debug 8 | 9 | # [Mybatis \u901A\u7528 Mapper \u4EE3\u7801\u751F\u6210\u5668](https://github.com/cxy35/generators/tree/master/generator-mapper) -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis/src/main/java/com/cxy35/sample/springboot/mybatis/SpringBootMybatisApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis; 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(basePackages = "com.cxy35.sample.springboot.mybatis.mapper") 9 | public class SpringBootMybatisApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootMybatisApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis/src/main/java/com/cxy35/sample/springboot/mybatis/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatis.mapper; 2 | 3 | import com.cxy35.sample.springboot.mybatis.pojo.User; 4 | 5 | import java.util.List; 6 | 7 | // 方式1:在 XML 中写 SQL >> UserMapper.xml 8 | // @Mapper // 可在启动类中全局配置 9 | public interface UserMapper { 10 | Integer addUser(User user); 11 | 12 | Integer deleteUserById(Integer id); 13 | 14 | Integer updateUserById(User user); 15 | 16 | List getAllUser(); 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatis/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource 2 | spring.datasource.username=root 3 | spring.datasource.password=000000 4 | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/cxy35?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 5 | 6 | # \u9ED8\u8BA4\u4E0E XxxMapper.java \u5728\u540C\u4E00\u4E2A\u76EE\u5F55\u4E0B\uFF08\u63A8\u8350\uFF09\uFF0C\u8FD9\u91CC\u81EA\u5B9A\u4E49\u76EE\u5F55 7 | mybatis.mapper-locations=classpath:/mapper/*.xml 8 | 9 | # logging.level.com.cxy35.sample.springboot.mybatis.mapper=debug -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatismulti/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatismulti/src/main/java/com/cxy35/sample/springboot/mybatismulti/SpringBootMybatismultiApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatismulti; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootMybatismultiApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootMybatismultiApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatismulti/src/main/java/com/cxy35/sample/springboot/mybatismulti/mapper1/UserMapper1.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatismulti.mapper1; 2 | 3 | import com.cxy35.sample.springboot.mybatismulti.pojo.User; 4 | 5 | import java.util.List; 6 | 7 | // 方式1:在 XML 中写 SQL >> UserMapper1.xml 8 | // @Mapper // 在 MyBatisConfigOne 类中配置扫描 9 | public interface UserMapper1 { 10 | Integer addUser(User user); 11 | 12 | Integer deleteUserById(Integer id); 13 | 14 | Integer updateUserById(User user); 15 | 16 | List getAllUser(); 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatismulti/src/main/java/com/cxy35/sample/springboot/mybatismulti/mapper2/UserMapper2.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mybatismulti.mapper2; 2 | 3 | import com.cxy35.sample.springboot.mybatismulti.pojo.User; 4 | 5 | import java.util.List; 6 | 7 | // 方式1:在 XML 中写 SQL >> UserMapper2.xml 8 | // @Mapper // 在 MyBatisConfigTwo 类中配置扫描 9 | public interface UserMapper2 { 10 | Integer addUser(User user); 11 | 12 | Integer deleteUserById(Integer id); 13 | 14 | Integer updateUserById(User user); 15 | 16 | List getAllUser(); 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-dao/spring-boot-mybatismulti/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.one.type=com.alibaba.druid.pool.DruidDataSource 2 | spring.datasource.one.username=root 3 | spring.datasource.one.password=000000 4 | spring.datasource.one.url=jdbc:mysql://127.0.0.1:3306/cxy35?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 5 | 6 | spring.datasource.two.type=com.alibaba.druid.pool.DruidDataSource 7 | spring.datasource.two.username=root 8 | spring.datasource.two.password=000000 9 | spring.datasource.two.url=jdbc:mysql://127.0.0.1:3306/cxy35_2?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 10 | -------------------------------------------------------------------------------- /spring-boot-devtools/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-devtools/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-devtools/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-devtools/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-devtools/src/main/java/com/cxy35/sample/springboot/devtools/SpringBootDevtoolsApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.devtools; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootDevtoolsApplication { 8 | 9 | public static void main(String[] args) { 10 | // 方式2:关闭自动重启功能 11 | // System.setProperty("spring.devtools.restart.enabled", "false"); 12 | SpringApplication.run(SpringBootDevtoolsApplication.class, args); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-devtools/src/main/java/com/cxy35/sample/springboot/devtools/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.devtools.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | @GetMapping("/hello") 9 | public String hello() { 10 | return "Hello DevTools"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-devtools/src/main/resources/.trigger-file: -------------------------------------------------------------------------------- 1 | aaa 2 | bbb -------------------------------------------------------------------------------- /spring-boot-devtools/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

Hello DevTools...

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-devtools/src/test/java/com/cxy35/sample/springboot/devtools/SpringBootDevtoolsApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.devtools; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootDevtoolsApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-helloworld/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-helloworld/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-helloworld/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-helloworld/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-helloworld/src/main/java/com/cxy35/sample/springboot/helloworld/SpringBootHelloworldApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.helloworld; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootHelloworldApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootHelloworldApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-helloworld/src/main/java/com/cxy35/sample/springboot/helloworld/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.helloworld.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | @GetMapping("/hello") 9 | public String hello() { 10 | return "hello spring boot!"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-helloworld/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-helloworld/src/test/java/com/cxy35/sample/springboot/helloworld/SpringBootHelloworldApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.helloworld; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootHelloworldApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-mail/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-mail/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-mail/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-mail/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-mail/src/main/java/com/cxy35/sample/springboot/mail/SpringBootMailApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mail; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootMailApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootMailApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-activemq/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-activemq/src/main/java/com/zhengjian/sample/springboot/activemq/SpringBootActivemqApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.activemq; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootActivemqApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootActivemqApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-activemq/src/main/java/com/zhengjian/sample/springboot/activemq/config/ActiveMQConfig.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.activemq.config; 2 | 3 | import org.apache.activemq.command.ActiveMQQueue; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | import javax.jms.Queue; 8 | 9 | /** 10 | * @Author cxy35 11 | * @Date 2019/11/29 15:25 12 | */ 13 | @Configuration 14 | public class ActiveMQConfig { 15 | public final static String QUEUE_NAME = "myQueue"; 16 | 17 | @Bean 18 | Queue queue() { 19 | return new ActiveMQQueue(ActiveMQConfig.QUEUE_NAME); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-activemq/src/main/java/com/zhengjian/sample/springboot/activemq/receiver/ActiveMQReceiver.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.activemq.receiver; 2 | 3 | import com.zhengjian.sample.springboot.activemq.config.ActiveMQConfig; 4 | import com.zhengjian.sample.springboot.activemq.pojo.Message; 5 | import org.springframework.jms.annotation.JmsListener; 6 | import org.springframework.stereotype.Component; 7 | 8 | @Component 9 | public class ActiveMQReceiver { 10 | // 监听队列 11 | @JmsListener(destination = ActiveMQConfig.QUEUE_NAME) 12 | public void receive(Message message) { 13 | System.out.println(message); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-activemq/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.activemq.broker-url=tcp://127.0.0.1:61616 2 | spring.activemq.packages.trust-all=true 3 | spring.activemq.user=admin 4 | spring.activemq.password=admin 5 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-rabbitmq/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-rabbitmq/src/main/java/com/zhengjian/sample/springboot/rabbitmq/SpringBootRabbitmqApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.rabbitmq; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootRabbitmqApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootRabbitmqApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-rabbitmq/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.rabbitmq.host=127.0.0.1 2 | spring.rabbitmq.port=5672 3 | # spring.rabbitmq.virtual-host=/ 4 | spring.rabbitmq.username=guest 5 | spring.rabbitmq.password=guest 6 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-groupchat/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-groupchat/src/main/java/com/zhengjian/sample/springboot/websocket/groupchat/SpringBootWebsocketGroupchatApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.websocket.groupchat; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootWebsocketGroupchatApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootWebsocketGroupchatApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-groupchat/src/main/java/com/zhengjian/sample/springboot/websocket/groupchat/pojo/GroupChatMessage.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.websocket.groupchat.pojo; 2 | 3 | // 在线群聊消息对象 4 | public class GroupChatMessage { 5 | private String name; 6 | private String content; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public String getContent() { 17 | return content; 18 | } 19 | 20 | public void setContent(String content) { 21 | this.content = content; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-groupchat/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-groupchat/src/test/java/com/zhengjian/sample/springboot/websocket/groupchat/SpringBootWebsocketGroupchatApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.websocket.groupchat; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootWebsocketGroupchatApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-privatechat/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-privatechat/src/main/java/com/zhengjian/sample/springboot/websocket/privatechat/SpringBootWebsocketPrivatechatApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.websocket.privatechat; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootWebsocketPrivatechatApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootWebsocketPrivatechatApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-message/spring-boot-websocket-privatechat/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-monitor/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-monitor 9 | 1.0-SNAPSHOT 10 | 11 | 12 | spring-boot-admin-server 13 | spring-boot-admin-client 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-client/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-client/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-monitor/spring-boot-admin-client/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-client/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-client/src/main/java/com/zhengjian/sample/springboot/admin/client/SpringBootAdminClientApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.admin.client; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootAdminClientApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootAdminClientApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-client/src/main/java/com/zhengjian/sample/springboot/admin/client/config/SecurityConfig.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.admin.client.config; 2 | 3 | //@Configuration 4 | public class SecurityConfig /*extends WebSecurityConfigurerAdapter*/ { 5 | /*@Override 6 | protected void configure(HttpSecurity http) throws Exception { 7 | http.requestMatcher(EndpointRequest.toAnyEndpoint()) 8 | .authorizeRequests() 9 | .anyRequest().hasRole("ADMIN") 10 | .and() 11 | .httpBasic(); 12 | }*/ 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-client/src/test/java/com/zhengjian/sample/springboot/admin/client/SpringBootAdminClientApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.admin.client; 2 | 3 | import org.junit.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootAdminClientApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-server/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-server/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-monitor/spring-boot-admin-server/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-server/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-server/src/main/java/com/zhengjian/sample/springboot/admin/server/SpringBootAdminServerApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.admin.server; 2 | 3 | import de.codecentric.boot.admin.server.config.EnableAdminServer; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | @EnableAdminServer // 开启监控服务 9 | public class SpringBootAdminServerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootAdminServerApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-monitor/spring-boot-admin-server/src/test/java/com/zhengjian/sample/springboot/admin/server/SpringBootAdminServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.admin.server; 2 | 3 | import org.junit.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootAdminServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-nosql/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-nosql 9 | 1.0-SNAPSHOT 10 | 11 | 12 | spring-boot-redis 13 | spring-boot-redis-springsession 14 | spring-boot-mongodb 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-elasticsearch/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-elasticsearch/src/main/java/com/cxy35/sample/springboot/elasticsearch/SpringBootElasticsearchApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.elasticsearch; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootElasticsearchApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootElasticsearchApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-elasticsearch/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.data.elasticsearch.repositories.enabled=true 2 | 3 | spring.elasticsearch.rest.uris=http://localhost:9200 4 | spring.elasticsearch.rest.username=elastic 5 | spring.elasticsearch.rest.password=000000 -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-mongodb/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-mongodb/src/main/java/com/zhengjian/sample/springboot/mongodb/SpringBootMongodbApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.mongodb; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootMongodbApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootMongodbApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-mongodb/src/main/java/com/zhengjian/sample/springboot/mongodb/dao/BookDao.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.mongodb.dao; 2 | 3 | import com.zhengjian.sample.springboot.mongodb.pojo.Book; 4 | import org.springframework.data.mongodb.repository.MongoRepository; 5 | 6 | import java.util.List; 7 | 8 | public interface BookDao extends MongoRepository { 9 | // 方法命名规则类似JPA 10 | List findBookByNameContaining(String name); 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-mongodb/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.data.mongodb.host=192.168.71.62 2 | spring.data.mongodb.port=27017 3 | spring.data.mongodb.authentication-database=admin 4 | spring.data.mongodb.username=zhengjian 5 | spring.data.mongodb.password=000000 6 | spring.data.mongodb.database=zhengjian 7 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis-springsession/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis-springsession/src/main/java/com/cxy35/sample/springboot/redis/springsession/SpringBootRedisSpringsessionApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.redis.springsession; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootRedisSpringsessionApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootRedisSpringsessionApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis-springsession/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Redis \u914D\u7F6E 2 | spring.redis.host=192.168.71.62 3 | spring.redis.port=6379 4 | spring.redis.database=0 5 | spring.redis.password=000000 6 | 7 | # \u8FDE\u63A5\u6C60\u914D\u7F6E\uFF0C Spring Boot \u9ED8\u8BA4\u7528\u7684\u662F lettuce \uFF0C\u800C\u4E0D\u662F Jedis \uFF0C\u9700\u589E\u52A0 commons-pool2 \u4F9D\u8D56 8 | spring.redis.lettuce.pool.min-idle=5 9 | spring.redis.lettuce.pool.max-idle=10 10 | spring.redis.lettuce.pool.max-active=8 11 | spring.redis.lettuce.pool.max-wait=1ms 12 | spring.redis.lettuce.shutdown-timeout=100ms -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis-springsession/src/test/java/com/cxy35/sample/springboot/redis/springsession/SpringBootRedisSpringsessionApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.redis.springsession; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootRedisSpringsessionApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis/src/main/java/com/cxy35/sample/springboot/redis/SpringBootRedisApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.redis; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootRedisApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootRedisApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.redis.host=192.168.71.62 2 | spring.redis.port=6379 3 | spring.redis.database=0 4 | spring.redis.password=000000 5 | 6 | # \u8FDE\u63A5\u6C60\u914D\u7F6E\uFF0C Spring Boot \u9ED8\u8BA4\u7528\u7684\u662F lettuce \uFF0C\u800C\u4E0D\u662F Jedis \uFF0C\u9700\u589E\u52A0 commons-pool2 \u4F9D\u8D56 7 | spring.redis.lettuce.pool.min-idle=5 8 | spring.redis.lettuce.pool.max-idle=10 9 | spring.redis.lettuce.pool.max-active=8 10 | spring.redis.lettuce.pool.max-wait=1ms 11 | spring.redis.lettuce.shutdown-timeout=100ms -------------------------------------------------------------------------------- /spring-boot-nosql/spring-boot-redis/src/test/java/com/cxy35/sample/springboot/redis/SpringBootRedisApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.redis; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootRedisApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-profile/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-profile/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-profile/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-profile/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-profile/src/main/java/com/zhengjian/sample/springboot/profile/SpringBootProfileApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.profile; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootProfileApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootProfileApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-profile/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | server.port=8081 2 | -------------------------------------------------------------------------------- /spring-boot-profile/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | server.port=80 2 | -------------------------------------------------------------------------------- /spring-boot-profile/src/main/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | server.port=8082 2 | -------------------------------------------------------------------------------- /spring-boot-profile/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u6FC0\u6D3B\u5BF9\u5E94\u7684profile 2 | spring.profiles.active=dev 3 | 4 | # \u4E0D\u540Cprofile\u4F46\u76F8\u540C\u7684\u914D\u7F6E\u53EF\u5728\u8FD9\u4E2A\u6587\u4EF6\u4E2D\u5B9A\u4E49 5 | server.servlet.context-path=/profile 6 | server.tomcat.uri-encoding=utf-8 7 | -------------------------------------------------------------------------------- /spring-boot-profile/src/test/java/com/zhengjian/sample/springboot/profile/SpringBootProfileApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.profile; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootProfileApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-properties/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-properties/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-properties/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-properties/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-properties/src/main/java/com/cxy35/sample/springboot/properties/SpringBootPropertiesApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.properties; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootPropertiesApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootPropertiesApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-properties/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-properties/src/main/resources/book.properties: -------------------------------------------------------------------------------- 1 | book.id=99 2 | book.name=\u4E09\u56FD\u6F14\u4E49 3 | book.author=\u7F57\u8D2F\u4E2D 4 | -------------------------------------------------------------------------------- /spring-boot-properties/src/test/java/com/cxy35/sample/springboot/properties/SpringBootPropertiesApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.properties; 2 | 3 | import com.cxy35.sample.springboot.properties.pojo.Book; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | 8 | @SpringBootTest 9 | class SpringBootPropertiesApplicationTests { 10 | 11 | @Autowired 12 | Book book; 13 | 14 | @Test 15 | void contextLoads() { 16 | System.out.println(book); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-rest/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-rest 9 | 1.0-SNAPSHOT 10 | 11 | 12 | spring-boot-jparest 13 | spring-boot-mongodbrest 14 | 15 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-jparest/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-jparest/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-rest/spring-boot-jparest/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-jparest/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-jparest/src/main/java/com/cxy35/sample/springboot/jparest/SpringBootJparestApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jparest; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJparestApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJparestApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-jparest/src/test/java/com/cxy35/sample/springboot/jparest/SpringBootJparestApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jparest; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootJparestApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-mongodbrest/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-mongodbrest/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-rest/spring-boot-mongodbrest/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-mongodbrest/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-mongodbrest/src/main/java/com/zhengjian/sample/springboot/mongodbrest/SpringBootMongodbrestApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.mongodbrest; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootMongodbrestApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootMongodbrestApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-rest/spring-boot-mongodbrest/src/test/java/com/zhengjian/sample/springboot/mongodbrest/SpringBootMongodbrestApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.mongodbrest; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootMongodbrestApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriojava/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriojava/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-shriojava/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriojava/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriojava/src/main/java/com/cxy35/sample/springboot/shriojava/SpringBootShriojavaApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.shriojava; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootShriojavaApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootShriojavaApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriojava/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriojava/src/test/java/com/cxy35/sample/springboot/shriojava/SpringBootShriojavaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.shriojava; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootShriojavaApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriostarter/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriostarter/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-shriostarter/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriostarter/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriostarter/src/main/java/com/cxy35/sample/springboot/shriostarter/SpringBootShriostarterApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.shriostarter; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootShriostarterApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootShriostarterApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-shriostarter/src/test/java/com/cxy35/sample/springboot/shriostarter/SpringBootShriostarterApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.shriostarter; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootShriostarterApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-helloworld/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-helloworld/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-helloworld/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-helloworld/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-helloworld/src/main/java/com/cxy35/sample/springboot/springsecurity/helloworld/SpringBootSpringsecurityHelloworldApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.helloworld; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityHelloworldApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityHelloworldApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-helloworld/src/main/java/com/cxy35/sample/springboot/springsecurity/helloworld/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.helloworld.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | // 默认用户名为 user,密码在项目启动时打印在控制台 9 | @GetMapping("/hello") 10 | public String hello() { 11 | return "hello"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-helloworld/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-helloworld/src/test/java/com/cxy35/sample/springboot/springsecurity/helloworld/SpringBootSpringsecurityHelloworldApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.helloworld; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootSpringsecurityHelloworldApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecurity/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecurity/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-httpsecurity/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecurity/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecurity/src/main/java/com/zhengjian/sample/springboot/springsecurity/httpsecurity/SpringBootSpringsecurityHttpsecurityApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.httpsecurity; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityHttpsecurityApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityHttpsecurityApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecurity/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #\u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237\u540D/\u5BC6\u7801 2 | #spring.security.user.name=admin 3 | #spring.security.user.password=123456 4 | #spring.security.user.roles=admin 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecuritymulti/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecuritymulti/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-httpsecuritymulti/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecuritymulti/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecuritymulti/src/main/java/com/zhengjian/sample/springboot/springsecurity/httpsecuritymulti/SpringBootSpringsecurityHttpsecuritymultiApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.httpsecuritymulti; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityHttpsecuritymultiApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityHttpsecuritymultiApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-httpsecuritymulti/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #\u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237\u540D/\u5BC6\u7801 2 | #spring.security.user.name=admin 3 | #spring.security.user.password=123456 4 | #spring.security.user.roles=admin 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-jwt/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-jwt/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-jwt/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-jwt/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-jwt/src/main/java/com/cxy35/sample/springboot/springsecurity/jwt/SpringBootSpringsecurityJwtApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.jwt; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityJwtApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityJwtApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-jwt/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237/\u89D2\u8272 2 | # spring.security.user.name=admin 3 | # spring.security.user.password=123456 4 | # spring.security.user.roles=admin 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-login/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-login/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-login/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-login/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-login/src/main/java/com/cxy35/sample/springboot/springsecurity/login/SpringBootSpringsecurityLoginApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.login; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityLoginApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityLoginApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-login/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237/\u89D2\u8272 2 | # spring.security.user.name=admin 3 | # spring.security.user.password=123456 4 | # spring.security.user.roles=admin 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-loginbyjson/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-loginbyjson/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-loginbyjson/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-loginbyjson/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-loginbyjson/src/main/java/com/cxy35/sample/springboot/springsecurity/loginbyjson/SpringBootSpringsecurityLoginbyjsonApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.loginbyjson; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityLoginbyjsonApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityLoginbyjsonApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-loginbyjson/src/main/java/com/cxy35/sample/springboot/springsecurity/loginbyjson/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.loginbyjson.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | @GetMapping("/hello") 9 | public String hello() { 10 | return "hello"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-loginbyjson/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237/\u89D2\u8272 2 | # spring.security.user.name=admin 3 | # spring.security.user.password=123456 4 | # spring.security.user.roles=admin 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-methodsecurity/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-methodsecurity/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-methodsecurity/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-methodsecurity/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-methodsecurity/src/main/java/com/zhengjian/sample/springboot/springsecurity/methodsecurity/SpringBootSpringsecurityMethodsecurityApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.methodsecurity; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityMethodsecurityApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityMethodsecurityApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-methodsecurity/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #\u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237\u540D/\u5BC6\u7801 2 | #spring.security.user.name=admin 3 | #spring.security.user.password=123456 4 | #spring.security.user.roles=admin 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-oauth2/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-oauth2/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-oauth2/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-oauth2/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-oauth2/src/main/java/com/cxy35/sample/springboot/springsecurity/oauth2/SpringBootSpringsecurityOauth2Application.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.oauth2; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityOauth2Application { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityOauth2Application.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-urp/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-urp/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-urp/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-urp/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-urp/src/main/java/com/zhengjian/sample/springboot/springsecurity/urp/mapper/MenuMapper.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.urp.mapper; 2 | 3 | import com.zhengjian.sample.springboot.springsecurity.urp.pojo.Menu; 4 | 5 | import java.util.List; 6 | 7 | public interface MenuMapper { 8 | List getAllMenus(); 9 | } 10 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-urp/src/main/java/com/zhengjian/sample/springboot/springsecurity/urp/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.urp.mapper; 2 | 3 | import com.zhengjian.sample.springboot.springsecurity.urp.pojo.Role; 4 | import com.zhengjian.sample.springboot.springsecurity.urp.pojo.User; 5 | 6 | import java.util.List; 7 | 8 | public interface UserMapper { 9 | 10 | List getRolesById(Integer id); 11 | 12 | User loadUserByUsername(String username); 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-urp/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource 2 | spring.datasource.username=root 3 | spring.datasource.password=000000 4 | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/zhengjian?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-urp/src/test/java/com/zhengjian/sample/springboot/springsecurity/urp/SpringBootSpringsecurityUrpApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.urp; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootSpringsecurityUrpApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-user/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-user/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-user/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-user/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-user/src/main/java/com/cxy35/sample/springboot/springsecurity/user/SpringBootSpringsecurityUserApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.user; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityUserApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityUserApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-user/src/main/java/com/cxy35/sample/springboot/springsecurity/user/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.user.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | @GetMapping("/hello") 9 | public String hello() { 10 | return "hello"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-user/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237\u548C\u89D2\u8272 2 | # spring.security.user.name=admin 3 | # spring.security.user.password=123456 4 | # spring.security.user.roles=admin -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-userdb/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-userdb/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-userdb/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-userdb/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-userdb/src/main/java/com/zhengjian/sample/springboot/springsecurity/userdb/SpringBootSpringsecurityUserdbApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.userdb; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityUserdbApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityUserdbApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-userdb/src/main/java/com/zhengjian/sample/springboot/springsecurity/userdb/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.userdb.mapper; 2 | 3 | import com.zhengjian.sample.springboot.springsecurity.userdb.pojo.Role; 4 | import com.zhengjian.sample.springboot.springsecurity.userdb.pojo.User; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface UserMapper { 11 | User loadUserByUsername(String username); 12 | 13 | List getUserRolesById(Integer id); 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-userdb/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource 2 | spring.datasource.username=root 3 | spring.datasource.password=000000 4 | spring.datasource.url=jdbc:mysql://127.0.0.1:3306/zhengjian?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&autoReconnectForPools=true 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-userdb/src/test/java/com/zhengjian/sample/springboot/springsecurity/userdb/SpringBootSpringsecurityUserdbApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.springsecurity.userdb; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootSpringsecurityUserdbApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-verifycode/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-verifycode/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-security/spring-boot-springsecurity-verifycode/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-verifycode/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-verifycode/src/main/java/com/cxy35/sample/springboot/springsecurity/verifycode/SpringBootSpringsecurityVerifycodeApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.verifycode; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSpringsecurityVerifycodeApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSpringsecurityVerifycodeApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-verifycode/src/main/java/com/cxy35/sample/springboot/springsecurity/verifycode/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.springsecurity.verifycode.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | @GetMapping("/hello") 9 | public String hello() { 10 | return "hello"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-verifycode/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u65B9\u6CD51\uFF1A\u901A\u8FC7\u914D\u7F6E\u6587\u4EF6\u914D\u7F6E\u7528\u6237/\u89D2\u8272 2 | # spring.security.user.name=admin 3 | # spring.security.user.password=123456 4 | # spring.security.user.roles=admin 5 | -------------------------------------------------------------------------------- /spring-boot-security/spring-boot-springsecurity-verifycode/src/main/resources/static/vercode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 测试验证码 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spring-boot-starter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-starter 9 | pom 10 | 1.0-SNAPSHOT 11 | 12 | 13 | spring-boot-mystarter 14 | spring-boot-usemystarter 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /spring-boot-starter/spring-boot-mystarter/src/main/java/com/cxy35/sample/springboot/mystarter/HelloService.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.mystarter; 2 | 3 | public class HelloService { 4 | private String name; 5 | private String msg; 6 | 7 | public String sayHello() { 8 | return name + " say " + msg + " !"; 9 | } 10 | 11 | public String getName() { 12 | return name; 13 | } 14 | 15 | public void setName(String name) { 16 | this.name = name; 17 | } 18 | 19 | public String getMsg() { 20 | return msg; 21 | } 22 | 23 | public void setMsg(String msg) { 24 | this.msg = msg; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spring-boot-starter/spring-boot-mystarter/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.cxy35.sample.springboot.mystarter.HelloServiceAutoConfiguration -------------------------------------------------------------------------------- /spring-boot-starter/spring-boot-usemystarter/src/main/java/com/cxy35/sample/springboot/usemystarter/SpringBootUsemystarterApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.usemystarter; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootUsemystarterApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootUsemystarterApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-starter/spring-boot-usemystarter/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | cxy35.name=\u81EA\u5B9A\u4E49\u540D\u79F0 2 | cxy35.msg=\u81EA\u5B9A\u4E49\u6D88\u606F -------------------------------------------------------------------------------- /spring-boot-starter/spring-boot-usemystarter/src/test/java/com/cxy35/sample/springboot/usemystarter/SpringBootUsemystarterApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.usemystarter; 2 | 3 | import com.cxy35.sample.springboot.mystarter.HelloService; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | 8 | @SpringBootTest 9 | public class SpringBootUsemystarterApplicationTests { 10 | 11 | @Autowired 12 | HelloService helloService; 13 | 14 | @Test 15 | void contextLoads() { 16 | System.out.println(helloService.sayHello()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-swagger2/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-swagger2/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-swagger2/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-swagger2/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-swagger2/src/main/java/com/cxy35/sample/springboot/swagger2/SpringBootSwagger2Application.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.swagger2; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootSwagger2Application { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootSwagger2Application.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-swagger2/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #springfox.documentation.enabled=false 2 | -------------------------------------------------------------------------------- /spring-boot-swagger2/src/test/java/com/cxy35/sample/springboot/swagger2/SpringBootSwagger2ApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.swagger2; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootSwagger2ApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-task/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-task 9 | 1.0-SNAPSHOT 10 | 11 | 12 | spring-boot-scheduled 13 | spring-boot-quartz 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-quartz/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-quartz/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-task/spring-boot-quartz/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-quartz/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-quartz/src/main/java/com/cxy35/sample/springboot/quartz/SpringBootQuartzApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.quartz; 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 SpringBootQuartzApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootQuartzApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-quartz/src/main/java/com/cxy35/sample/springboot/quartz/job/MyJob1.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.quartz.job; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | import java.util.Date; 6 | 7 | // Job 定义方式1:直接定义一个 Bean 并注册到 Spring 容器中(无法传参)。 8 | @Component 9 | public class MyJob1 { 10 | public void sayHello() { 11 | System.out.println("MyJob1 >>> "+new Date()); 12 | } 13 | } -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-quartz/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-quartz/src/test/java/com/cxy35/sample/springboot/quartz/SpringBootQuartzApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.quartz; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootQuartzApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-scheduled/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-scheduled/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-task/spring-boot-scheduled/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-scheduled/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-scheduled/src/main/java/com/cxy35/sample/springboot/scheduled/SpringBootScheduledApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.scheduled; 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 SpringBootScheduledApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootScheduledApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-scheduled/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-task/spring-boot-scheduled/src/test/java/com/cxy35/sample/springboot/scheduled/SpringBootScheduledApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.scheduled; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootScheduledApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-test/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-test/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-test/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-test/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-test/src/main/java/com/cxy35/sample/springboot/test/SpringBootTestApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.test; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootTestApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootTestApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-test/src/main/java/com/cxy35/sample/springboot/test/service/HelloService.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.test.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | @Service 6 | public class HelloService { 7 | public String sayHello(String name) { 8 | return "hello " + name; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spring-boot-test/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-test/src/test/java/com/cxy35/sample/springboot/test/SpringBootTestApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.test; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootTestApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-test/src/test/java/com/cxy35/sample/springboot/test/book.json: -------------------------------------------------------------------------------- 1 | {"id":99,"name":"红楼梦","author":"曹雪芹"} -------------------------------------------------------------------------------- /spring-boot-tomcat/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-tomcat/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-tomcat/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-tomcat/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-tomcat/src/main/java/com/cxy35/sample/springboot/tomcat/SpringBootTomcatApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.tomcat; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootTomcatApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootTomcatApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-tomcat/src/main/java/com/cxy35/sample/springboot/tomcat/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.tomcat.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | @GetMapping("/hello") 9 | public String hello() { 10 | return "hello springboot!"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spring-boot-tomcat/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u4FEE\u6539\u670D\u52A1\u7AEF\u53E3\u53F7 2 | server.port=8081 3 | # \u4FEE\u6539\u670D\u52A1\u4E0A\u4E0B\u6587\u8DEF\u5F84 4 | server.servlet.context-path=/tomcat 5 | # \u914D\u7F6E Tomcat URL \u7F16\u7801 6 | server.tomcat.uri-encoding=utf-8 7 | -------------------------------------------------------------------------------- /spring-boot-tomcat/src/test/java/com/cxy35/sample/springboot/tomcat/SpringBootTomcatApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.tomcat; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootTomcatApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-war/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-war/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-war/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-war/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-war/src/main/java/com/zhengjian/sample/springboot/war/ServletInitializer.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.war; 2 | 3 | import org.springframework.boot.builder.SpringApplicationBuilder; 4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 5 | 6 | public class ServletInitializer extends SpringBootServletInitializer { 7 | 8 | @Override 9 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 10 | return application.sources(SpringBootWarApplication.class); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-war/src/main/java/com/zhengjian/sample/springboot/war/SpringBootWarApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.war; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootWarApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootWarApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-war/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-war/src/test/java/com/zhengjian/sample/springboot/war/SpringBootWarApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.war; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootWarApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-aop/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-aop/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-aop/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-aop/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-aop/src/main/java/com/zhengjian/sample/springboot/aop/SpringBootAopApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.aop; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootAopApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootAopApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-aop/src/main/java/com/zhengjian/sample/springboot/aop/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.aop.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | /** 6 | * @Author cxy35 7 | * @Date 2019-07-26 7:33 8 | */ 9 | @Service 10 | public class UserService { 11 | public String getUsernameById(Integer id) { 12 | System.out.println("getUsernameById"); 13 | return "cxy35"; 14 | } 15 | 16 | public void deleteUserById(Integer id) { 17 | System.out.println("deleteUserById"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-aop/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-aop/src/test/java/com/zhengjian/sample/springboot/aop/SpringBootAopApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.aop; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootAopApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-controlleradvice/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-controlleradvice/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-controlleradvice/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-controlleradvice/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-controlleradvice/src/main/java/com/cxy35/sample/springboot/controlleradvice/SpringBootControlleradviceApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.controlleradvice; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootControlleradviceApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootControlleradviceApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-controlleradvice/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-controlleradvice/src/test/java/com/cxy35/sample/springboot/controlleradvice/SpringBootControlleradviceApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.controlleradvice; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootControlleradviceApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-cors 9 | 1.0-SNAPSHOT 10 | 11 | 12 | spring-boot-corsprovider 13 | spring-boot-corsconsumer 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsconsumer/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsconsumer/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-cors/spring-boot-corsconsumer/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsconsumer/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsconsumer/src/main/java/com/cxy35/sample/springboot/corsconsumer/SpringBootCorsconsumerApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.corsconsumer; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootCorsconsumerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootCorsconsumerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsconsumer/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8081 -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsconsumer/src/test/java/com/cxy35/sample/springboot/corsconsumer/SpringBootCorsconsumerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.corsconsumer; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootCorsconsumerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsprovider/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsprovider/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-cors/spring-boot-corsprovider/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsprovider/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsprovider/src/main/java/com/cxy35/sample/springboot/corsprovider/SpringBootCorsproviderApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.corsprovider; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootCorsproviderApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootCorsproviderApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsprovider/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-cors/spring-boot-corsprovider/src/test/java/com/cxy35/sample/springboot/corsprovider/SpringBootCorsproviderApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.corsprovider; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootCorsproviderApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-exception/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/java/com/cxy35/sample/springboot/exception/SpringBootExceptionApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.exception; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootExceptionApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootExceptionApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/java/com/cxy35/sample/springboot/exception/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.exception.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | @RestController 7 | public class HelloController { 8 | // 默认的错误页面查找顺序:发生了500错误 –> 查找动态 500.html –> 查找静态 500.html –> 查找动态 5xx.html –> 查找静态 5xx.html 9 | @GetMapping("/hello") 10 | public String hello() { 11 | int i = 1 / 0; 12 | return "hello"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/resources/static/error/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

static/error/404

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/resources/static/error/4xx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

static/error/4xx

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/resources/static/error/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

static/error/500

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/resources/static/error/5xx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

static/error/5xx

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/main/resources/templates/error/4xx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

templates/error/4xx

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-exception/src/test/java/com/cxy35/sample/springboot/exception/SpringBootExceptionApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.exception; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootExceptionApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-fileupload/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/src/main/java/com/zhengjian/sample/springboot/fileupload/SpringBootFileuploadApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.fileupload; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootFileuploadApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootFileuploadApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #\u81EA\u5B9A\u4E49\u914D\u7F6E\u6587\u4EF6\u5927\u5C0F\u9650\u5236 2 | spring.servlet.multipart.max-file-size=2MB -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |
9 | 10 | 11 |
12 | 13 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/src/main/resources/static/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |
9 | 10 | 11 |
12 | 13 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-fileupload/src/test/java/com/zhengjian/sample/springboot/fileupload/SpringBootFileuploadApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.fileupload; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootFileuploadApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-freemarker/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-freemarker/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-freemarker/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-freemarker/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-freemarker/src/main/java/com/cxy35/sample/springboot/freemarker/SpringBootFreemarkerApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.freemarker; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootFreemarkerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootFreemarkerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-freemarker/src/main/resources/templates/freemarker/header.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

欢迎学习 Spring Boot !

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-freemarker/src/main/resources/templates/user.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | <#list users as u> 15 | 16 | 17 | 18 | 19 | 20 | 21 |
编号用户名用户地址
${u.id}${u.username}${u.address}
22 | 23 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-freemarker/src/test/java/com/cxy35/sample/springboot/freemarker/SpringBootFreemarkerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.freemarker; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootFreemarkerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-interceptor/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-interceptor/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-interceptor/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-interceptor/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-interceptor/src/main/java/com/zhengjian/sample/springboot/interceptor/SpringBootInterceptorApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.interceptor; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootInterceptorApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootInterceptorApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-interceptor/src/main/java/com/zhengjian/sample/springboot/interceptor/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.interceptor.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * @Author cxy35 8 | * @Date 2019-07-24 17:19 9 | */ 10 | @RestController 11 | public class HelloController { 12 | @GetMapping("/hello") 13 | public String hello() { 14 | return "hello"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-interceptor/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-interceptor/src/test/java/com/zhengjian/sample/springboot/interceptor/SpringBootInterceptorApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.interceptor; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootInterceptorApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-json 9 | 1.0-SNAPSHOT 10 | 11 | 12 | spring-boot-jackson 13 | spring-boot-gson 14 | spring-boot-fastjson 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-fastjson/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-fastjson/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-json/spring-boot-fastjson/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-fastjson/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-fastjson/src/main/java/com/cxy35/sample/springboot/fastjson/SpringBootFastjsonApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.fastjson; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootFastjsonApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootFastjsonApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-fastjson/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-fastjson/src/test/java/com/cxy35/sample/springboot/fastjson/SpringBootFastjsonApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.fastjson; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootFastjsonApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-gson/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-gson/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-json/spring-boot-gson/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-gson/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-gson/src/main/java/com/cxy35/sample/springboot/gson/SpringBootGsonApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.gson; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootGsonApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootGsonApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-gson/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-gson/src/test/java/com/cxy35/sample/springboot/gson/SpringBootGsonApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.gson; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootGsonApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-jackson/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-jackson/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-json/spring-boot-jackson/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-jackson/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-jackson/src/main/java/com/cxy35/sample/springboot/jackson/SpringBootJacksonApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jackson; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJacksonApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJacksonApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-jackson/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-json/spring-boot-jackson/src/test/java/com/cxy35/sample/springboot/jackson/SpringBootJacksonApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.jackson; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootJacksonApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-jsp/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/src/main/java/com/zhengjian/sample/springboot/jsp/SpringBootJspApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.jsp; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootJspApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootJspApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/src/main/java/com/zhengjian/sample/springboot/jsp/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.jsp.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 6 | 7 | /** 8 | * @Author cxy35 9 | * @Date 2019-07-21 11:18 10 | */ 11 | // @Configuration 12 | public class WebMvcConfig implements WebMvcConfigurer { 13 | @Override 14 | public void configureViewResolvers(ViewResolverRegistry registry) { 15 | registry.jsp("/jsp/", ".jsp"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/src/main/java/com/zhengjian/sample/springboot/jsp/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.jsp.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.ui.Model; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * @Author cxy35 10 | * @Date 2019-07-21 11:17 11 | */ 12 | @Controller 13 | public class HelloController { 14 | @GetMapping("/hello") 15 | public String hello(Model model, String name) { 16 | model.addAttribute("name", name); 17 | return "hello"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u914D\u7F6E jsp \u89E3\u6790\u5668\uFF0C\u4E0EWebMvcConfig\u5B9E\u73B0\u7684\u529F\u80FD\u4E00\u6837 2 | spring.mvc.view.prefix=/jsp/ 3 | spring.mvc.view.suffix=.jsp 4 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/src/main/webapp/jsp/hello.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: sang 4 | Date: 2019-07-21 5 | Time: 11:18 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Title 12 | 13 | 14 |

${name}

15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-jsp/src/test/java/com/zhengjian/sample/springboot/jsp/SpringBootJspApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.jsp; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootJspApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-paramconverter/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-paramconverter/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-paramconverter/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-paramconverter/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-paramconverter/src/main/java/com/zhengjian/sample/springboot/paramconverter/SpringBootParamconverterApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.paramconverter; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootParamconverterApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootParamconverterApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-paramconverter/src/main/java/com/zhengjian/sample/springboot/paramconverter/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.paramconverter.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | import java.util.Date; 7 | 8 | /** 9 | * @Author cxy35 10 | * @Date 2019-07-26 7:17 11 | */ 12 | @RestController 13 | public class HelloController { 14 | @GetMapping("/hello") 15 | public void hello(Date birthday) { 16 | System.out.println(birthday); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-paramconverter/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-paramconverter/src/test/java/com/zhengjian/sample/springboot/paramconverter/SpringBootParamconverterApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.paramconverter; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootParamconverterApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.cxy35.sample 8 | spring-boot-runner 9 | 1.0-SNAPSHOT 10 | 11 | 12 | spring-boot-applicationrunner 13 | spring-boot-commandlinerunner 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-applicationrunner/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-applicationrunner/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-runner/spring-boot-applicationrunner/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-applicationrunner/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-applicationrunner/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-applicationrunner/src/test/java/com/cxy35/sample/springboot/applicationrunner/SpringBootApplicationrunnerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.applicationrunner; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootApplicationrunnerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-commandlinerunner/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-commandlinerunner/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-runner/spring-boot-commandlinerunner/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-commandlinerunner/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-commandlinerunner/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-runner/spring-boot-commandlinerunner/src/test/java/com/cxy35/sample/springboot/commandlinerunner/SpringBootCommandlinerunnerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.commandlinerunner; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootCommandlinerunnerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-servlet/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-servlet/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-servlet/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-servlet/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-servlet/src/main/java/com/zhengjian/sample/springboot/servlet/SpringBootServletApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.servlet; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.web.servlet.ServletComponentScan; 6 | 7 | @SpringBootApplication 8 | @ServletComponentScan(basePackages = "com.zhengjian.sample.springboot.servlet.config") 9 | public class SpringBootServletApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(SpringBootServletApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-servlet/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-servlet/src/test/java/com/zhengjian/sample/springboot/servlet/SpringBootServletApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.servlet; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootServletApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-staticresources/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/main/java/com/cxy35/sample/springboot/staticresources/SpringBootStaticresourcesApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.staticresources; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootStaticresourcesApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootStaticresourcesApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/main/resources/META-INF/resources/hello.js: -------------------------------------------------------------------------------- 1 | console.log("1.classpath:/META-INF/resources/"); -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u81EA\u5B9A\u4E49\u914D\u7F6E\u9759\u6001\u8D44\u6E90\u7684\u5339\u914D\u89C4\u5219\u548C\u8DEF\u5F84 2 | # \u5B9A\u4E49\u8BF7\u6C42 URL \u89C4\u5219 3 | # spring.mvc.static-path-pattern=/** 4 | # \u5B9A\u4E49\u8D44\u6E90\u4F4D\u7F6E 5 | # spring.resources.static-locations=classpath:/cxy35/ 6 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/main/resources/cxy35/hello.js: -------------------------------------------------------------------------------- 1 | console.log("my.classpath:/cxy35/"); -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/main/resources/public/hello.js: -------------------------------------------------------------------------------- 1 | console.log("4.classpath:/public/"); -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/main/resources/resources/hello.js: -------------------------------------------------------------------------------- 1 | console.log("2.classpath:/resources/"); -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/main/resources/static/hello.js: -------------------------------------------------------------------------------- 1 | console.log("3.classpath:/static/"); -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-staticresources/src/test/java/com/cxy35/sample/springboot/staticresources/SpringBootStaticresourcesApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.staticresources; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootStaticresourcesApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-thymeleaf/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-thymeleaf/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-thymeleaf/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-thymeleaf/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-thymeleaf/src/main/java/com/cxy35/sample/springboot/thymeleaf/SpringBootThymeleafApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.thymeleaf; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootThymeleafApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootThymeleafApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-thymeleaf/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # \u8FD9\u91CC\u53EF\u4EE5\u8986\u76D6 thymeleaf \u7684\u9ED8\u8BA4\u914D\u7F6E 2 | # \u6A21\u677F\u6587\u4EF6\u4F4D\u7F6E\uFF0C\u9ED8\u8BA4\u4E3A classpath:/templates/ 3 | # spring.thymeleaf.prefix=classpath:/templates/thymeleaf/ 4 | # \u662F\u5426\u5F00\u542F\u7F13\u5B58 5 | # spring.thymeleaf.cache=false 6 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-thymeleaf/src/test/java/com/cxy35/sample/springboot/thymeleaf/SpringBootThymeleafApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.thymeleaf; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootThymeleafApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-viewcontroller/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/src/main/java/com/zhengjiam/sample/springboot/viewcontroller/SpringBootViewcontrollerApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjiam.sample.springboot.viewcontroller; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootViewcontrollerApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootViewcontrollerApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/src/main/java/com/zhengjiam/sample/springboot/viewcontroller/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.zhengjiam.sample.springboot.viewcontroller.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | 6 | /** 7 | * @Author cxy35 8 | * @Date 2019-07-26 7:09 9 | */ 10 | @Controller 11 | public class HelloController { 12 | // @GetMapping("/hello") 13 | // public String hello() { 14 | // return "hello"; 15 | // } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/src/main/resources/templates/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

hello spring boot!

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-viewcontroller/src/test/java/com/zhengjiam/sample/springboot/viewcontroller/SpringBootViewcontrollerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjiam.sample.springboot.viewcontroller; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootViewcontrollerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-welcome/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar 3 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/src/main/java/com/zhengjian/sample/springboot/welcome/SpringBootWelcomeApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.welcome; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootWelcomeApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootWelcomeApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/src/main/java/com/zhengjian/sample/springboot/welcome/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.welcome.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | 6 | /** 7 | * @Author cxy35 8 | * @Date 2019/11/11 15:12 9 | */ 10 | @Controller 11 | public class IndexController { 12 | @GetMapping("/index") 13 | public String index() { 14 | return "index"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-welcome/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

hello static!(优先静态页面)

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 |

hello thymeleaf!

9 | 10 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-welcome/src/test/java/com/zhengjian/sample/springboot/welcome/SpringBootWelcomeApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.welcome; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringBootWelcomeApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-web/spring-boot-xml/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/src/main/java/com/zhengjian/sample/springboot/xml/Hello.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.xml; 2 | 3 | /** 4 | * @Author cxy35 5 | * @Date 2019-07-24 17:11 6 | */ 7 | public class Hello { 8 | public String sayHello() { 9 | return "hello xml"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/src/main/java/com/zhengjian/sample/springboot/xml/SpringBootXmlApplication.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.xml; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootXmlApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootXmlApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/src/main/java/com/zhengjian/sample/springboot/xml/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.xml.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.context.annotation.ImportResource; 5 | 6 | /** 7 | * @Author cxy35 8 | * @Date 2019-07-24 17:12 9 | */ 10 | @Configuration 11 | @ImportResource(locations = "classpath:beans.xml") 12 | public class WebMvcConfig { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/src/main/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /spring-boot-web/spring-boot-xml/src/test/java/com/zhengjian/sample/springboot/xml/SpringBootXmlApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.zhengjian.sample.springboot.xml; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | 7 | @SpringBootTest 8 | class SpringBootXmlApplicationTests { 9 | 10 | @Autowired 11 | Hello hello; 12 | 13 | @Test 14 | void contextLoads() { 15 | System.out.println(hello.sayHello()); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /spring-boot-yaml/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /spring-boot-yaml/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cxy35/spring-boot-samples/27aaa5171216c69f6fc8553b0ac70225fac314dd/spring-boot-yaml/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /spring-boot-yaml/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip 2 | -------------------------------------------------------------------------------- /spring-boot-yaml/src/main/java/com/cxy35/sample/springboot/yaml/SpringBootYamlApplication.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.yaml; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringBootYamlApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringBootYamlApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /spring-boot-yaml/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8081 3 | servlet: 4 | context-path: /yaml 5 | 6 | book: 7 | id: 1 8 | name: 三国演义 9 | author: 罗贯中 10 | editors: 11 | - 张三 12 | - 李四 13 | chapters: 14 | - id: 1 15 | name: 第一章 桃园结义 16 | - id: 2 17 | name: 第二章 除董卓 -------------------------------------------------------------------------------- /spring-boot-yaml/src/test/java/com/cxy35/sample/springboot/yaml/SpringBootYamlApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.cxy35.sample.springboot.yaml; 2 | 3 | import com.cxy35.sample.springboot.yaml.pojo.Book; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | 8 | @SpringBootTest 9 | class SpringBootYamlApplicationTests { 10 | 11 | @Autowired 12 | Book book; 13 | 14 | @Test 15 | void contextLoads() { 16 | System.out.println(book); 17 | } 18 | 19 | } 20 | --------------------------------------------------------------------------------