[sonata admin] argument "$code" of method
按照这里,在 AppBundle
中的Controller创建了 CategoryAdmin 类,当运行
php bin/console server:start
出现
Cannot autowire service "AppBundle\Controller\CategoryAdmin": argument "$code" of method "Sonata\AdminBundle\Admin\AbstractAdmin::__construct()" has no
type-hint, you should configure its value explicitly.
通过搜索资料,找到 Empty Dashboard Symfony3 sonata adminBundle 最后比对才发现,需要把 src/AppBundle/Controller/CategoryAdmin.php
放入到 src/AppBundle/Admin/CategoryAdmin.php
,
然后再运行 php bin/console server:start
就启动成功了
最终的效果
[sonata admin] argument "$code" of method的更多相关文章
- The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
如果你是通过搜索来到本文的,相信你应该是遇到了如下的错误 The code of method _jspService(HttpServletRequest, HttpServletResponse) ...
- Tomcat 解决The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
解法: 修改tomcat下的web.xml, 搜索:JspServlet, 增加: <init-param> <param-name>mappedfile</pa ...
- Status Code:405 Method Not Allowed
场景: 前端调用方法的时候,调不通,并且报错信息为405 因为我们公司前后端分离开发,于是前端就来找我说我写的接口有问题?于是我就在这里的postman中测试发现没问题啊. 然后我好好看了一下报错信息 ...
- TODO Auto-generated method stub
在 菜单栏中 Window --> Preferences -->Java -->Code Style -->Code Templates--> Code --> ...
- [Android]通过js方法回调部分native报错 Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
在android4.2以前,注入步骤如下: webview.getSetting().setJavaScriptEnable(true); class JsObject { public String ...
- Struts2 - Interceptor中取得ActionName、Namespace、Method
在Struts2的Interceptor中取得当前执行对应的ActionName.Namespace.Method方法: 可以使用: System.out.println(invocation.get ...
- 去掉代码中自动生成的TODO Auto-generated method stub
Window --> Preferences -->Java -->Code Style -->Code Templates--> Code --> Method ...
- Thread’s start method and run method
工作中用到了Thread,一开始用错了,仔细研究了一下,稍作整理. 前言,今天写代码居然这样写的 new Thread() { @Override public void run() { System ...
- BookNote: Refactoring - Improving the Design of Existing Code
BookNote: Refactoring - Improving the Design of Existing Code From "Refactoring - Improving the ...
随机推荐
- 牛客多校第八场 G Gemstones 栈/贪心
题意: 对于一个序列,把可以把连着三个相同的字母拿走,问最多拿走多少组. 题解: 直接模拟栈,三个栈顶元素相同则答案+1,并弹出栈 #include<bits/stdc++.h> usin ...
- python输入输出(二)
输出 >>> print(5) 5 >>> print(5*6) 30 >>> s1 = "hello" >>&g ...
- servlet和servlet-mapping的作用
转载:https://www.jianshu.com/p/6dadc489969a 某个工程的 web.xml 文件片段: 执行顺序 访问顺序为1—>2—>3—>4,其中2和3的 ...
- project2_login(登录窗口)
该project是在网易云课堂上的公开课<用 python 和 tkinter 做简单的窗口视窗>课程当中学习的,是该课程中的一个结课小项目,项目中的知识点内容涉及该课程中所学习到的大多数 ...
- 2019 牛客多校第一场 E ABBA
题目链接:https://ac.nowcoder.com/acm/contest/881/E 题目大意 问有多少个由 (n + m) 个 ‘A’ 和 (n + m) 个 ‘B’,组成的字符串能被分割成 ...
- map、filter、forEach、reduce数组方法的封装
1.map方法的封装 Array.prototype.mapAlley = function(callback){ //获取调用mapAlley这个方法的数组 let arr = thi ...
- 金三银四铜五铁六,Offer收到手软!
作者:鲁班大师 来源:cnblogs.com/zhuoqingsen/p/interview.html 文中的鲁班简称LB 据说,金三银四,截止今天为止面试黄金时间已经过去十之八九,而LB恰逢是这批面 ...
- verbosity
import unittest class myTest(unittest.TestCase): def test_01(self): print("普通方法1") def tes ...
- DRF的JWT用户认证
目录 DRF的JWT用户认证 JWT的认证规则 JWT的格式 JWT认证的流程 JWT模块的导入为 JWT的使用 DRF的JWT用户认证 从根本上来说,JWT是一种开放的标准(RFC 7519), 全 ...
- 数据分析相关概念(numpy)
矢量 矢量是指一堆形成的集合. 多维数组也叫做矢量化计算. 单独一个数叫做标量 例: import datetime as dt import numpy as np n2=10000 start2 ...