上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页

20-springboot打包部署

摘要: 1.打war包 1. 程序入口类需扩展继承 SpringBootServletInitializer 类 2、程序入口类覆盖如下方法: @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder ap 阅读全文
posted @ 2023-04-03 11:09 companion 阅读(46) 评论(0) 推荐(0) 编辑

19-springboot自动配置原理

摘要: SpringBoot自动配置原理(SpringBoot自动装配原理,SpringBoot starter原理) SpringBoot可以根据定义在classpath下的类,自动的给你生成一些Bean,并加载到Spring的Context中,自动配置充分的利用了Spring 4.0的条件化配置特性,能 阅读全文
posted @ 2023-03-28 17:42 companion 阅读(67) 评论(0) 推荐(0) 编辑

18-springboot集成dubbo

摘要: 第一步:添加依赖; 第二步:配置application.properties文件; 第三步:编写代码,可能用到一些注解; 1、添加依赖: 可不用注册中心直接调用或者zookeeper或者nacos作为注册中心 <!-- dubbo-spring-boot-starter dubbo提供 --><de 阅读全文
posted @ 2023-03-27 13:34 companion 阅读(20) 评论(0) 推荐(0) 编辑

17-springboot整合第三方框架三部曲

摘要: 一个规律,那就是springboot整合第三方框架或组件,都是通过三步来完成: 第一步:添加依赖; 第二步:配置application.properties文件; 第三步:编写代码,可能用到一些注解; 阅读全文
posted @ 2023-03-24 16:23 companion 阅读(35) 评论(0) 推荐(0) 编辑

16-springboot关于输出日志的修改

摘要: 关闭spring logo图标 日志输出: SpringApplication springApplication = new SpringApplication(SpringBootConsoleApplication.class); springApplication.setBannerMode 阅读全文
posted @ 2023-03-24 16:20 companion 阅读(28) 评论(0) 推荐(0) 编辑

15-springboot创建非web应用

摘要: 在 Spring Boot 框架中,要创建一个非Web应用程序(纯Java程序): 方式一: 1、SpringBoot开发纯Java程序,应该采用如下的起步依赖: <!-- Springboot开发java项目的起步依赖 --> <dependency> <groupId>org.springfra 阅读全文
posted @ 2023-03-24 16:20 companion 阅读(203) 评论(0) 推荐(0) 编辑

14-springboot配置文件

摘要: 1、.properties文件 键值对的properties属性文件配置方式 SpringBoot默认读取该文件作为项目配置文件 2、.yml文件 yml 也是一种配置文件格式,主要采用空格、换行、冒号等格式排版进行配置; yml 后缀也可以使用 yaml 后缀; 配置的值与前面的冒号必须要有一个空 阅读全文
posted @ 2023-03-24 15:35 companion 阅读(21) 评论(0) 推荐(0) 编辑

13-springboot集成Redis

摘要: Spring boot 集成 Redis 的步骤如下: 1、在pom.xml中配置相关的jar依赖; <!-- 加载spring boot redis包 --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>s 阅读全文
posted @ 2023-03-23 16:09 companion 阅读(32) 评论(0) 推荐(0) 编辑

12-springboot集成Swagger

摘要: Swagger2 的作用: 随项目自动生成强大RESTful API文档,减少工作量;(不需要自己写api文档了) API文档与代码整合在一起,便于同步更新API文档的说明; 页面测试功能来调试每个RESTful API; 怎么集成? 1、添加相关依赖 <!-- springfox-swagger2 阅读全文
posted @ 2023-03-23 11:23 companion 阅读(13) 评论(0) 推荐(0) 编辑

1-收藏网址

摘要: https://tool.oschina.net/ 阅读全文
posted @ 2023-03-23 11:15 companion 阅读(48) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 23 下一页