2. CREATING AN ADMIN

按照这里,在 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的更多相关文章

  1. The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

    如果你是通过搜索来到本文的,相信你应该是遇到了如下的错误 The code of method _jspService(HttpServletRequest, HttpServletResponse) ...

  2. Tomcat 解决The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

    解法: 修改tomcat下的web.xml,     搜索:JspServlet, 增加: <init-param> <param-name>mappedfile</pa ...

  3. Status Code:405 Method Not Allowed

    场景: 前端调用方法的时候,调不通,并且报错信息为405 因为我们公司前后端分离开发,于是前端就来找我说我写的接口有问题?于是我就在这里的postman中测试发现没问题啊. 然后我好好看了一下报错信息 ...

  4. TODO Auto-generated method stub

    在 菜单栏中 Window --> Preferences -->Java -->Code Style -->Code Templates--> Code --> ...

  5. [Android]通过js方法回调部分native报错 Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'

    在android4.2以前,注入步骤如下: webview.getSetting().setJavaScriptEnable(true); class JsObject { public String ...

  6. Struts2 - Interceptor中取得ActionName、Namespace、Method

    在Struts2的Interceptor中取得当前执行对应的ActionName.Namespace.Method方法: 可以使用: System.out.println(invocation.get ...

  7. 去掉代码中自动生成的TODO Auto-generated method stub

    Window --> Preferences -->Java -->Code Style -->Code Templates--> Code --> Method ...

  8. Thread’s start method and run method

    工作中用到了Thread,一开始用错了,仔细研究了一下,稍作整理. 前言,今天写代码居然这样写的 new Thread() { @Override public void run() { System ...

  9. BookNote: Refactoring - Improving the Design of Existing Code

    BookNote: Refactoring - Improving the Design of Existing Code From "Refactoring - Improving the ...

随机推荐

  1. iOS报错锦集

    1.Your session has expired. Please log in. 提示“Your session has expired. Please log in.” 解决办法: Xcode ...

  2. class6_scale尺度

    最终的运行效果(程序见序号7) #!/usr/bin/env python# -*- coding:utf-8 -*-# --------------------------------------- ...

  3. KEIL, MDK 关于C99结构体变量初始化

    C99:here 例如声明了这样的结构体 void test1() { tt_t t1 ={ .a = , .d = 'd', .b = , .c = }; static tt_t t2 = { ,, ...

  4. USACO 2007 “March Gold” Ranking the Cows

    题目链接:https://www.luogu.org/problemnew/show/P2881 题目链接:https://vjudge.net/problem/POJ-3275 题目大意 给定标号为 ...

  5. 为kubectl配置别名和命令行补齐

    配置别名 # vim ~/.bashrc 添加 alias k='kubectl' # source ~/.bashrc 配置命令行补齐 # yum install -y bash-completio ...

  6. uboot 的启动过程及工作原理

    启动模式介绍 大多数 Boot Loader 都包含两种不同的操作模式:"启动加载"模式和"下载"模式,这种区别仅对于开发人 员才有意义.但从最终用户的角度看, ...

  7. IDEA 打开Run Dashboard 分组启动

    一,项目文件夹中,找到 .idea-->workspace.xml 添加: <component name="RunDashboard"> <option ...

  8. 同步图计算实现pageRank算法

    pageRank算法是Google对网页重要性的打分算法. 一个用户浏览一个网页时,有85%的可能性点击网页中的超链接,有15%的可能性转向任意的网页.pageRank算法就是模拟这种行为. Rv:定 ...

  9. Django项目基础配置和基本使用

    博文配置内容包括: django项目的创建 django项目下应用的创建及配置 数据库的配置 templates模板的配置 命令行创建项目: 在需要的目录下创建Django项目输入命令:django- ...

  10. Android开发 了解ViewModel

    前言 ViewModel是google推出的一个数据处理框架,ViewModel类是被设计用来以可感知生命周期的方式存储和管理 UI 相关数据ViewModel中数据会一直存活即使 activity ...