会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
菜鸟需勤奋
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
26
27
28
29
30
31
32
33
34
···
48
下一页
2022年9月25日
常用参数注解
摘要: 路径变量@PathVariable ①获取指定路径变量: @GetMapping("/car/{id}/owner/{userName}") public Map<String,Object> getCar(@PathVariable("id") int id, @PathVariable("use
阅读全文
posted @ 2022-09-25 14:02 iTao0128
阅读(149)
评论(0)
推荐(0)
2022年9月24日
欢迎页与favicon
摘要: 欢迎页 将index.html放入默认的静态资源路径下,会默认访问。 访问路径:http://localhost:8080/ 如下设置了项目的根访问路径,则欢迎页访问需使用:http://localhost:8080/my/ spring:# mvc:# static-path-pattern: /
阅读全文
posted @ 2022-09-24 22:50 iTao0128
阅读(66)
评论(0)
推荐(0)
2022年9月21日
静态资源访问
摘要: 默认静态资源目录 类路径下:/static、/public、/resources、/META-INF/resources 以下路径下静态资源可直接访问,如http://localhost:8080/hu4.jpeg 原理:静态映射/** 请求进来,先看controller能不能处理,不能处理的所有请
阅读全文
posted @ 2022-09-21 22:46 iTao0128
阅读(142)
评论(0)
推荐(0)
2022年9月20日
自定义类绑定配置文件-自动提示
摘要: package com.java.boot.config; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.boot.c
阅读全文
posted @ 2022-09-20 21:55 iTao0128
阅读(54)
评论(0)
推荐(0)
2022年9月19日
@ConfigurationProperties配置绑定
摘要: import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @Component//组件加入容器中 @Conf
阅读全文
posted @ 2022-09-19 22:41 iTao0128
阅读(37)
评论(0)
推荐(0)
2022年9月18日
@Conditional
摘要: 条件装配:满足Conditional指定的条件,则进行组件注入 @Configuration//告诉springboot这是一个配置类 public class MyConfig { @Bean("tom") public Stu stu01(){ return new Stu("汤姆"); } @
阅读全文
posted @ 2022-09-18 22:54 iTao0128
阅读(48)
评论(0)
推荐(0)
@Configuration容器中注册组件
摘要: import boot.bean.Stu; import boot.bean.User; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configu
阅读全文
posted @ 2022-09-18 17:16 iTao0128
阅读(33)
评论(0)
推荐(0)
2022年9月14日
springboot创建web应用
摘要: ①创建maven工程 ②pom.xml中添加父工程,集成springboot父项目 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <ve
阅读全文
posted @ 2022-09-14 22:22 iTao0128
阅读(48)
评论(0)
推荐(0)
2022年9月12日
创建父子工程
摘要: 父工程pom.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001
阅读全文
posted @ 2022-09-12 21:57 iTao0128
阅读(67)
评论(0)
推荐(0)
依赖范围
摘要: 排除依赖
阅读全文
posted @ 2022-09-12 20:19 iTao0128
阅读(22)
评论(0)
推荐(0)
上一页
1
···
26
27
28
29
30
31
32
33
34
···
48
下一页
公告