会员
周边
众包
新闻
博问
闪存
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
楠木的博客
博客园
首页
新随笔
联系
订阅
管理
2020年4月21日
npm publish报错403 Forbidden - PUT http://XXX - forbidden;http fetch PUT 403 http://XXX ; verbose stack Error: 403 Forbidden - PUT http://XXX - forbidden
摘要: 问题:在使用 npm publish 的时候报错 403 Forbidden PUT http://XXX forbidden;http fetch PUT 403 http://XXX ; verbose stack Error: 403 Forbidden PUT http://XXX forb
阅读全文
posted @ 2020-04-21 11:53 楠-木
阅读(1202)
评论(0)
推荐(0)
2020年4月3日
父子组件利用@Input和@Output传值时显示undefined
摘要: 父子组件利用@Input和@Output传值时,console显示日志显示传的值undefined。 原因:传的这个值是异步获取到的(也就是从后端返回来的值),而我在子组件中直接在 ngOnInit() 中调用了这个值,所以异步这个值还没返回就被调用了。 解决方法:在子组件的 ngOnChanges
阅读全文
posted @ 2020-04-03 15:30 楠-木
阅读(424)
评论(0)
推荐(0)
2020年4月2日
Angular中使用@Input和@Output传值
摘要: 父子组件传值的时候往往会用到 @Input和@Output 装饰器, @Input用于数据从父组件流入子组件,@Output用于从子组件传出数据到父组件。 一. @Input 从 A组件(父组件):app detail 给 B组件(子组件): app detail console 传值: (1)在
阅读全文
posted @ 2020-04-02 20:17 楠-木
阅读(1266)
评论(0)
推荐(0)
2020年3月21日
Angular 报错:Error: StaticInjectorError(e)[t -> t]: StaticInjectorError(Platform: core)[t -> t]: NullInjectorError: No provider for t!
摘要: Angular使用中报错:Error: StaticInjectorError(e)[t t]: StaticInjectorError(Platform: core)[t t]: NullInjectorError: No provider for t! 报错原因:我在 detail.compon
阅读全文
posted @ 2020-03-21 15:32 楠-木
阅读(2485)
评论(0)
推荐(0)
2020年3月18日
IDEA 运行报错:Error running ' XXX ': Command line is too long. Shorten command line for XXX
摘要: 在运行 IDEA 时报错: Error running ' XXX ': Command line is too long. Shorten command line for XXX 网上查了一下,有两种解决方法。 方法一:转载自:https://blog.csdn.net/ZXJ_1223/art
阅读全文
posted @ 2020-03-18 16:51 楠-木
阅读(2759)
评论(0)
推荐(1)
IDEA单元测试关于 doReturn().when() 的问题
摘要: 在跑单元测试时报错,如下图: 修改如下:这里在 when() 后边不能一直加 点儿 连续调用, 得拆开来分别 mock , 一步一步写,这样就能跑通了: 希望以上回答对大家有所帮助!
阅读全文
posted @ 2020-03-18 11:41 楠-木
阅读(2458)
评论(0)
推荐(0)
2020年3月17日
IDEA单元测试报错 Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'XXX' is expected to be of type 'XXX' but was actually of type 'XXX'
摘要: 在启动单元测试时候报错 因为我的项目所有的单元测试是继承 BaseTest 的,发现是在 BaseTest 中有的类没有 Mock 掉,并且发现报错是在其中的 SossRabbitConfig 类中(这里因个人项目而有所不同,要注意看报错中的 Bean named 是在你自己项目的哪个类里),进入后
阅读全文
posted @ 2020-03-17 23:48 楠-木
阅读(2661)
评论(0)
推荐(1)
2020年3月14日
IDEA单元测试报错 Error running ' XXX ': Cannot start process, the working directory ' XXX ' does not exist
摘要: 背景:我在点击 soss redis manager 这个项目的单元测试的时候,会报错: Error running 'XXX': Cannot start process, the working directory ' soss sqlserver manager' does not exist
阅读全文
posted @ 2020-03-14 12:17 楠-木
阅读(1799)
评论(0)
推荐(0)
公告