springboot框架
cuichen97
冲冲冲
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
spring boot配置https访问
1.Spring Boot 开启https访问(配置SSL证书) 开启文档 2.配置http协议跳转https package com.dingsheng; import org.apache.catalina.Context; import org.apache.catalina.connector.Connector; import org.apache.tomcat.util.descriptor.web.SecurityCollection; import org.apache.tomcat.ut转载 2022-05-25 15:38:01 · 248 阅读 · 0 评论 -
5.springboot自动装配的实现原理
springboot自动装配的实现原理: 我理解的自动装配是:其实EnableAutoConfiguration上有个Import注解,这个注解里面包含了一个实现了ImportSelector的类,在它里面的selectImports方法可以选择注入需要的Bean, 分析源码可以看到, 第一步:扫描META-INF/spring-autoconfigure-metadata.properties文件,它里面定义了很多的Conditional条件,例如ConditionalOnClass 第二步:扫描META原创 2021-01-26 15:03:00 · 159 阅读 · 0 评论 -
1.1 springboot热部署
1.在pom文件的 <dependencies>标签中添加: <!--热部署依赖--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional原创 2020-12-02 13:50:22 · 160 阅读 · 0 评论 -
1.springboot工程的创建
一.pom.xml文件 创建maven项目,在pom文件下配置: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http...原创 2019-10-08 11:40:08 · 181 阅读 · 0 评论 -
2.跨域问题
一.HBuilder代码 call() 是回调函数,缺少此函数的话无法跨域 二.Eclipse代码 UserController.java原创 2019-10-08 16:53:48 · 118 阅读 · 0 评论 -
3.SpringBoot整合Mybatis
SpringBoot整合Mybatis 一.POM文件 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://ma...原创 2019-10-09 17:23:13 · 433 阅读 · 1 评论 -
4.spinrgboot常用注解
1.@Autowired 自动装配注释 作用:实现自动装配,使用范围:用在成员变量、方法以及构造函数上。 用在类属性上,可以免写setter方法 @Resource和@Autowired的区别: @Resource: @Resource(name=”pd”) private PersonDao p; 这时候spring注入p的过程是 1:先查找xml中是否有id为p的元素 2:如果没有找到...原创 2019-10-09 19:07:16 · 452 阅读 · 0 评论
分享