首页和图标定制
首页定制在resource目录下的static目录下创建一个index.html文件即可
静态资源导入
静态资源导入
自动装配原理2
自动装配原理
自动装配原理
自动装配原理pom.xml1.引入springboot依赖的时候,不需要指定版本,就因为有这些版本仓库 2.spring-boot0dependencies:核心依赖在父工程中. 启动器1234<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> 这个就是web场景下的启动器,会自动导入web环境下的所有依赖. 主程序@SpringBootApplication标注这个类是SpringBoot的应用
网站设计流程
网站设计流程
整合mybatis
整合mybaits1.导包1234567891011121314151617181920212223242526272829303132333435363738<dependencies> <!-- Spring Boot Starter JDBC --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <!-- Spring Boot Starter Web --> <dependency> <groupId>org.springframework.boot</groupId> ...
扩展SpringMVC
扩展SpringMVC
多环境配置
多环境配置多环境配置的优先级 使用方式properties文件1.一个文件对应一个环境 2.在application.properties文件中指定你使用的那个文件 yaml文件单文件激活12345678910111213141516171819spring: profiles: active: dev---server: port: 8084spring: config: activate: on-profile: test---server: port: 8085spring: config: activate: on-profile: dev 多文件类比那个properties即可
主启动类
主启动类