一、解决跨域、过虑options请求问题 1.创建过虑类 import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import javax.se ...
分类:
编程语言 时间:
2020-03-25 01:25:08
阅读次数:
109
spring中ioc的常用注解 Componment 用于创建对象,作用和标签相同 Component: 作用:用于把当前类对象存入spring容器中 属性:value 用于指定bean的id。当我们不写时,它的默认值是当前类名,且首字母小写 Controller:一般用在表现层 Service:一 ...
分类:
编程语言 时间:
2020-03-24 23:12:35
阅读次数:
80
我们在开发小程序时,总会遇到一些删除功能列表的操作,触屏左滑操作,即显示可操作删除按钮; 首先,我们需要在components里边注册一个组件, 我们在 components中创建一个slide目录,然后在新建Component,命名为slide,这样就自动生成slide组件 我们就在slide.w ...
分类:
微信 时间:
2020-03-24 11:17:15
阅读次数:
97
vue中 关于$emit的用法 1、父组件可以使用 props 把数据传给子组件。2、子组件可以使用 $emit 触发父组件的自定义事件。 vm.$emit( event, arg ) //触发当前实例上的事件 vm.$on( event, fn );//监听event事件后运行 fn; 例如:子组 ...
分类:
其他好文 时间:
2020-03-24 10:39:54
阅读次数:
59
schemaLocation添加 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd 引用地址:https://blog.csdn ...
分类:
编程语言 时间:
2020-03-24 01:05:09
阅读次数:
73
一,首先讲 React的悬浮框 示例,可参照链接 Demo文档,可参照链接 1. 安装 npm install suspend-button -S 2. 使用 import React, { Component } from 'react' import ReactDOM from 'react-d ...
分类:
移动开发 时间:
2020-03-23 17:16:05
阅读次数:
110
在做项目时,发现项目中 加载类时,有的地方使用@Autowired,有的地方使用@Resource 在网上搜集了资料 共同点 @Resource和@Autowired都可以作为注入属性的修饰,在接口仅有单一实现类时,两个注解的修饰效果相同,可以互相替换,不影响使用。 不同点 @Resource是Ja ...
分类:
编程语言 时间:
2020-03-23 15:06:22
阅读次数:
80
事件: import React,{Component} from 'react' class Index extends Component{ constructor(props){ super(props) this.state = { msg:'张学友' } } getMsg=(event)= ...
分类:
其他好文 时间:
2020-03-23 11:10:31
阅读次数:
54
React.memo是一个高阶组件,本质就是一个函数。基本形式如下: React.memo(functionl Component, areEqual) React.memo与PureComponent作用一样,都是用来减少组件渲染。区别如下: 1. React.memo针对函数式组件,PureCo ...
分类:
其他好文 时间:
2020-03-22 23:58:15
阅读次数:
127
在Zuul工程中 1、增加Zuul的Hystrix的配置 并且设置超时时间为2毫秒 2、增加业务降级处理 ** * 业务降级处理 */ @Component public class MyFallback implements FallbackProvider { //针对哪一个路由进行降级, re ...
分类:
其他好文 时间:
2020-03-22 21:17:01
阅读次数:
264