![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springBoot
文章平均质量分 91
程序员小刘呀
只要你足够努力,该来的总会来
展开
-
springcloud多种注解介绍
spring注解@Autowired自动注入,它可以对类成员变量、方法及构造函数进行标注,让 spring 完成 bean 自动装配的工作。@Autowired 默认是按照类去匹配,配合 @Qualifier 指定按照名称去装配 bean。@Configurationxml配置文件定义一个bean<bean id="account" class="xxx.xxxx.xxxx.Account"> <property name="id" value="1"/></原创 2021-02-09 16:06:04 · 2773 阅读 · 88 评论 -
springBoot加入thymeleaf模板
1.新建springBoot项目在前面有两种方式2.加入thymeleaf模板引擎SpringBoot推荐使用thymeleaf模板引擎语法简单,功能更强大要想引入thymeleaf,只需要在pom,xml文件中加入如下依赖就可以了<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf&原创 2020-10-09 22:51:17 · 3452 阅读 · 40 评论 -
IDEA搭建springBoot方式二
1.新建项目2.写controllerpackage xiaoliu.springboot04.controller;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.ResponseBody;@Controllerp原创 2020-10-09 21:42:04 · 5294 阅读 · 50 评论 -
IDEA搭建springBoot方式一
1.先在IDEA配置mavenmaven下载和配置可以看https://blog.csdn.net/qq_41150890/article/details/1080863692.新建maven项目3.在pom.xml加入springBoot依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-p原创 2020-10-09 21:20:14 · 1901 阅读 · 30 评论