├── LICENSE.txt ├── README.md ├── SpringBoot3 全栈指南教程——尚硅谷学习笔记 2023年 ├── SpringBoot3 全栈指南教程——尚硅谷学习笔记 2023年.md └── SpringBoot3 全栈指南教程——尚硅谷学习笔记 2023年.pdf └── SpringBoot3全栈指南教程课(尚硅谷)项目 └── spring-boot-3 ├── .idea ├── .gitignore ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── dataSources.xml ├── dictionaries ├── encodings.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── jarRepositories.xml ├── libraries │ ├── Maven__ch_qos_logback_logback_classic_1_4_11.xml │ ├── Maven__ch_qos_logback_logback_core_1_4_11.xml │ ├── Maven__com_alibaba_druid_1_2_16.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_15_2.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_15_2.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_15_2.xml │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_15_2.xml │ ├── Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_15_2.xml │ ├── Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_15_2.xml │ ├── Maven__com_jayway_jsonpath_json_path_2_8_0.xml │ ├── Maven__com_mysql_mysql_connector_j_8_0_32.xml │ ├── Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml │ ├── Maven__io_lettuce_lettuce_core_6_2_6_RELEASE.xml │ ├── Maven__io_micrometer_micrometer_commons_1_11_3.xml │ ├── Maven__io_micrometer_micrometer_observation_1_11_3.xml │ ├── Maven__io_netty_netty_buffer_4_1_97_Final.xml │ ├── Maven__io_netty_netty_codec_4_1_97_Final.xml │ ├── Maven__io_netty_netty_common_4_1_97_Final.xml │ ├── Maven__io_netty_netty_handler_4_1_97_Final.xml │ ├── Maven__io_netty_netty_resolver_4_1_97_Final.xml │ ├── Maven__io_netty_netty_transport_4_1_97_Final.xml │ ├── Maven__io_netty_netty_transport_native_unix_common_4_1_97_Final.xml │ ├── Maven__io_projectreactor_reactor_core_3_5_9.xml │ ├── Maven__jakarta_activation_jakarta_activation_api_2_1_2.xml │ ├── Maven__jakarta_annotation_jakarta_annotation_api_2_1_1.xml │ ├── Maven__jakarta_xml_bind_jakarta_xml_bind_api_4_0_0.xml │ ├── Maven__net_bytebuddy_byte_buddy_1_14_6.xml │ ├── Maven__net_bytebuddy_byte_buddy_agent_1_14_6.xml │ ├── Maven__net_minidev_accessors_smart_2_4_11.xml │ ├── Maven__net_minidev_json_smart_2_4_11.xml │ ├── Maven__org_apache_logging_log4j_log4j_api_2_20_0.xml │ ├── Maven__org_apache_logging_log4j_log4j_to_slf4j_2_20_0.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_core_10_1_12.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_el_10_1_12.xml │ ├── Maven__org_apache_tomcat_embed_tomcat_embed_websocket_10_1_12.xml │ ├── Maven__org_apiguardian_apiguardian_api_1_1_2.xml │ ├── Maven__org_assertj_assertj_core_3_24_2.xml │ ├── Maven__org_attoparser_attoparser_2_0_7_RELEASE.xml │ ├── Maven__org_hamcrest_hamcrest_2_2.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_5_9_3.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_api_5_9_3.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_engine_5_9_3.xml │ ├── Maven__org_junit_jupiter_junit_jupiter_params_5_9_3.xml │ ├── Maven__org_junit_platform_junit_platform_commons_1_9_3.xml │ ├── Maven__org_junit_platform_junit_platform_engine_1_9_3.xml │ ├── Maven__org_mockito_mockito_core_5_3_1.xml │ ├── Maven__org_mockito_mockito_junit_jupiter_5_3_1.xml │ ├── Maven__org_objenesis_objenesis_3_3.xml │ ├── Maven__org_opentest4j_opentest4j_1_2_0.xml │ ├── Maven__org_ow2_asm_asm_9_3.xml │ ├── Maven__org_projectlombok_lombok_1_18_28.xml │ ├── Maven__org_reactivestreams_reactive_streams_1_0_4.xml │ ├── Maven__org_skyscreamer_jsonassert_1_5_1.xml │ ├── Maven__org_slf4j_jul_to_slf4j_2_0_7.xml │ ├── Maven__org_slf4j_slf4j_api_2_0_7.xml │ ├── Maven__org_springframework_boot_spring_boot_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_autoconfigure_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_data_redis_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_json_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_logging_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_test_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_thymeleaf_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_tomcat_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_starter_web_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_test_3_1_3.xml │ ├── Maven__org_springframework_boot_spring_boot_test_autoconfigure_3_1_3.xml │ ├── Maven__org_springframework_data_spring_data_commons_3_1_3.xml │ ├── Maven__org_springframework_data_spring_data_keyvalue_3_1_3.xml │ ├── Maven__org_springframework_data_spring_data_redis_3_1_3.xml │ ├── Maven__org_springframework_spring_aop_6_0_11.xml │ ├── Maven__org_springframework_spring_beans_6_0_11.xml │ ├── Maven__org_springframework_spring_context_6_0_11.xml │ ├── Maven__org_springframework_spring_context_support_6_0_11.xml │ ├── Maven__org_springframework_spring_core_6_0_11.xml │ ├── Maven__org_springframework_spring_expression_6_0_11.xml │ ├── Maven__org_springframework_spring_jcl_6_0_11.xml │ ├── Maven__org_springframework_spring_oxm_6_0_11.xml │ ├── Maven__org_springframework_spring_test_6_0_11.xml │ ├── Maven__org_springframework_spring_tx_6_0_11.xml │ ├── Maven__org_springframework_spring_web_6_0_11.xml │ ├── Maven__org_springframework_spring_webmvc_6_0_11.xml │ ├── Maven__org_thymeleaf_thymeleaf_3_1_2_RELEASE.xml │ ├── Maven__org_thymeleaf_thymeleaf_spring6_3_1_2_RELEASE.xml │ ├── Maven__org_unbescape_unbescape_1_1_6_RELEASE.xml │ ├── Maven__org_xmlunit_xmlunit_core_2_9_1.xml │ └── Maven__org_yaml_snakeyaml_1_33.xml ├── misc.xml ├── modules.xml └── uiDesigner.xml ├── boot3-01-demo.iml ├── boot3-01-demo ├── app-demo │ ├── application.properties │ └── boot3-01-demo-1.0-SNAPSHOT.jar ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ ├── MainApplication.java │ │ │ ├── bean │ │ │ ├── Cat.java │ │ │ ├── Child.java │ │ │ ├── Dog.java │ │ │ └── Person.java │ │ │ └── controller │ │ │ └── HelloController.java │ │ └── resources │ │ ├── application.properties │ │ └── application.yml └── target │ ├── boot3-01-demo-1.0-SNAPSHOT.jar │ ├── boot3-01-demo-1.0-SNAPSHOT.jar.original │ ├── classes │ ├── application.properties │ ├── application.yml │ └── com │ │ └── myxh │ │ └── springboot │ │ ├── MainApplication.class │ │ ├── bean │ │ ├── Cat.class │ │ ├── Child.class │ │ ├── Dog.class │ │ └── Person.class │ │ └── controller │ │ └── HelloController.class │ ├── maven-archiver │ └── pom.properties │ └── maven-status │ └── maven-compiler-plugin │ ├── compile │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst │ └── testCompile │ └── default-testCompile │ ├── createdFiles.lst │ └── inputFiles.lst ├── boot3-02-demo ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ ├── Boot302DemoApplication.java │ │ │ ├── bean │ │ │ ├── Cat.java │ │ │ ├── Dog.java │ │ │ ├── Pig.java │ │ │ ├── Sheep.java │ │ │ └── User.java │ │ │ ├── config │ │ │ ├── AppConfig1.java │ │ │ └── AppConfig2.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ ├── application.properties │ │ └── ioc.xml │ └── test │ └── java │ └── com │ └── myxh │ └── springboot │ └── Boot302DemoApplicationTests.java ├── boot3-03-logging ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ └── logging │ │ │ ├── Boot303LoggingApplication.java │ │ │ └── controller │ │ │ └── HelloController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── myxh │ └── springboot │ └── logging │ └── Boot303LoggingApplicationTests.java ├── boot3-04-web ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ └── web │ │ │ ├── Boot304WebApplication.java │ │ │ ├── bean │ │ │ └── User.java │ │ │ ├── biz │ │ │ └── UserBizHandler.java │ │ │ ├── component │ │ │ └── MyYamlHttpMessageConverter.java │ │ │ ├── config │ │ │ ├── MyBeanNameViewResolver.java │ │ │ ├── MyConfig.java │ │ │ ├── WebConfig.java │ │ │ └── WebFunctionConfig.java │ │ │ ├── controller │ │ │ ├── HelloController.java │ │ │ └── WelcomeController.java │ │ │ ├── handler │ │ │ └── GlobalExceptionHandler.java │ │ │ └── service │ │ │ └── MyService.java │ └── resources │ │ ├── META-INF │ │ └── resources │ │ │ └── 大户爱.png │ │ ├── application.properties │ │ ├── image │ │ └── 大户爱.png │ │ ├── messages.properties │ │ ├── messages_en_US.properties │ │ ├── messages_zh_CN.properties │ │ ├── public │ │ └── 大户爱.png │ │ ├── resources │ │ └── 大户爱.png │ │ ├── static │ │ ├── favicon.ico │ │ ├── index.html │ │ └── 大户爱.png │ │ └── templates │ │ ├── common.html │ │ ├── error.html │ │ ├── error │ │ ├── 4xx.html │ │ └── 500.html │ │ ├── index.html │ │ ├── userList.html │ │ └── welcome.html │ └── test │ └── java │ └── com │ └── myxh │ └── springboot │ └── web │ └── Boot304WebApplicationTests.java ├── boot3-05-ssm ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ └── ssm │ │ │ ├── Boot305SsmApplication.java │ │ │ ├── bean │ │ │ └── User.java │ │ │ ├── controller │ │ │ └── UserController.java │ │ │ ├── mapper │ │ │ └── UserMapper.java │ │ │ └── service │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ └── UserServiceImpl.java │ └── resources │ │ ├── application.properties │ │ └── mapper │ │ └── UserMapper.xml │ └── test │ └── java │ └── com │ └── myxh │ └── springboot │ └── ssm │ └── Boot305SsmApplicationTests.java ├── boot3-06-features ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── app-demo │ ├── application-dev.properties │ ├── application.properties │ ├── boot3-06-features-0.0.1-SNAPSHOT.jar │ └── config │ │ ├── application-dev.properties │ │ ├── application.properties │ │ └── config │ │ ├── application-dev.properties │ │ └── application.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ └── features │ │ │ ├── Boot306FeaturesApplication.java │ │ │ ├── bean │ │ │ ├── Cat.java │ │ │ ├── Dog.java │ │ │ ├── Pig.java │ │ │ └── Sheep.java │ │ │ ├── config │ │ │ └── MyConfig.java │ │ │ ├── controller │ │ │ └── HelloController.java │ │ │ └── service │ │ │ └── HelloService.java │ └── resources │ │ ├── a.properties │ │ ├── application-dev.properties │ │ ├── application-prod.properties │ │ ├── application-test.properties │ │ ├── application.properties │ │ ├── banner.txt │ │ └── config │ │ ├── application-dev.properties │ │ └── application.properties │ └── test │ └── java │ └── com │ └── myxh │ └── springboot │ └── features │ ├── Boot306FeaturesApplicationTests.java │ └── HelloTest.java ├── boot3-07-core ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ └── core │ │ │ ├── Boot307CoreApplication.java │ │ │ ├── controller │ │ │ └── LoginController.java │ │ │ ├── entity │ │ │ └── UserEntity.java │ │ │ ├── event │ │ │ ├── EventPublisher.java │ │ │ └── LoginSuccessEvent.java │ │ │ ├── listener │ │ │ ├── MyAppListener.java │ │ │ └── MyListener.java │ │ │ ├── robot │ │ │ ├── controller │ │ │ │ └── RobotController.java │ │ │ ├── properties │ │ │ │ └── RobotProperties.java │ │ │ └── service │ │ │ │ └── RobotService.java │ │ │ └── service │ │ │ ├── AccountService.java │ │ │ ├── CouponService.java │ │ │ ├── HelloService.java │ │ │ └── SystemService.java │ └── resources │ │ ├── META-INF │ │ └── spring.factories │ │ └── application.properties │ └── test │ └── java │ └── com │ └── myxh │ └── springboot │ └── core │ └── Boot307CoreApplicationTests.java ├── boot3-08-robot-starter ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── myxh │ │ │ └── springboot │ │ │ └── starter │ │ │ └── robot │ │ │ ├── RobotAutoConfiguration.java │ │ │ ├── annotation │ │ │ └── EnableRobot.java │ │ │ ├── controller │ │ │ └── RobotController.java │ │ │ ├── properties │ │ │ └── RobotProperties.java │ │ │ └── service │ │ │ └── RobotService.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── com │ └── myxh │ └── springboot │ └── starter │ └── Boot308RobotStarterApplicationTests.java ├── my.log ├── spring-boot-3.iml └── sql └── spring_boot.sql /SpringBoot3 全栈指南教程——尚硅谷学习笔记 2023年/SpringBoot3 全栈指南教程——尚硅谷学习笔记 2023年.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3 全栈指南教程——尚硅谷学习笔记 2023年/SpringBoot3 全栈指南教程——尚硅谷学习笔记 2023年.pdf -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # 默认忽略的文件 2 | /shelf/ 3 | /workspace.xml 4 | # 基于编辑器的 HTTP 客户端请求 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 30 | 31 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | redis 6 | true 7 | jdbc.RedisDriver 8 | jdbc:redis://localhost:6379/0 9 | $ProjectFileDir$ 10 | 11 | 12 | mysql.8 13 | true 14 | com.mysql.cj.jdbc.Driver 15 | jdbc:mysql://localhost:3306/spring_boot 16 | $ProjectFileDir$ 17 | 18 | 19 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/dictionaries: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_4_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__ch_qos_logback_logback_core_1_4_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_alibaba_druid_1_2_16.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_15_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_15_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_15_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_15_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_15_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_15_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_mysql_mysql_connector_j_8_0_32.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_lettuce_lettuce_core_6_2_6_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_micrometer_micrometer_commons_1_11_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_micrometer_micrometer_observation_1_11_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_netty_netty_buffer_4_1_97_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_netty_netty_codec_4_1_97_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_netty_netty_common_4_1_97_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_netty_netty_handler_4_1_97_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_netty_netty_resolver_4_1_97_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_netty_netty_transport_4_1_97_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_netty_netty_transport_native_unix_common_4_1_97_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__io_projectreactor_reactor_core_3_5_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_2_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__jakarta_annotation_jakarta_annotation_api_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_4_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_14_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_14_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__net_minidev_accessors_smart_2_4_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__net_minidev_json_smart_2_4_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_20_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_20_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_10_1_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_10_1_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_10_1_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_assertj_assertj_core_3_24_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_attoparser_attoparser_2_0_7_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_mockito_mockito_core_5_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_5_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_objenesis_objenesis_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_opentest4j_opentest4j_1_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_ow2_asm_asm_9_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_projectlombok_lombok_1_18_28.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_2_0_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_slf4j_slf4j_api_2_0_7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_thymeleaf_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_data_spring_data_commons_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_data_spring_data_redis_3_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_aop_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_beans_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_context_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_context_support_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_core_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_expression_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_jcl_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_oxm_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_test_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_tx_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_web_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_springframework_spring_webmvc_6_0_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_thymeleaf_thymeleaf_3_1_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_thymeleaf_thymeleaf_spring6_3_1_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_unbescape_unbescape_1_1_6_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_9_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/libraries/Maven__org_yaml_snakeyaml_1_33.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/app-demo/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | # server.port=8081 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/app-demo/boot3-01-demo-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/app-demo/boot3-01-demo-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.myxh.springboot 8 | boot3-01-demo 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 13 | org.springframework.boot 14 | spring-boot-starter-parent 15 | 3.1.3 16 | 17 | 18 | 19 | 8.0.32 20 | 21 | 22 | 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-data-redis 32 | 33 | 34 | 35 | com.mysql 36 | mysql-connector-j 37 | 38 | ${mysql.version} 39 | 40 | 41 | 42 | org.projectlombok 43 | lombok 44 | compile 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | org.springframework.boot 53 | spring-boot-maven-plugin 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/java/com/myxh/springboot/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot; 2 | 3 | import com.myxh.springboot.bean.Person; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/11 10 | * @description 启动 SpringBoot 项目的主入口程序 11 | */ 12 | // 主程序:com.myxh.springboot 13 | // @SpringBootConfiguration 14 | // @EnableAutoConfiguration 15 | // @ComponentScan("com.myxh.springboot") 16 | // @SpringBootApplication(scanBasePackages = "com.myxh.springboot") 17 | 18 | // 这是一个 SpringBoot 应用 19 | @SpringBootApplication 20 | public class MainApplication 21 | { 22 | public static void main(String[] args) 23 | { 24 | // Java10:局部变量类型的自动推断 25 | var ioc = SpringApplication.run(MainApplication.class, args); 26 | 27 | // 1、获取容器中所有组件的名字 28 | String[] beanNames = ioc.getBeanDefinitionNames(); 29 | 30 | // 2、挨个遍历 31 | /* 32 | dispatcherServlet、beanNameViewResolver、characterEncodingFilter、multipartResolver 33 | SpringBoot 把以前配置的核心组件现在都给自动配置好了 34 | */ 35 | for (String beanName : beanNames) 36 | { 37 | System.out.println("beanName = " + beanName); 38 | } 39 | 40 | Person person = ioc.getBean(Person.class); 41 | System.out.println("person = " + person); 42 | 43 | System.out.println("------------------------------用 | 表示大文本,会保留格式------------------------------"); 44 | 45 | String text1 = person.getChild().getText().get(2); 46 | System.out.println("text1 = " + text1); 47 | 48 | System.out.println("------------------------------用 > 表示大文本,会压缩换行变成空格------------------------------"); 49 | 50 | String text2 = person.getChild().getText().get(3); 51 | System.out.println("text2 = " + text2); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/java/com/myxh/springboot/bean/Cat.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/11 11 | */ 12 | @Component 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | @Data 16 | public class Cat 17 | { 18 | private String name; 19 | private Integer age; 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/java/com/myxh/springboot/bean/Child.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.stereotype.Component; 7 | 8 | import java.util.Date; 9 | import java.util.List; 10 | 11 | /** 12 | * @author MYXH 13 | * @date 2023/9/11 14 | */ 15 | @Component 16 | @NoArgsConstructor 17 | @AllArgsConstructor 18 | @Data 19 | public class Child 20 | { 21 | private String name; 22 | private Integer age; 23 | private Date birthDay; 24 | // 数组 25 | private List text; 26 | } -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/java/com/myxh/springboot/bean/Dog.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/11 11 | */ 12 | @Component 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | @Data 16 | public class Dog 17 | { 18 | private String name; 19 | private Integer age; 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/java/com/myxh/springboot/bean/Person.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.boot.context.properties.ConfigurationProperties; 7 | import org.springframework.stereotype.Component; 8 | 9 | import java.util.Date; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * @author MYXH 15 | * @date 2023/9/11 16 | */ 17 | @Component 18 | // 和配置文件 person 前缀的所有配置进行绑定 19 | @ConfigurationProperties(prefix = "person") 20 | // 自动生成无参构造器 21 | @NoArgsConstructor 22 | // 自动生成全参构造器 23 | @AllArgsConstructor 24 | // 自动生成 JavaBean 属性的 getter/setter 25 | @Data 26 | public class Person 27 | { 28 | private String name; 29 | private Integer age; 30 | private Date birthDay; 31 | private Boolean like; 32 | // 嵌套对象 33 | private Child child; 34 | // 数组(里面是对象) 35 | private List dogs; 36 | // Map 37 | private Map cats; 38 | } 39 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/java/com/myxh/springboot/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.controller; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.data.redis.core.StringRedisTemplate; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/11 11 | */ 12 | // @Controller 13 | // @ResponseBody 14 | @RestController 15 | public class HelloController 16 | { 17 | @Autowired 18 | StringRedisTemplate redisTemplate; 19 | 20 | @GetMapping("/hello") 21 | public String hello() 22 | { 23 | return "Hello, Spring Boot 3!"; 24 | } 25 | 26 | @GetMapping("/increment") 27 | public String increment() 28 | { 29 | Long num1 = redisTemplate.opsForValue().increment("num1"); 30 | 31 | return "增加后的值:" + num1; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # server.port=8080 2 | 3 | # spring.servlet.multipart.max-file-size=10MB 4 | 5 | # \u914D\u7F6E Redis 6 | # spring.data.redis.host=localhost 7 | # spring.data.redis.port=6379 8 | 9 | # properties \u8868\u793A\u590D\u6742\u5BF9\u8C61 10 | # person.name=\u5F20\u4E09 11 | # person.age=35 12 | # person.birthDay=1988/01/01 00:00:00 13 | # person.like=true 14 | # person.child.name=\u674E\u56DB 15 | # person.child.age=12 16 | # person.child.birthDay=2011/01/01 17 | # person.child.text[0]=hello 18 | # person.child.text[1]=world 19 | # person.dogs[0].name=\u5C0F\u9ED1 20 | # person.dogs[0].age=2 21 | # person.dogs[1].name=\u5C0F\u767D 22 | # person.dogs[1].age=1 23 | # person.cats.cat1.name=\u5C0F\u84DD 24 | # person.cats.cat1.age=2 25 | # person.cats.cat2.name=\u5C0F\u7070 26 | # person.cats.cat2.age=1 -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # 1、k: v,k v 之前是空格区分 2 | # 2、属性有层级关系,使用下一行,空两个空格 3 | # 3、左侧对齐的代表同一层级的属性 4 | 5 | --- 6 | 7 | server: 8 | port: 8080 9 | # port: 8081 10 | 11 | spring: 12 | servlet: 13 | multipart: 14 | max-file-size: 10MB 15 | 16 | # 配置 Redis 17 | data: 18 | redis: 19 | host: localhost 20 | port: 6379 21 | 22 | # 下边是一个单独文档 23 | --- 24 | 25 | # yaml 表示复杂对象 26 | person: 27 | name: 张三 28 | age: 35 29 | birth-day: 1988/01/01 00:00:00 30 | like: true 31 | 32 | child: 33 | name: 李四 34 | age: 12 35 | birth-day: 2011/01/01 36 | # text: ["he\nllo",'wor\nld'] 37 | text: 38 | - "he\nllo" 39 | - 'wor\nld' 40 | - | 41 | cats: 42 | cat1: 43 | name: 小蓝 44 | age: 2 45 | 46 | # 对象也可用 {} 表示 47 | cat2: {name: 小灰,age: 1} 48 | - > 49 | cats: 50 | cat1: 51 | name: 小蓝 52 | age: 2 53 | 54 | # 对象也可用 {} 表示 55 | cat2: {name: 小灰,age: 1} 56 | 57 | dogs: 58 | # 数组也可用 - 表示 59 | - name: 小黑 60 | age: 2 61 | - name: 小白 62 | age: 1 63 | 64 | cats: 65 | cat1: 66 | name: 小蓝 67 | age: 2 68 | 69 | # 对象也可用 {} 表示 70 | cat2: {name: 小灰,age: 1} -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/boot3-01-demo-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/boot3-01-demo-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/boot3-01-demo-1.0-SNAPSHOT.jar.original: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/boot3-01-demo-1.0-SNAPSHOT.jar.original -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/application.properties: -------------------------------------------------------------------------------- 1 | # server.port=8080 2 | 3 | # spring.servlet.multipart.max-file-size=10MB 4 | 5 | # \u914D\u7F6E Redis 6 | # spring.data.redis.host=localhost 7 | # spring.data.redis.port=6379 8 | 9 | # properties \u8868\u793A\u590D\u6742\u5BF9\u8C61 10 | # person.name=\u5F20\u4E09 11 | # person.age=35 12 | # person.birthDay=1988/01/01 00:00:00 13 | # person.like=true 14 | # person.child.name=\u674E\u56DB 15 | # person.child.age=12 16 | # person.child.birthDay=2011/01/01 17 | # person.child.text[0]=hello 18 | # person.child.text[1]=world 19 | # person.dogs[0].name=\u5C0F\u9ED1 20 | # person.dogs[0].age=2 21 | # person.dogs[1].name=\u5C0F\u767D 22 | # person.dogs[1].age=1 23 | # person.cats.cat1.name=\u5C0F\u84DD 24 | # person.cats.cat1.age=2 25 | # person.cats.cat2.name=\u5C0F\u7070 26 | # person.cats.cat2.age=1 -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/application.yml: -------------------------------------------------------------------------------- 1 | # 1、k: v,k v 之前是空格区分 2 | # 2、属性有层级关系,使用下一行,空两个空格 3 | # 3、左侧对齐的代表同一层级的属性 4 | 5 | --- 6 | 7 | server: 8 | port: 8080 9 | # port: 8081 10 | 11 | spring: 12 | servlet: 13 | multipart: 14 | max-file-size: 10MB 15 | 16 | # 配置 Redis 17 | data: 18 | redis: 19 | host: localhost 20 | port: 6379 21 | 22 | # 下边是一个单独文档 23 | --- 24 | 25 | # yaml 表示复杂对象 26 | person: 27 | name: 张三 28 | age: 35 29 | birth-day: 1988/01/01 00:00:00 30 | like: true 31 | 32 | child: 33 | name: 李四 34 | age: 12 35 | birth-day: 2011/01/01 36 | # text: ["he\nllo",'wor\nld'] 37 | text: 38 | - "he\nllo" 39 | - 'wor\nld' 40 | - | 41 | cats: 42 | cat1: 43 | name: 小蓝 44 | age: 2 45 | 46 | # 对象也可用 {} 表示 47 | cat2: {name: 小灰,age: 1} 48 | - > 49 | cats: 50 | cat1: 51 | name: 小蓝 52 | age: 2 53 | 54 | # 对象也可用 {} 表示 55 | cat2: {name: 小灰,age: 1} 56 | 57 | dogs: 58 | # 数组也可用 - 表示 59 | - name: 小黑 60 | age: 2 61 | - name: 小白 62 | age: 1 63 | 64 | cats: 65 | cat1: 66 | name: 小蓝 67 | age: 2 68 | 69 | # 对象也可用 {} 表示 70 | cat2: {name: 小灰,age: 1} -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/MainApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/MainApplication.class -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Cat.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Cat.class -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Child.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Child.class -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Dog.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Dog.class -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Person.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/bean/Person.class -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/controller/HelloController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/classes/com/myxh/springboot/controller/HelloController.class -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | artifactId=boot3-01-demo 2 | groupId=com.myxh.springboot 3 | version=1.0-SNAPSHOT 4 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | com\myxh\springboot\bean\Dog.class 2 | com\myxh\springboot\bean\Person.class 3 | com\myxh\springboot\bean\Child.class 4 | com\myxh\springboot\MainApplication.class 5 | com\myxh\springboot\bean\Cat.class 6 | com\myxh\springboot\controller\HelloController.class 7 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\CodeProjects\Java\SpringBoot\SpringBoot3全栈指南教程课(尚硅谷)项目\spring-boot-3\boot3-01-demo\src\main\java\com\myxh\springboot\bean\Child.java 2 | D:\CodeProjects\Java\SpringBoot\SpringBoot3全栈指南教程课(尚硅谷)项目\spring-boot-3\boot3-01-demo\src\main\java\com\myxh\springboot\bean\Cat.java 3 | D:\CodeProjects\Java\SpringBoot\SpringBoot3全栈指南教程课(尚硅谷)项目\spring-boot-3\boot3-01-demo\src\main\java\com\myxh\springboot\bean\Dog.java 4 | D:\CodeProjects\Java\SpringBoot\SpringBoot3全栈指南教程课(尚硅谷)项目\spring-boot-3\boot3-01-demo\src\main\java\com\myxh\springboot\controller\HelloController.java 5 | D:\CodeProjects\Java\SpringBoot\SpringBoot3全栈指南教程课(尚硅谷)项目\spring-boot-3\boot3-01-demo\src\main\java\com\myxh\springboot\MainApplication.java 6 | D:\CodeProjects\Java\SpringBoot\SpringBoot3全栈指南教程课(尚硅谷)项目\spring-boot-3\boot3-01-demo\src\main\java\com\myxh\springboot\bean\Person.java 7 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-01-demo/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/.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 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.1.3 9 | 10 | 11 | com.myxh.springboot 12 | boot3-02-demo 13 | 0.0.1-SNAPSHOT 14 | boot3-02-demo 15 | boot3-02-demo 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-thymeleaf 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-test 31 | test 32 | 33 | 34 | com.alibaba 35 | druid 36 | 1.2.16 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.springframework.boot 44 | spring-boot-maven-plugin 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/Boot302DemoApplication.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot; 2 | 3 | import com.alibaba.druid.FastsqlException; 4 | import com.myxh.springboot.bean.Cat; 5 | import com.myxh.springboot.bean.Dog; 6 | import com.myxh.springboot.bean.Sheep; 7 | import com.myxh.springboot.bean.User; 8 | import org.springframework.boot.SpringApplication; 9 | import org.springframework.boot.autoconfigure.SpringBootApplication; 10 | 11 | @SpringBootApplication 12 | public class Boot302DemoApplication 13 | { 14 | public static void main(String[] args) 15 | { 16 | var ioc = SpringApplication.run(Boot302DemoApplication.class, args); 17 | String[] beanNames = ioc.getBeanDefinitionNames(); 18 | 19 | for (String beanName : beanNames) 20 | { 21 | System.out.println("beanName = " + beanName); 22 | } 23 | 24 | String[] beanNamesForType1 = ioc.getBeanNamesForType(User.class); 25 | 26 | for (String beanNameForType1 : beanNamesForType1) 27 | { 28 | System.out.println("beanNameForType1 = " + beanNameForType1); 29 | } 30 | 31 | Object userBean1 = ioc.getBean("userBean"); 32 | Object userBean2 = ioc.getBean("userBean"); 33 | System.out.println("userBean1 == userBean2 = " + (userBean1 == userBean2)); 34 | 35 | String[] beanNamesForType2 = ioc.getBeanNamesForType(FastsqlException.class); 36 | 37 | for (String beanNameForType2 : beanNamesForType2) 38 | { 39 | System.out.println("beanNameForType2 = " + beanNameForType2); 40 | } 41 | 42 | String[] beanNamesForType3 = ioc.getBeanNamesForType(Cat.class); 43 | 44 | for (String beanNameForType3 : beanNamesForType3) 45 | { 46 | System.out.println("cat = " + beanNameForType3); 47 | } 48 | 49 | String[] beanNamesForType4 = ioc.getBeanNamesForType(Dog.class); 50 | 51 | for (String beanNameForType4 : beanNamesForType4) 52 | { 53 | System.out.println("dog = " + beanNameForType4); 54 | } 55 | 56 | Object pig = ioc.getBean("pig"); 57 | System.out.println("pig = " + pig); 58 | 59 | Object sheep = ioc.getBean(Sheep.class); 60 | System.out.println("sheep = " + sheep); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/bean/Cat.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | /** 6 | * @author MYXH 7 | * @date 2023/9/11 8 | */ 9 | @Component 10 | public class Cat 11 | { 12 | private Long id; 13 | private String name; 14 | 15 | public Cat() 16 | { 17 | 18 | } 19 | 20 | public Cat(Long id, String name) 21 | { 22 | this.id = id; 23 | this.name = name; 24 | } 25 | 26 | public Long getId() 27 | { 28 | return id; 29 | } 30 | 31 | public void setId(Long id) 32 | { 33 | this.id = id; 34 | } 35 | 36 | public String getName() 37 | { 38 | return name; 39 | } 40 | 41 | public void setName(String name) 42 | { 43 | this.name = name; 44 | } 45 | 46 | @Override 47 | public String toString() 48 | { 49 | return "User{" + 50 | "id=" + id + 51 | ", name='" + name + '\'' + 52 | '}'; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/bean/Dog.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | /** 6 | * @author MYXH 7 | * @date 2023/9/11 8 | */ 9 | @Component 10 | public class Dog 11 | { 12 | private Long id; 13 | private String name; 14 | 15 | public Dog() 16 | { 17 | 18 | } 19 | 20 | public Dog(Long id, String name) 21 | { 22 | this.id = id; 23 | this.name = name; 24 | } 25 | 26 | public Long getId() 27 | { 28 | return id; 29 | } 30 | 31 | public void setId(Long id) 32 | { 33 | this.id = id; 34 | } 35 | 36 | public String getName() 37 | { 38 | return name; 39 | } 40 | 41 | public void setName(String name) 42 | { 43 | this.name = name; 44 | } 45 | 46 | @Override 47 | public String toString() 48 | { 49 | return "User{" + 50 | "id=" + id + 51 | ", name='" + name + '\'' + 52 | '}'; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/bean/Pig.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | /** 4 | * @author MYXH 5 | * @date 2023/9/11 6 | */ 7 | // @Component 8 | // @ConfigurationProperties(prefix = "pig") 9 | public class Pig 10 | { 11 | private Long id; 12 | private String name; 13 | private Integer age; 14 | 15 | public Pig() 16 | { 17 | 18 | } 19 | 20 | public Pig(Long id, String name, Integer age) 21 | { 22 | this.id = id; 23 | this.name = name; 24 | this.age = age; 25 | } 26 | 27 | public Long getId() 28 | { 29 | return id; 30 | } 31 | 32 | public void setId(Long id) 33 | { 34 | this.id = id; 35 | } 36 | 37 | public String getName() 38 | { 39 | return name; 40 | } 41 | 42 | public void setName(String name) 43 | { 44 | this.name = name; 45 | } 46 | 47 | public Integer getAge() 48 | { 49 | return age; 50 | } 51 | 52 | public void setAge(Integer age) 53 | { 54 | this.age = age; 55 | } 56 | 57 | @Override 58 | public String toString() 59 | { 60 | return "Pig{" + 61 | "id=" + id + 62 | ", name='" + name + '\'' + 63 | ", age=" + age + 64 | '}'; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/bean/Sheep.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | 5 | /** 6 | * @author MYXH 7 | * @date 2023/9/11 8 | */ 9 | // @Component 10 | @ConfigurationProperties(prefix = "sheep") 11 | public class Sheep 12 | { 13 | private Long id; 14 | private String name; 15 | private Integer age; 16 | 17 | public Sheep() 18 | { 19 | 20 | } 21 | 22 | public Sheep(Long id, String name, Integer age) 23 | { 24 | this.id = id; 25 | this.name = name; 26 | this.age = age; 27 | } 28 | 29 | public Long getId() 30 | { 31 | return id; 32 | } 33 | 34 | public void setId(Long id) 35 | { 36 | this.id = id; 37 | } 38 | 39 | public String getName() 40 | { 41 | return name; 42 | } 43 | 44 | public void setName(String name) 45 | { 46 | this.name = name; 47 | } 48 | 49 | public Integer getAge() 50 | { 51 | return age; 52 | } 53 | 54 | public void setAge(Integer age) 55 | { 56 | this.age = age; 57 | } 58 | 59 | @Override 60 | public String toString() 61 | { 62 | return "Pig{" + 63 | "id=" + id + 64 | ", name='" + name + '\'' + 65 | ", age=" + age + 66 | '}'; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/bean/User.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.bean; 2 | 3 | import org.springframework.context.annotation.Scope; 4 | import org.springframework.stereotype.Component; 5 | 6 | /** 7 | * @author MYXH 8 | * @date 2023/9/11 9 | */ 10 | @Component 11 | @Scope("prototype") 12 | public class User 13 | { 14 | private Long id; 15 | private String name; 16 | 17 | public User() 18 | { 19 | 20 | } 21 | 22 | public User(Long id, String name) 23 | { 24 | this.id = id; 25 | this.name = name; 26 | } 27 | 28 | public Long getId() 29 | { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) 34 | { 35 | this.id = id; 36 | } 37 | 38 | public String getName() 39 | { 40 | return name; 41 | } 42 | 43 | public void setName(String name) 44 | { 45 | this.name = name; 46 | } 47 | 48 | @Override 49 | public String toString() 50 | { 51 | return "User{" + 52 | "id=" + id + 53 | ", name='" + name + '\'' + 54 | '}'; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/config/AppConfig1.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.config; 2 | 3 | import com.alibaba.druid.FastsqlException; 4 | import com.myxh.springboot.bean.Pig; 5 | import com.myxh.springboot.bean.Sheep; 6 | import com.myxh.springboot.bean.User; 7 | import org.springframework.boot.SpringBootConfiguration; 8 | import org.springframework.boot.context.properties.ConfigurationProperties; 9 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 10 | import org.springframework.context.annotation.Bean; 11 | import org.springframework.context.annotation.Import; 12 | import org.springframework.context.annotation.Scope; 13 | 14 | /** 15 | * @author MYXH 16 | * @date 2023/9/11 17 | */ 18 | // 给容器中放指定类型的组件,组件的名字默认是全类名 19 | @Import(FastsqlException.class) 20 | // 这是一个配置类,替代以前的配置文件,配置类本身也是容器中的组件 21 | // @Configuration 22 | @SpringBootConfiguration 23 | // 导入第三方写好的组件进行属性绑定,SpringBoot 默认只扫描自己主程序所在的包,如果导入第三方包,即使组件上标注了 @Component、@ConfigurationProperties 注解也没用,因为组件都扫描不进来 24 | // 1、开启 Sheep 组件的属性绑定 25 | // 2、默认会把这个组件自己放到容器中 26 | @EnableConfigurationProperties(Sheep.class) 27 | public class AppConfig1 28 | { 29 | /** 30 | * 1、组件默认是单实例的 31 | * 32 | * @return userBean 33 | */ 34 | // 替代以前的 Bean 标签,组件在容器中的名字默认是方法名,可以直接修改注解的值 35 | @Bean("userBean") 36 | @Scope("prototype") 37 | public User userBean() 38 | { 39 | var user = new User(); 40 | user.setId(1L); 41 | user.setName("MYXH"); 42 | 43 | return user; 44 | } 45 | 46 | /* 47 | @Bean 48 | public FastsqlException fastException() 49 | { 50 | return new FastsqlException(); 51 | } 52 | */ 53 | 54 | @Bean 55 | @ConfigurationProperties(prefix = "pig") 56 | public Pig pig() 57 | { 58 | // 自己 new 的新 pig 59 | return new Pig(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/config/AppConfig2.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.config; 2 | 3 | import com.myxh.springboot.bean.Cat; 4 | import com.myxh.springboot.bean.Dog; 5 | import com.myxh.springboot.bean.User; 6 | import org.springframework.boot.SpringBootConfiguration; 7 | import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; 8 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; 9 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; 10 | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass; 11 | import org.springframework.context.annotation.Bean; 12 | 13 | /* 14 | * @author MYXH 15 | * @date 2023/9/11 16 | */ 17 | @SpringBootConfiguration 18 | public class AppConfig2 19 | { 20 | @Bean 21 | // 放在方法级别,单独对这个方法进行注解判断 22 | // 放在类级别,如果注解判断生效,则整个配置类才生效 23 | @ConditionalOnClass(name = "com.alibaba.druid.FastsqlException") 24 | public Cat cat1() 25 | { 26 | return new Cat(); 27 | } 28 | 29 | @Bean 30 | @ConditionalOnMissingClass(value = "com.alibaba.druid.FastsqlException") 31 | public Dog dog1() 32 | { 33 | return new Dog(); 34 | } 35 | 36 | @Bean 37 | @ConditionalOnBean(name = "dog1") 38 | public User zhangsan() 39 | { 40 | return new User(); 41 | } 42 | 43 | @Bean 44 | @ConditionalOnMissingBean(name = "dog1") 45 | public User lisi() 46 | { 47 | return new User(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/java/com/myxh/springboot/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.controller; 2 | 3 | import org.springframework.web.bind.annotation.GetMapping; 4 | import org.springframework.web.bind.annotation.RestController; 5 | 6 | /** 7 | * @author MYXH 8 | * @date 2023/9/11 9 | */ 10 | @RestController 11 | public class HelloController 12 | { 13 | @GetMapping("/hello") 14 | public String hello() 15 | { 16 | return "Hello, Spring Boot 3!"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | pig.id=1 2 | pig.name=\u4F69\u5947 3 | pig.age=5 4 | 5 | sheep.id=1 6 | sheep.name=\u8096\u6069 7 | sheep.age=5 8 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/main/resources/ioc.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-02-demo/src/test/java/com/myxh/springboot/Boot302DemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class Boot302DemoApplicationTests 8 | { 9 | @Test 10 | void contextLoads() 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/.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 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/src/main/java/com/myxh/springboot/logging/Boot303LoggingApplication.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.logging; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Boot303LoggingApplication 8 | { 9 | public static void main(String[] args) 10 | { 11 | SpringApplication.run(Boot303LoggingApplication.class, args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/src/main/java/com/myxh/springboot/logging/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.logging.controller; 2 | 3 | import lombok.extern.slf4j.Slf4j; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/14 10 | */ 11 | @Slf4j 12 | @RestController 13 | public class HelloController 14 | { 15 | // Logger logger = LoggerFactory.getLogger(getClass()); 16 | 17 | @GetMapping("/hello") 18 | public String hello(String a, String b) 19 | { 20 | // SpringBoot 底层默认的日志级别 info 21 | log.trace("trace 日志......"); 22 | log.debug("debug 日志......"); 23 | log.info("info 日志...... 参数 a:{} 参数 b:{}",a, b); 24 | log.warn("warn 日志......"); 25 | log.error("error 日志......"); 26 | 27 | // logger.info("方法进来了"); 28 | log.info("方法进来了"); 29 | 30 | return "hello"; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{15} ===> %msg%n 2 | # 2023-09-14 19:06:09.974 INFO [main] o.s.b.w.e.t.TomcatWebServer ===> Tomcat initialized with port(s): 8080 (http) 3 | 4 | logging.pattern.dateformat=yyyy-MM-dd HH:mm:ss.SSS 5 | # 2023-09-14 19:10:51.080 INFO 91196 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 6 | 7 | # \u9ED8\u8BA4\u6240\u6709\u65E5\u5FD7\u6CA1\u6709\u7CBE\u786E\u6307\u5B9A\u7EA7\u522B\u5C31\u4F7F\u7528 root \u7684\u9ED8\u8BA4\u7EA7\u522B 8 | # logging.level.root=info 9 | 10 | # \u7CBE\u786E\u8C03\u6574\u67D0\u4E2A\u5305\u4E0B\u7684\u65E5\u5FD7\u7EA7\u522B 11 | # logging.level.com.myxh.springboot.logging.controller=debug 12 | # logging.level.com.myxh.springboot.logging.service=debug 13 | # logging.level.com.myxh.springboot.logging.a=debug 14 | # logging.level.com.myxh.springboot.logging.b=debug 15 | 16 | # \u65E5\u5FD7\u5206\u7EC4\u914D\u7F6E 17 | logging.group.ab=com.myxh.springboot.logging.controller, com.myxh.springboot.logging.service, com.myxh.springboot.logging.a, com.myxh.springboot.logging.b 18 | logging.level.ab=debug 19 | 20 | logging.level.web=debug 21 | logging.level.sql=debug 22 | 23 | # \u6307\u5B9A\u65E5\u5FD7\u6587\u4EF6\u7684\u8DEF\u5F84\uFF0C\u65E5\u5FD7\u6587\u4EF6\u9ED8\u8BA4\u540D\u53EB spring.log 24 | # logging.file.path=.\\ 25 | 26 | # \u6307\u5B9A\u65E5\u5FD7\u6587\u4EF6\u7684\u540D\uFF0Cfilename \u548C path \u7684\u914D\u7F6E\u540C\u65F6\u5B58\u5728\u53EA\u770B filename 27 | # 1\u3001\u53EA\u5199\u540D\u5B57\uFF0C\u5C31\u751F\u6210\u5230\u5F53\u524D\u9879\u76EE\u540C\u4F4D\u7F6E\u7684 my.log 28 | # 2\u3001\u5199\u540D\u5B57+\u8DEF\u5F84\uFF0C\u751F\u6210\u5230\u6307\u5B9A\u4F4D\u7F6E\u7684\u6307\u5B9A\u6587\u4EF6 29 | logging.file.name=my.log 30 | 31 | # \u65E5\u5FD7\u5F52\u6863\u3001\u5207\u5272 32 | logging.logback.rollingpolicy.file-name-pattern=${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz 33 | logging.logback.rollingpolicy.max-file-size=1MB 34 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-03-logging/src/test/java/com/myxh/springboot/logging/Boot303LoggingApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.logging; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class Boot303LoggingApplicationTests 8 | { 9 | @Test 10 | void contextLoads() 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/.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 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/Boot304WebApplication.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Boot304WebApplication 8 | { 9 | public static void main(String[] args) 10 | { 11 | SpringApplication.run(Boot304WebApplication.class, args); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/bean/User.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web.bean; 2 | 3 | import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Data; 6 | import lombok.NoArgsConstructor; 7 | import org.springframework.boot.context.properties.ConfigurationProperties; 8 | import org.springframework.stereotype.Component; 9 | 10 | /** 11 | * @author MYXH 12 | * @date 2023/9/18 13 | */ 14 | // 可以写出为 xml 文档 15 | @JacksonXmlRootElement 16 | @Component 17 | // 和配置文件 person 前缀的所有配置进行绑定 18 | @ConfigurationProperties(prefix = "user") 19 | // 自动生成无参构造器 20 | @NoArgsConstructor 21 | // 自动生成全参构造器 22 | @AllArgsConstructor 23 | // 自动生成 JavaBean 属性的 getter/setter 24 | @Data 25 | public class User 26 | { 27 | private Long id; 28 | private String userName; 29 | private String password; 30 | private Integer age; 31 | private String email; 32 | private String role; 33 | } 34 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/config/MyBeanNameViewResolver.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web.config; 2 | 3 | import jakarta.servlet.http.HttpServletRequest; 4 | import jakarta.servlet.http.HttpServletResponse; 5 | import org.springframework.stereotype.Component; 6 | import org.springframework.web.servlet.View; 7 | 8 | import java.util.Map; 9 | 10 | /** 11 | * @author MYXH 12 | * @date 2023/9/18 13 | */ 14 | @Component("myBeanName") 15 | public class MyBeanNameViewResolver implements View 16 | { 17 | @Override 18 | public String getContentType() 19 | { 20 | return View.super.getContentType(); 21 | } 22 | 23 | @Override 24 | public void render(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception 25 | { 26 | response.getWriter().write("myBeanName"); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/config/WebConfig.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 5 | 6 | /** 7 | * @author MYXH 8 | * @date 2023/9/18 9 | */ 10 | // 禁用 SpringMVC 的默认功能,全面接管 SpringMVC 11 | // @EnableWebMvc 12 | @Configuration 13 | public class WebConfig implements WebMvcConfigurer 14 | { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/config/WebFunctionConfig.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web.config; 2 | 3 | import com.myxh.springboot.web.biz.UserBizHandler; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.http.MediaType; 7 | import org.springframework.web.servlet.function.RequestPredicates; 8 | import org.springframework.web.servlet.function.RouterFunction; 9 | import org.springframework.web.servlet.function.RouterFunctions; 10 | import org.springframework.web.servlet.function.ServerResponse; 11 | 12 | /** 13 | * @author MYXH 14 | * @date 2023/9/18 15 | * @description 16 | * 场景:User RESTful - CRUD 17 | * GET /user/1 获取 1 号用户 18 | * GET /users 获取所有用户 19 | * POST /user 请求体携带 JSON,新增一个用户 20 | * PUT /user/1 请求体携带 JSON,修改 1 号用户 21 | * DELETE /user/1 删除 1 号用户 22 | */ 23 | @Configuration 24 | public class WebFunctionConfig 25 | { 26 | /** 27 | * 函数式 Web 28 | * 1、给容器中放一个 Bean: 类型是 RouterFunction,集中所有路由信息 29 | * 2、每个业务准备一个自己的 Handler 30 | *
31 | * 核心四大对象 32 | * 1、RouterFunction:定义路由信息,发什么请求,谁来处理 33 | * 2、RequestPredicate:定义请求,请求谓语,请求方式(GET、POST),请求参数 34 | * 3、ServerRequest:封装请求完整数据 35 | * 4、ServerResponse:封装响应完整数据 36 | * 37 | * @param userBizHandler 用户业务处理程序(userBizHandler 会被自动注入进来) 38 | * @return routerFunction 路由器功能 39 | */ 40 | @Bean 41 | public RouterFunction userRouter(UserBizHandler userBizHandler) 42 | { 43 | // 开始定义路由信息 44 | RouterFunction routerFunction = RouterFunctions.route() 45 | .GET("/user/{id}", RequestPredicates.accept(MediaType.ALL), userBizHandler::getUser) 46 | .GET("/users", userBizHandler::getUsers) 47 | .POST("/user", RequestPredicates.accept(MediaType.APPLICATION_JSON), userBizHandler::saveUser) 48 | .PUT("/user{id}", RequestPredicates.accept(MediaType.APPLICATION_JSON), userBizHandler::updateUser) 49 | .DELETE("/user{id}", userBizHandler::deleteUser) 50 | .build(); 51 | 52 | return routerFunction; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web.controller; 2 | 3 | import com.myxh.springboot.web.bean.User; 4 | import jakarta.servlet.http.HttpServletRequest; 5 | import lombok.extern.slf4j.Slf4j; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.PathVariable; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | /** 12 | * @author MYXH 13 | * @date 2023/9/18 14 | */ 15 | @Slf4j 16 | @RestController 17 | public class HelloController 18 | { 19 | /** 20 | * 默认使用新版 PathPatternParser 进行路径匹配 21 | * 不能匹配 ** 在中间的情况,其他情况和 antPathMatcher语法兼容 22 | * 23 | * @param request 请求 24 | * @param path 路径 25 | * @return uri 26 | */ 27 | @GetMapping("/a*/b?/**/{p1:[a-f]+}/**") 28 | public String hello(HttpServletRequest request, @PathVariable("p1") String path) 29 | { 30 | log.info("路径变量 p1:{}", path); 31 | String uri = request.getRequestURI(); 32 | 33 | return uri; 34 | } 35 | 36 | @Autowired 37 | private User user; 38 | 39 | /** 40 | * 1、默认支持把对象写为 json,因为默认 web 场最导入了 jackson 处理 json 的包 41 | * 2、jackson 也支持把数据写为 xml,导入 xml 相关依赖 42 | * 43 | * @return user 44 | */ 45 | @GetMapping("/user") 46 | public User user() 47 | { 48 | user.setId(1L); 49 | user.setUserName("MYXH"); 50 | user.setPassword("520.ILY!"); 51 | user.setAge(21); 52 | user.setEmail("1735350920@qq.com"); 53 | 54 | return user; 55 | } 56 | 57 | /* 58 | public static void main(String[] args) throws JsonProcessingException 59 | { 60 | User user = new User(); 61 | user.setId(1L); 62 | user.setUserName("MYXH"); 63 | user.setPassword("520.ILY!"); 64 | user.setAge(21); 65 | user.setEmail("1735350920@qq.com"); 66 | 67 | YAMLFactory factory = new YAMLFactory().disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER); 68 | ObjectMapper mapper = new ObjectMapper(factory); 69 | 70 | String userYaml = mapper.writeValueAsString(user); 71 | System.out.println("userYaml = " + userYaml); 72 | } 73 | */ 74 | } 75 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/handler/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web.handler; 2 | 3 | import org.springframework.web.bind.annotation.ControllerAdvice; 4 | 5 | /** 6 | * @author MYXH 7 | * @date 2023/9/18 8 | */ 9 | // 这个类是集中处理所有 @Controller 发生的错误 10 | @ControllerAdvice 11 | public class GlobalExceptionHandler 12 | { 13 | /** 14 | * 1、@ExceptionHandler 标识一个方法处理错误,默认只能处理这个类发生的指定错误 15 | * 2、@ControllerAdvice 统一处理所有错误 16 | * 17 | * @param e 异常 18 | * @return 错误信息 19 | */ 20 | // 对象写出为 json 21 | // @ResponseBody 22 | // @ExceptionHandler(Exception.class) 23 | public String handleException(Exception e) 24 | { 25 | return "统一错误处理,原因:"+ e.getMessage(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/java/com/myxh/springboot/web/service/MyService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web.service; 2 | 3 | import jakarta.servlet.http.HttpServletRequest; 4 | import jakarta.servlet.http.HttpServletResponse; 5 | import org.springframework.stereotype.Service; 6 | import org.springframework.web.context.request.RequestContextHolder; 7 | import org.springframework.web.context.request.ServletRequestAttributes; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/18 12 | */ 13 | @Service 14 | public class MyService 15 | { 16 | public void myService() 17 | { 18 | //当前请求路径 19 | ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); 20 | 21 | // 任意位置随时通过 RequestContextHolder 获取到当前请求和响应的信息 22 | HttpServletRequest request = attributes.getRequest(); 23 | HttpServletResponse response = attributes.getResponse(); 24 | 25 | String requestURI = request.getRequestURI(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/META-INF/resources/大户爱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/META-INF/resources/大户爱.png -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/image/大户爱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/image/大户爱.png -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/messages.properties: -------------------------------------------------------------------------------- 1 | login=Login 2 | sign=Sign-up 3 | home=Home 4 | userList=UserList 5 | features=Features 6 | fAQs=FAQs 7 | about=About 8 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/messages_en_US.properties: -------------------------------------------------------------------------------- 1 | login=Login 2 | sign=Sign-up 3 | home=Home 4 | userList=UserList 5 | features=Features 6 | fAQs=FAQs 7 | about=About 8 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/messages_zh_CN.properties: -------------------------------------------------------------------------------- 1 | login=\u767B\u5F55 2 | sign=\u6CE8\u518C 3 | home=\u9996\u9875 4 | userList=\u7528\u6237\u5217\u8868 5 | features=\u529F\u80FD 6 | fAQs=\u95EE\u7B54 7 | about=\u5173\u4E8E 8 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/public/大户爱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/public/大户爱.png -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/resources/大户爱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/resources/大户爱.png -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 |

首页

9 | 10 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/static/大户爱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/static/大户爱.png -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/templates/common.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 通用页面 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 |
16 | 17 | 24 | 25 |
26 | 27 | 28 | 29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 错误页面 6 | 7 | 8 | 9 |

模板引擎:error 页面

10 | 11 |
12 | 13 |

HTTP 状态码 [[${status}]] - 路径 [[${path}]]

14 | 15 |
16 | 17 |

错误类型 [[${error}]]

18 | 19 |

错误信息 [[${message}]]

20 | 21 |

错误堆栈 [[${trace}]]

22 | 23 |

错误时间 [[${timestamp}]]

24 | 25 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/templates/error/4xx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 错误页面 6 | 7 | 8 | 9 |

模板引擎:模糊码 4xx 页面

10 | 11 |
12 | 13 |

HTTP 状态码 [[${status}]] - 路径 [[${path}]]

14 | 15 |
16 | 17 |

错误类型 [[${error}]]

18 | 19 |

错误信息 [[${message}]]

20 | 21 |

错误堆栈 [[${trace}]]

22 | 23 |

错误时间 [[${timestamp}]]

24 | 25 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/templates/error/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 错误页面 6 | 7 | 8 | 9 |

模板引擎:精确码 500 页面

10 | 11 |
12 | 13 |

HTTP 状态码 [[${status}]] - 路径 [[${path}]]

14 | 15 |
16 | 17 |

错误类型 [[${error}]]

18 | 19 |

错误信息 [[${message}]]

20 | 21 |

错误堆栈 [[${trace}]]

22 | 23 |

错误时间 [[${timestamp}]]

24 | 25 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |

17 | 查询用户信息 18 |

19 |
20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/main/resources/templates/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 欢迎页 6 | 7 | 8 | 9 |

你好,

10 | 11 |
12 | 13 |

1、Thymeleaf 基础语法

14 | 15 |

1.1 th:text:替换标签体的内容,会转义

16 |

17 | 18 |

1.2 th:utext: 替换标签体的内容,不会转义 html 标签,真正显示为 html 该有的样式

19 |

20 | 21 |

1.3 th:任意 html 属性,动态替换任意属性的值

22 | 大户爱 23 | 24 |

1.4 th:attr:任意属性指定

25 | 大户爱 26 | 27 |

1.5 th:其他指令

28 | 大户爱 29 | 30 |

1.6 @{} 专门用来取各种路径

31 | 大户爱 32 | 33 |

1.7 字符串转换为大写

34 |

35 | 36 |

1.8 字符串拼接

37 |

38 |

39 | 40 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-04-web/src/test/java/com/myxh/springboot/web/Boot304WebApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.web; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class Boot304WebApplicationTests 8 | { 9 | @Test 10 | void contextLoads() 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/.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 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/java/com/myxh/springboot/ssm/Boot305SsmApplication.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.ssm; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /* 8 | 1、批量扫描注解 @MapperScan,告诉 MyBatis,扫描哪个包下面的所有接口 9 | 2、使用 mybatis.mapper-locations,告诉 MyBatis,每个接口的 xml 文件都在哪里 10 | 3、MyBatis 自动关联绑定。 11 | */ 12 | @MapperScan(basePackages = "com.myxh.springboot.ssm.mapper") 13 | @SpringBootApplication 14 | public class Boot305SsmApplication 15 | { 16 | public static void main(String[] args) 17 | { 18 | SpringApplication.run(Boot305SsmApplication.class, args); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/java/com/myxh/springboot/ssm/bean/User.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.ssm.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.boot.context.properties.ConfigurationProperties; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/23 12 | */ 13 | @Component 14 | @ConfigurationProperties(prefix = "user") 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @Data 18 | public class User 19 | { 20 | private Long id; 21 | private String loginName; 22 | private String nickName; 23 | private String password; 24 | } 25 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/java/com/myxh/springboot/ssm/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.ssm.controller; 2 | 3 | import com.myxh.springboot.ssm.bean.User; 4 | import com.myxh.springboot.ssm.service.UserService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PathVariable; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | /** 11 | * @author MYXH 12 | * @date 2023/9/23 13 | */ 14 | @RestController 15 | public class UserController 16 | { 17 | @Autowired 18 | UserService userService; 19 | 20 | /** 21 | * 根据用户 id 获取一个用户信息,返回 User 的 json 数据 22 | * 23 | * @param id 用户 id 24 | * @return 一个用户信息 25 | */ 26 | @GetMapping("/user/{id}") 27 | public User getUser(@PathVariable("id") Long id) 28 | { 29 | User user = userService.getUser(id); 30 | 31 | return user; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/java/com/myxh/springboot/ssm/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.ssm.mapper; 2 | 3 | import com.myxh.springboot.ssm.bean.User; 4 | import org.apache.ibatis.annotations.Param; 5 | 6 | /** 7 | * @author MYXH 8 | * @date 2023/9/23 9 | */ 10 | public interface UserMapper 11 | { 12 | /** 13 | * 根据用户 id 获取一个用户信息 14 | * 1、每个方法都在 Mapper 文件中有一个 sql 标签对应 15 | * 2、所有参数都应该用 @Param 进行签名,以后使用指定的名字在 SQL 中取值 16 | * 17 | * @param id 用户 id 18 | * @return 一个用户信息 19 | */ 20 | User getUserById(@Param("id") Long id); 21 | } 22 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/java/com/myxh/springboot/ssm/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.ssm.service; 2 | 3 | import com.myxh.springboot.ssm.bean.User; 4 | 5 | /** 6 | * @author MYXH 7 | * @date 2023/9/23 8 | */ 9 | public interface UserService 10 | { 11 | /** 12 | * 根据用户 id 获取一个用户信息 13 | * 14 | * @param id 用户 id 15 | * @return 一个用户信息 16 | */ 17 | User getUser(Long id); 18 | } 19 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/java/com/myxh/springboot/ssm/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.ssm.service.impl; 2 | 3 | import com.myxh.springboot.ssm.bean.User; 4 | import com.myxh.springboot.ssm.mapper.UserMapper; 5 | import com.myxh.springboot.ssm.service.UserService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/23 12 | */ 13 | @Service 14 | public class UserServiceImpl implements UserService 15 | { 16 | @Autowired 17 | UserMapper userMapper; 18 | 19 | /** 20 | * 根据用户 id 获取一个用户信息 21 | * 22 | * @param id 用户 id 23 | * @return 一个用户信息 24 | */ 25 | @Override 26 | public User getUser(Long id) 27 | { 28 | User user = userMapper.getUserById(id); 29 | 30 | return user; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # 1\u3001\u5148\u914D\u7F6E\u6570\u636E\u6E90\u4FE1\u606F 2 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 3 | spring.datasource.type=com.zaxxer.hikari.HikariDataSource 4 | spring.datasource.url=jdbc:mysql://localhost:3306/spring_boot 5 | spring.datasource.username=MYXH 6 | spring.datasource.password=520.ILY! 7 | 8 | # 2\u3001\u914D\u7F6E\u6574\u5408 MyBatis 9 | mybatis.mapper-locations=classpath:/mapper/*.xml 10 | 11 | # \u6253\u5F00\u9A7C\u5CF0\u547D\u540D\u89C4\u5219 12 | mybatis.configuration.map-underscore-to-camel-case=true 13 | 14 | # \u5F00\u542F\u8C03\u8BD5\u6A21\u5F0F\uFF0C\u8BE6\u7EC6\u6253\u5370\u5F00\u542F\u4E86\u54EA\u4E9B\u81EA\u52A8\u914D\u7F6E 15 | # Positive\uFF08\u751F\u6548\u7684\u81EA\u52A8\u914D\u7F6E\uFF09\uFF0CNegative\uFF08\u4E0D\u751F\u6548\u7684\u81EA\u52A8\u914D\u7F6E\uFF09 16 | debug=true 17 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/main/resources/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-05-ssm/src/test/java/com/myxh/springboot/ssm/Boot305SsmApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.ssm; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class Boot305SsmApplicationTests 8 | { 9 | @Test 10 | void contextLoads() 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/.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 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/application-dev.properties: -------------------------------------------------------------------------------- 1 | server.port=8181 2 | 3 | # \u5728\u6709 profile \u7684\u6587\u4EF6\u4E2D\u7F16\u5199\u6FC0\u6D3B\u73AF\u5883\u914D\u7F6E\u65E0\u6548\uFF0C\u53EA\u80FD\u5199\u5728 application.properties 4 | # spring.profiles.active=dev -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8180 2 | 3 | spring.banner.location=classpath:banner.txt 4 | spring.main.banner-mode=console 5 | 6 | # \u6FC0\u6D3B\u6307\u5B9A\u7684\u4E00\u4E2A\u6216\u591A\u4E2A\u73AF\u5883 7 | # spring.profiles.active=group1 8 | spring.profiles.active=dev 9 | 10 | # \u6307\u5B9A\u9ED8\u8BA4\u73AF\u5883 11 | # spring.profiles.default=default 12 | 13 | # \u5305\u542B\u6307\u5B9A\u73AF\u5883\uFF0C\u4E0D\u7BA1\u6FC0\u6D3B\u54EA\u4E2A\u73AF\u5883\uFF0C\u8FD9\u4E2A\u73AF\u5883\u90FD\u6709\uFF0C\u603B\u662F\u8981\u751F\u6548\u7684\u73AF\u5883 14 | # spring.profiles.include=dev, test 15 | 16 | # \u73AF\u5883\u5206\u7EC4 17 | # spring.profiles.group.group1=dev, test 18 | spring.profiles.group.group1[0]=dev 19 | spring.profiles.group.group1[1]=test 20 | spring.profiles.group.group2=prod 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/boot3-06-features-0.0.1-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/boot3-06-features-0.0.1-SNAPSHOT.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/config/application-dev.properties: -------------------------------------------------------------------------------- 1 | server.port=9081 2 | 3 | # \u5728\u6709 profile \u7684\u6587\u4EF6\u4E2D\u7F16\u5199\u6FC0\u6D3B\u73AF\u5883\u914D\u7F6E\u65E0\u6548\uFF0C\u53EA\u80FD\u5199\u5728 application.properties 4 | # spring.profiles.active=dev -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/config/application.properties: -------------------------------------------------------------------------------- 1 | server.port=9080 2 | 3 | spring.banner.location=classpath:banner.txt 4 | spring.main.banner-mode=console 5 | 6 | # \u6FC0\u6D3B\u6307\u5B9A\u7684\u4E00\u4E2A\u6216\u591A\u4E2A\u73AF\u5883 7 | # spring.profiles.active=group1 8 | spring.profiles.active=dev 9 | 10 | # \u6307\u5B9A\u9ED8\u8BA4\u73AF\u5883 11 | # spring.profiles.default=default 12 | 13 | # \u5305\u542B\u6307\u5B9A\u73AF\u5883\uFF0C\u4E0D\u7BA1\u6FC0\u6D3B\u54EA\u4E2A\u73AF\u5883\uFF0C\u8FD9\u4E2A\u73AF\u5883\u90FD\u6709\uFF0C\u603B\u662F\u8981\u751F\u6548\u7684\u73AF\u5883 14 | # spring.profiles.include=dev, test 15 | 16 | # \u73AF\u5883\u5206\u7EC4 17 | # spring.profiles.group.group1=dev, test 18 | spring.profiles.group.group1[0]=dev 19 | spring.profiles.group.group1[1]=test 20 | spring.profiles.group.group2=prod 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/config/config/application-dev.properties: -------------------------------------------------------------------------------- 1 | server.port=9999 2 | 3 | # \u5728\u6709 profile \u7684\u6587\u4EF6\u4E2D\u7F16\u5199\u6FC0\u6D3B\u73AF\u5883\u914D\u7F6E\u65E0\u6548\uFF0C\u53EA\u80FD\u5199\u5728 application.properties 4 | # spring.profiles.active=dev -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/app-demo/config/config/application.properties: -------------------------------------------------------------------------------- 1 | server.port=9998 2 | 3 | spring.banner.location=classpath:banner.txt 4 | spring.main.banner-mode=console 5 | 6 | # \u6FC0\u6D3B\u6307\u5B9A\u7684\u4E00\u4E2A\u6216\u591A\u4E2A\u73AF\u5883 7 | # spring.profiles.active=group1 8 | spring.profiles.active=dev 9 | 10 | # \u6307\u5B9A\u9ED8\u8BA4\u73AF\u5883 11 | # spring.profiles.default=default 12 | 13 | # \u5305\u542B\u6307\u5B9A\u73AF\u5883\uFF0C\u4E0D\u7BA1\u6FC0\u6D3B\u54EA\u4E2A\u73AF\u5883\uFF0C\u8FD9\u4E2A\u73AF\u5883\u90FD\u6709\uFF0C\u603B\u662F\u8981\u751F\u6548\u7684\u73AF\u5883 14 | # spring.profiles.include=dev, test 15 | 16 | # \u73AF\u5883\u5206\u7EC4 17 | # spring.profiles.group.group1=dev, test 18 | spring.profiles.group.group1[0]=dev 19 | spring.profiles.group.group1[1]=test 20 | spring.profiles.group.group2=prod 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/java/com/myxh/springboot/features/bean/Cat.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/23 10 | */ 11 | // @Profile("dev") 12 | // @Component 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | @Data 16 | public class Cat 17 | { 18 | private Long id; 19 | private String name; 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/java/com/myxh/springboot/features/bean/Dog.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.context.annotation.Profile; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/23 12 | */ 13 | @Profile("test") 14 | @Component 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @Data 18 | public class Dog 19 | { 20 | private Long id; 21 | private String name; 22 | } 23 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/java/com/myxh/springboot/features/bean/Pig.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.context.annotation.Profile; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/23 12 | */ 13 | @Profile("prod") 14 | @Component 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @Data 18 | public class Pig 19 | { 20 | private Long id; 21 | private String name; 22 | private Integer age; 23 | } 24 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/java/com/myxh/springboot/features/bean/Sheep.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features.bean; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.context.annotation.Profile; 7 | import org.springframework.stereotype.Component; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/23 12 | */ 13 | @Profile("default") 14 | @Component 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @Data 18 | public class Sheep 19 | { 20 | private Long id; 21 | private String name; 22 | private Integer age; 23 | } 24 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/java/com/myxh/springboot/features/config/MyConfig.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features.config; 2 | 3 | import com.myxh.springboot.features.bean.Cat; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import org.springframework.context.annotation.Profile; 7 | import org.springframework.context.annotation.PropertySource; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/23 12 | */ 13 | @PropertySource("classpath:/a.properties") 14 | // 只有指定环境被激活,整个类的所有配置才能生效 15 | @Profile("test") 16 | @Configuration 17 | public class MyConfig 18 | { 19 | @Profile("dev") 20 | @Bean 21 | public Cat cst() 22 | { 23 | return new Cat(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/java/com/myxh/springboot/features/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features.controller; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/23 10 | */ 11 | @RestController 12 | public class HelloController 13 | { 14 | @Value("${my.server.port:我的服务端口是:8080,我的用户名是:末影小黑xh}") 15 | String port; 16 | 17 | @GetMapping("/hello") 18 | public String hello() 19 | { 20 | return port; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/java/com/myxh/springboot/features/service/HelloService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features.service; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | /** 6 | * @author MYXH 7 | * @date 2023/9/23 8 | */ 9 | @Service 10 | public class HelloService 11 | { 12 | public Integer sum(Integer a, Integer b) 13 | { 14 | return a + b; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/a.properties: -------------------------------------------------------------------------------- 1 | a=b -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/application-dev.properties: -------------------------------------------------------------------------------- 1 | server.port=8081 2 | 3 | # \u5728\u6709 profile \u7684\u6587\u4EF6\u4E2D\u7F16\u5199\u6FC0\u6D3B\u73AF\u5883\u914D\u7F6E\u65E0\u6548\uFF0C\u53EA\u80FD\u5199\u5728 application.properties 4 | # spring.profiles.active=dev -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/application-prod.properties: -------------------------------------------------------------------------------- 1 | server.port=8083 2 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/application-test.properties: -------------------------------------------------------------------------------- 1 | server.port=8082 2 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8080 2 | 3 | spring.banner.location=classpath:banner.txt 4 | spring.main.banner-mode=console 5 | 6 | # \u6FC0\u6D3B\u6307\u5B9A\u7684\u4E00\u4E2A\u6216\u591A\u4E2A\u73AF\u5883 7 | # spring.profiles.active=group1 8 | spring.profiles.active=dev 9 | 10 | # \u6307\u5B9A\u9ED8\u8BA4\u73AF\u5883 11 | # spring.profiles.default=default 12 | 13 | # \u5305\u542B\u6307\u5B9A\u73AF\u5883\uFF0C\u4E0D\u7BA1\u6FC0\u6D3B\u54EA\u4E2A\u73AF\u5883\uFF0C\u8FD9\u4E2A\u73AF\u5883\u90FD\u6709\uFF0C\u603B\u662F\u8981\u751F\u6548\u7684\u73AF\u5883 14 | # spring.profiles.include=dev, test 15 | 16 | # \u73AF\u5883\u5206\u7EC4 17 | # spring.profiles.group.group1=dev, test 18 | spring.profiles.group.group1[0]=dev 19 | spring.profiles.group.group1[1]=test 20 | spring.profiles.group.group2=prod 21 | 22 | # \u5BFC\u5165\u6307\u5B9A\u7684\u914D\u7F6E 23 | spring.config.import=classpath:/a.properties 24 | 25 | # \u5BFC\u5165\u914D\u7F6E\u4F18\u5148\u7EA7\u4F4E\u4E8E\u914D\u7F6E\u6587\u4EF6\u7684\u4F18\u5148\u7EA7 26 | a=c 27 | 28 | my.server.port=\u6211\u7684\u670D\u52A1\u7AEF\u53E3\u662F\uFF1A${server.port}\uFF0C\u6211\u7684\u7528\u6237\u540D\u662F\uFF1A${my.username:\u672B\u5F71\u5C0F\u9ED1xh} 29 | 30 | robot.name=MYXH 31 | robot.age=21 32 | robot.email=1735350920@qq.com 33 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ████ ████ ██ ██ ██ ██ ██ ██ 2 | ░██░██ ██░██░░██ ██ ░░██ ██ ░██ ░██ 3 | ░██░░██ ██ ░██ ░░████ ░░██ ██ ░██ ░██ 4 | ░██ ░░███ ░██ ░░██ ░░███ ░██████████ 5 | ░██ ░░█ ░██ ░██ ██░██ ░██░░░░░░██ 6 | ░██ ░ ░██ ░██ ██ ░░██ ░██ ░██ 7 | ░██ ░██ ░██ ██ ░░██░██ ░██ 8 | ░░ ░░ ░░ ░░ ░░ ░░ ░░ 9 | :: MYXH Boot :: (v0.0.1) -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/config/application-dev.properties: -------------------------------------------------------------------------------- 1 | server.port=8091 2 | 3 | # \u5728\u6709 profile \u7684\u6587\u4EF6\u4E2D\u7F16\u5199\u6FC0\u6D3B\u73AF\u5883\u914D\u7F6E\u65E0\u6548\uFF0C\u53EA\u80FD\u5199\u5728 application.properties 4 | # spring.profiles.active=dev -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/main/resources/config/application.properties: -------------------------------------------------------------------------------- 1 | server.port=8090 2 | 3 | spring.banner.location=classpath:banner.txt 4 | spring.main.banner-mode=console 5 | 6 | # \u6FC0\u6D3B\u6307\u5B9A\u7684\u4E00\u4E2A\u6216\u591A\u4E2A\u73AF\u5883 7 | # spring.profiles.active=group1 8 | spring.profiles.active=dev 9 | 10 | # \u6307\u5B9A\u9ED8\u8BA4\u73AF\u5883 11 | # spring.profiles.default=default 12 | 13 | # \u5305\u542B\u6307\u5B9A\u73AF\u5883\uFF0C\u4E0D\u7BA1\u6FC0\u6D3B\u54EA\u4E2A\u73AF\u5883\uFF0C\u8FD9\u4E2A\u73AF\u5883\u90FD\u6709\uFF0C\u603B\u662F\u8981\u751F\u6548\u7684\u73AF\u5883 14 | # spring.profiles.include=dev, test 15 | 16 | # \u73AF\u5883\u5206\u7EC4 17 | # spring.profiles.group.group1=dev, test 18 | spring.profiles.group.group1[0]=dev 19 | spring.profiles.group.group1[1]=test 20 | spring.profiles.group.group2=prod 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-06-features/src/test/java/com/myxh/springboot/features/Boot306FeaturesApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.features; 2 | 3 | import com.myxh.springboot.features.service.HelloService; 4 | import org.junit.jupiter.api.*; 5 | import org.junit.jupiter.params.ParameterizedTest; 6 | import org.junit.jupiter.params.provider.MethodSource; 7 | import org.junit.jupiter.params.provider.ValueSource; 8 | import org.junit.platform.commons.util.StringUtils; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | 12 | import java.util.stream.Stream; 13 | 14 | // 具备测试 SpringBoot 应用容器中所有组件的功能,测试类必须在主程序所在的包及其子包 15 | @SpringBootTest 16 | class Boot306FeaturesApplicationTests 17 | { 18 | // 自动注入任意组件即可测试 19 | @Autowired 20 | HelloService helloService; 21 | 22 | @DisplayName("测试 sum() 方法 ") 23 | @Test 24 | void contextLoads() 25 | { 26 | Integer sum = helloService.sum(1, 2); 27 | Assertions.assertEquals(3, sum); 28 | } 29 | 30 | @DisplayName("测试1") 31 | @Test 32 | public void test1() 33 | { 34 | System.out.println("test1"); 35 | } 36 | 37 | // 参数化测试 38 | @ParameterizedTest 39 | @ValueSource(strings = {"one", "two", "three"}) 40 | @DisplayName("参数化测试1") 41 | public void parameterizedTest1(String string) 42 | { 43 | System.out.println(string); 44 | Assertions.assertTrue(StringUtils.isNotBlank(string)); 45 | } 46 | 47 | @ParameterizedTest 48 | // 指定方法名,返回值就是测试用的参数 49 | @MethodSource("method") 50 | @DisplayName("方法来源参数") 51 | public void testWithExplicitLocalMethodSource(String name) 52 | { 53 | System.out.println(name); 54 | Assertions.assertNotNull(name); 55 | } 56 | 57 | static Stream method() 58 | { 59 | // 返回 Stream 则可 60 | return Stream.of("apple", "banana"); 61 | } 62 | 63 | // 所有测试方法运行之前先运行这个,只打印一次 64 | @BeforeAll 65 | static void initAll() 66 | { 67 | System.out.println("hello"); 68 | } 69 | 70 | // 每个测试方法运行之前先运行这个,每个方法运行打印一次 71 | @BeforeEach 72 | void init() 73 | { 74 | System.out.println("world"); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/.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 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/Boot307CoreApplication.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core; 2 | 3 | import org.springframework.boot.ApplicationRunner; 4 | import org.springframework.boot.CommandLineRunner; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | import org.springframework.context.annotation.Bean; 8 | import org.springframework.scheduling.annotation.EnableAsync; 9 | 10 | /** 11 | * SPI 机制:Service Provider Interface 服务提供商接口 12 | */ 13 | // 全面接管 SpringMVC,禁用所有 SpringMVC 底层的自动配置 14 | // @EnableWebMvc 15 | // 开启异步 16 | @EnableAsync 17 | // 开启定时任务 18 | // @EnableScheduling 19 | @SpringBootApplication 20 | public class Boot307CoreApplication 21 | { 22 | public static void main(String[] args) 23 | { 24 | // SpringApplication.run(Boot307CoreApplication.class, args); 25 | 26 | SpringApplication springApplication = new SpringApplication(Boot307CoreApplication.class); 27 | 28 | springApplication.run(args); 29 | } 30 | 31 | @Bean 32 | public ApplicationRunner applicationRunner() 33 | { 34 | return args -> System.out.println("-------- ApplicationRunner 运行了 --------"); 35 | } 36 | 37 | @Bean 38 | public CommandLineRunner commandLineRunner() 39 | { 40 | return args -> System.out.println("-------- CommandLineRunner 运行了 --------"); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.controller; 2 | 3 | import com.myxh.springboot.core.entity.UserEntity; 4 | import com.myxh.springboot.core.event.EventPublisher; 5 | import com.myxh.springboot.core.event.LoginSuccessEvent; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.web.bind.annotation.GetMapping; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | /** 12 | * @author MYXH 13 | * @date 2023/9/24 14 | */ 15 | @RestController 16 | public class LoginController 17 | { 18 | /* 19 | @Autowired 20 | private AccountService accountService; 21 | 22 | @Autowired 23 | private CouponService couponService; 24 | 25 | @Autowired 26 | private SystemService systemService; 27 | */ 28 | 29 | @Autowired 30 | private EventPublisher eventPublisher; 31 | 32 | /** 33 | * 增加业务 34 | * 35 | * @param username 用户名 36 | * @param password 密码 37 | * @return username 登陆成功 38 | */ 39 | @GetMapping("/login") 40 | public String login(@RequestParam("username") String username, @RequestParam("password") String password) 41 | { 42 | // 业务处理登录 43 | System.out.println("业务处理登录完成"); 44 | 45 | // TODO 发送事件 46 | LoginSuccessEvent loginSuccessEvent = new LoginSuccessEvent(new UserEntity("MYXH", "520.ILY!")); 47 | 48 | eventPublisher.sendEvent(loginSuccessEvent); 49 | 50 | // 1、账户服务自动签到加积分 51 | // accountService.addAccountScore(username); 52 | 53 | // 2、优惠服务随机发放优惠券 54 | // couponService.sendCoupon(username); 55 | 56 | // 3、系统服务登记用户登录的信息 57 | // systemService.recordLog(username); 58 | 59 | // 设计模式:对新增开放,对修改关闭 60 | // xxx 61 | // xxx 62 | // xxx 63 | 64 | return username + "登陆成功"; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/entity/UserEntity.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.entity; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | import org.springframework.stereotype.Component; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/24 11 | */ 12 | @Component 13 | @NoArgsConstructor 14 | @AllArgsConstructor 15 | @Data 16 | public class UserEntity 17 | { 18 | private String username; 19 | private String password; 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/event/EventPublisher.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.event; 2 | 3 | import org.springframework.context.ApplicationEvent; 4 | import org.springframework.context.ApplicationEventPublisher; 5 | import org.springframework.context.ApplicationEventPublisherAware; 6 | import org.springframework.stereotype.Service; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/24 11 | * @description 事件是广播出去的,所有监听这个事件的监听器都可以收到 12 | */ 13 | @Service 14 | public class EventPublisher implements ApplicationEventPublisherAware 15 | { 16 | // 底层发送事件用的组件,SpringBoot 会通过 ApplicationEventPublisherAware 接口自动注入 17 | ApplicationEventPublisher applicationEventPublisher; 18 | 19 | /** 20 | * 所有事件都可以发 21 | * 22 | * @param event 事件 23 | */ 24 | public void sendEvent(ApplicationEvent event) 25 | { 26 | // 调用底层 API 发送事件 27 | applicationEventPublisher.publishEvent(event); 28 | } 29 | 30 | /** 31 | * 会被自动调用,把真正发事件的底层组组件给注入进来 32 | * 33 | * @param applicationEventPublisher 此对象要使用的事件发布者 34 | */ 35 | @Override 36 | public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) 37 | { 38 | this.applicationEventPublisher = applicationEventPublisher; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/event/LoginSuccessEvent.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.event; 2 | 3 | import com.myxh.springboot.core.entity.UserEntity; 4 | import org.springframework.context.ApplicationEvent; 5 | 6 | /** 7 | * @author MYXH 8 | * @date 2023/9/24 9 | * @description 登录成功事件,所有事件都推荐继承 ApplicationEvent 10 | */ 11 | public class LoginSuccessEvent extends ApplicationEvent 12 | { 13 | /** 14 | * 登录成功事件 15 | * 16 | * @param source 事件来源,代表是谁登录成了 17 | */ 18 | public LoginSuccessEvent(UserEntity source) 19 | { 20 | super(source); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/listener/MyListener.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.listener; 2 | 3 | import org.springframework.context.ApplicationEvent; 4 | import org.springframework.context.ApplicationListener; 5 | 6 | /** 7 | * @author MYXH 8 | * @date 2023/9/24 9 | */ 10 | public class MyListener implements ApplicationListener 11 | { 12 | @Override 13 | public void onApplicationEvent(ApplicationEvent event) 14 | { 15 | System.out.println("-------- 事件到达 --------"); 16 | System.out.println("event = " + event); 17 | System.out.println("------------------------"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/robot/controller/RobotController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.robot.controller; 2 | 3 | import com.myxh.springboot.core.robot.service.RobotService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/24 11 | */ 12 | @RestController 13 | public class RobotController 14 | { 15 | @Autowired 16 | RobotService robotService; 17 | 18 | @GetMapping("/robot/hello") 19 | public String sayHello() 20 | { 21 | String sayHello = robotService.sayHello(); 22 | 23 | return sayHello; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/robot/properties/RobotProperties.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.robot.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/24 10 | */ 11 | // 此属性类和配置文件指定前缀绑定 12 | @ConfigurationProperties(prefix = "robot") 13 | @Component 14 | @Data 15 | public class RobotProperties 16 | { 17 | private String name; 18 | private Integer age; 19 | private String email; 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/robot/service/RobotService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.robot.service; 2 | 3 | import com.myxh.springboot.core.robot.properties.RobotProperties; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/24 10 | */ 11 | @Service 12 | public class RobotService 13 | { 14 | @Autowired 15 | private RobotProperties robotProperties; 16 | 17 | public String sayHello() 18 | { 19 | return "你好," + robotProperties.getName(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/service/AccountService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.service; 2 | 3 | import com.myxh.springboot.core.entity.UserEntity; 4 | import com.myxh.springboot.core.event.LoginSuccessEvent; 5 | import org.springframework.context.ApplicationListener; 6 | import org.springframework.core.annotation.Order; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/24 12 | */ 13 | @Order(2) 14 | @Service 15 | public class AccountService implements ApplicationListener 16 | { 17 | public void addAccountScore(String username) 18 | { 19 | System.out.println(username + " 加了 1 分"); 20 | } 21 | 22 | @Override 23 | public void onApplicationEvent(LoginSuccessEvent event) 24 | { 25 | System.out.println("-------- AccountService 收到事件 --------"); 26 | UserEntity source = (UserEntity) event.getSource(); 27 | addAccountScore(source.getUsername()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/service/CouponService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.service; 2 | 3 | import com.myxh.springboot.core.entity.UserEntity; 4 | import com.myxh.springboot.core.event.LoginSuccessEvent; 5 | import org.springframework.context.event.EventListener; 6 | import org.springframework.core.annotation.Order; 7 | import org.springframework.scheduling.annotation.Async; 8 | import org.springframework.stereotype.Service; 9 | 10 | /** 11 | * @author MYXH 12 | * @date 2023/9/24 13 | */ 14 | @Service 15 | public class CouponService 16 | { 17 | public CouponService() 18 | { 19 | System.out.println("构造器调用"); 20 | } 21 | 22 | @Async 23 | @Order(3) 24 | @EventListener 25 | public void onEvent(LoginSuccessEvent loginSuccessEvent) 26 | { 27 | System.out.println("-------- CouponService 感知到事件 --------"); 28 | System.out.println("loginSuccessEvent = " + loginSuccessEvent); 29 | System.out.println("------------------------"); 30 | UserEntity source = (UserEntity) loginSuccessEvent.getSource(); 31 | sendCoupon(source.getUsername()); 32 | } 33 | 34 | public void sendCoupon(String username) 35 | { 36 | System.out.println(username + " 随机得到了一张优惠券"); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/service/HelloService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.service; 2 | 3 | import com.myxh.springboot.core.event.LoginSuccessEvent; 4 | import org.springframework.context.event.EventListener; 5 | import org.springframework.stereotype.Service; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/24 10 | */ 11 | @Service 12 | public class HelloService 13 | { 14 | @EventListener 15 | public void onEvent(LoginSuccessEvent event){ 16 | System.out.println("-------- HelloService 感知到事件 --------"); 17 | System.out.println("event = " + event); 18 | System.out.println("------------------------"); 19 | 20 | // 调用业务 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/java/com/myxh/springboot/core/service/SystemService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core.service; 2 | 3 | import com.myxh.springboot.core.entity.UserEntity; 4 | import com.myxh.springboot.core.event.LoginSuccessEvent; 5 | import org.springframework.context.event.EventListener; 6 | import org.springframework.core.annotation.Order; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/24 12 | */ 13 | @Service 14 | public class SystemService 15 | { 16 | @Order(1) 17 | @EventListener 18 | public void onEvent(LoginSuccessEvent event) 19 | { 20 | System.out.println("-------- SystemService 感知到事件 --------"); 21 | System.out.println("event = " + event); 22 | System.out.println("------------------------"); 23 | UserEntity source = (UserEntity) event.getSource(); 24 | recordLog(source.getUsername()); 25 | } 26 | 27 | public void recordLog(String username) 28 | { 29 | System.out.println(username + "登录信息已被记录"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.SpringApplicationRunListener=\ 2 | com.myxh.springboot.core.listener.MyAppListener 3 | 4 | org.springframework.context.ApplicationListener=\ 5 | com.myxh.springboot.core.listener.MyListener -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | robot.name=MYXH 2 | robot.age=21 3 | robot.email=1735350920@qq.com 4 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-07-core/src/test/java/com/myxh/springboot/core/Boot307CoreApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.core; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class Boot307CoreApplicationTests 8 | { 9 | @Test 10 | void contextLoads() 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/.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 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MYXHcode/SpringBoot3-Full-Stack-Guide-Tutorial-Shang-Silicon-Valley-Learning-Notes-and-Code-2023/b4f1a7743cd6dec33c76a18c945584ab74788589/SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 3 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.1.4 9 | 10 | 11 | com.myxh.springboot 12 | boot3-08-robot-starter 13 | 0.0.1-SNAPSHOT 14 | boot3-08-robot-starter 15 | boot3-08-robot-starter 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter 23 | 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-web 28 | 29 | 30 | org.projectlombok 31 | lombok 32 | true 33 | 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-configuration-processor 38 | true 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-starter-test 43 | test 44 | 45 | 46 | 47 | 48 | 49 | 50 | org.springframework.boot 51 | spring-boot-maven-plugin 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/src/main/java/com/myxh/springboot/starter/robot/RobotAutoConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.starter.robot; 2 | 3 | import com.myxh.springboot.starter.robot.controller.RobotController; 4 | import com.myxh.springboot.starter.robot.properties.RobotProperties; 5 | import com.myxh.springboot.starter.robot.service.RobotService; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.context.annotation.Import; 8 | 9 | /** 10 | * @author MYXH 11 | * @date 2023/9/24 12 | */ 13 | // 给容器中导入 Robot 功能要用的所有组件 14 | @Import({RobotProperties.class, RobotController.class, RobotService.class}) 15 | @Configuration 16 | public class RobotAutoConfiguration 17 | { 18 | /* 19 | // 把组件导入到容器中 20 | @Bean 21 | public RobotController robotController() 22 | { 23 | return new RobotController(); 24 | } 25 | */ 26 | } 27 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/src/main/java/com/myxh/springboot/starter/robot/annotation/EnableRobot.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.starter.robot.annotation; 2 | 3 | import com.myxh.springboot.starter.robot.RobotAutoConfiguration; 4 | import org.springframework.context.annotation.Import; 5 | 6 | import java.lang.annotation.*; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/24 11 | */ 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Target({ElementType.TYPE}) 14 | @Documented 15 | @Import(RobotAutoConfiguration.class) 16 | public @interface EnableRobot 17 | { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/src/main/java/com/myxh/springboot/starter/robot/controller/RobotController.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.starter.robot.controller; 2 | 3 | import com.myxh.springboot.starter.robot.service.RobotService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | /** 9 | * @author MYXH 10 | * @date 2023/9/24 11 | */ 12 | @RestController 13 | public class RobotController 14 | { 15 | @Autowired 16 | RobotService robotService; 17 | 18 | @GetMapping("/robot/hello") 19 | public String sayHello() 20 | { 21 | String sayHello = robotService.sayHello(); 22 | 23 | return sayHello; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/src/main/java/com/myxh/springboot/starter/robot/properties/RobotProperties.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.starter.robot.properties; 2 | 3 | import lombok.Data; 4 | import org.springframework.boot.context.properties.ConfigurationProperties; 5 | import org.springframework.stereotype.Component; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/24 10 | */ 11 | // 此属性类和配置文件指定前缀绑定 12 | @ConfigurationProperties(prefix = "robot") 13 | @Component 14 | @Data 15 | public class RobotProperties 16 | { 17 | private String name; 18 | private Integer age; 19 | private String email; 20 | } 21 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/src/main/java/com/myxh/springboot/starter/robot/service/RobotService.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.starter.robot.service; 2 | 3 | import com.myxh.springboot.starter.robot.properties.RobotProperties; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | 7 | /** 8 | * @author MYXH 9 | * @date 2023/9/24 10 | */ 11 | @Service 12 | public class RobotService 13 | { 14 | @Autowired 15 | private RobotProperties robotProperties; 16 | 17 | public String sayHello() 18 | { 19 | return "你好," + robotProperties.getName(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.myxh.springboot.starter.robot.RobotAutoConfiguration 2 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/boot3-08-robot-starter/src/test/java/com/myxh/springboot/starter/Boot308RobotStarterApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.myxh.springboot.starter; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class Boot308RobotStarterApplicationTests 8 | { 9 | @Test 10 | void contextLoads() 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/spring-boot-3.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SpringBoot3全栈指南教程课(尚硅谷)项目/spring-boot-3/sql/spring_boot.sql: -------------------------------------------------------------------------------- 1 | # 创建数据库 spring_boot 2 | CREATE DATABASE IF NOT EXISTS spring_boot; 3 | 4 | # 选择数据库 spring_boot 5 | USE spring_boot; 6 | 7 | # 创建用户表 t_user 8 | 9 | CREATE TABLE `t_user` 10 | ( 11 | `id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号', 12 | `login_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '用户名称' COLLATE 'utf8_general_ci', 13 | `nick_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '用户昵称' COLLATE 'utf8_general_ci', 14 | `password` VARCHAR(200) NULL DEFAULT NULL COMMENT '用户密码' COLLATE 'utf8_general_ci', 15 | PRIMARY KEY (`id`) 16 | ); 17 | 18 | # 添加用户表 t_user 的数据 19 | INSERT INTO `t_user`(`id`, `login_name`, `nick_name`, `password`) 20 | VALUES (1, 'MYXH', '末影小黑xh', '520.ILY!'), 21 | (2, 'root', 'root 用户', '000000'), 22 | (3, 'admin', '管理员', '123456'), 23 | (4, 'test', '测试员', 'test'); 24 | --------------------------------------------------------------------------------