摘要: yml或者yaml对空格的要求十分的严格 #springboot的核心配置文件 #更改端口号 server: port: 8081 #普通的key-value name: wu #对象 stu: name: wu age: 1 #行内写法 student: {name: wu,age: 3} #数组 阅读全文
posted @ 2021-06-15 22:59 一拳超人的逆袭 阅读(36) 评论(0) 推荐(0) 编辑
摘要: //程序的主入口,不能删也不能改 @SpringBootApplication//标注是一个springBoot的应用 public class DemoApplication { //将springBoot应用启动 public static void main(String[] args) { 阅读全文
posted @ 2021-06-15 22:14 一拳超人的逆袭 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 生成一个springBoot项目 删掉这些文件(暂时) 项目结构 //原理:自动装配 //本身就是spring的一个组件 @RestController public class HelloController { @RequestMapping("/hello") public String he 阅读全文
posted @ 2021-06-15 21:15 一拳超人的逆袭 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 配置忽略文件 # Compiled class file *.class # Log file *.log # BlueJ files *.ctxt # Mobile Tools for Java (J2ME) .mtj.tmp/# Package Files # *.jar *.war *.nar 阅读全文
posted @ 2021-06-15 16:47 一拳超人的逆袭 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-06-15 15:11 一拳超人的逆袭 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 集中式的版本控制工具: 分布式的版本控制工具 http://git-scm.com/download/win git的官方下载页 https://npm.taobao.org/mirrors/git-for-windows/v2.32.0.windows.1/镜像 基本上全都默认点next就好了 阅读全文
posted @ 2021-06-15 14:48 一拳超人的逆袭 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 配置文件或者配置类 @Configuration @ComponentScan(basePackages ={"day506AOP"}) @EnableAspectJAutoProxy(proxyTargetClass =true) public class CofigAop { } <?xml v 阅读全文
posted @ 2021-06-15 12:39 一拳超人的逆袭 阅读(44) 评论(0) 推荐(0) 编辑
摘要: /** * @author wuyimin * @create 2021-05-06-8:56 * @description AOP面向方面/切面编程:在不通过修改源代码的方式添加新的功能 * 权限判断模块配置到副本模块中 * AOP底层原理:动态代理 * 两种代理情况 * 第一种有接口:使用jdk 阅读全文
posted @ 2021-06-15 12:34 一拳超人的逆袭 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-ins 阅读全文
posted @ 2021-06-15 12:19 一拳超人的逆袭 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 测试类: //测试工厂bean 单多实例 @Test public void test01(){ ApplicationContext context=new ClassPathXmlApplicationContext("503bean5.xml"); MyBean myBean1 = conte 阅读全文
posted @ 2021-06-15 11:20 一拳超人的逆袭 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 实体类: public class IOCIntro { private String bName; private String bAuthor; public void setAddress(String address) { this.address = address; } private 阅读全文
posted @ 2021-06-15 11:05 一拳超人的逆袭 阅读(53) 评论(0) 推荐(0) 编辑
摘要: Spring的两个核心部分IOC:控制反转,把创建对象的过程交给Spring进行管理Aop:面向切面,不修改源代码也能进行功能增强Spring框架的特点1.方便解耦,简化开发2.Aop编程的支持3.方便程序的测试,支持junit44.方便集成各种其他框架5.降低javaEE api的使用难度6.方便 阅读全文
posted @ 2021-06-15 10:53 一拳超人的逆袭 阅读(34) 评论(0) 推荐(0) 编辑