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. ssh 私钥和公钥 参考的linux就该这么学

  2. Java-Class-@I:org.springframework.stereotype.Service

    ylbtech-Java-Class-@I:org.springframework.stereotype.Service 1.返回顶部   2.返回顶部 1. package com.ylbtech. ...

  3. 牛客练习赛43D Tachibana Kanade Loves Sequence

    题目链接:https://ac.nowcoder.com/acm/contest/548/D 题目大意 略 分析 贪心,首先小于等于 1 的数肯定不会被选到,因为选择一个数的代价是 1,必须选择大于1 ...

  4. 剑指offer——36二叉树和为某一值的路径

    题目描述 输入一颗二叉树的根节点和一个整数,打印出二叉树中结点值的和为输入整数的所有路径.路径定义为从树的根结点开始往下一直到叶结点所经过的结点形成一条路径.(注意: 在返回值的list中,数组长度大 ...

  5. storm0.91集群部署

    事先配置2台服务器配置好zookeeper,在配置文件中用zookeeper管理集群,配置文件如下 配置文件/conf/storm.yaml supervisor.slots.ports: 对于每个S ...

  6. 面试总结【css篇】- css3新增特性

    1.css3中的关键帧 @keyframes规则通过在动画序列中定义关键帧(或waypoints)的样式来控制CSS动画序列中的中间步骤.这 比转换更能控制动画序列的中间步骤. @keyframes ...

  7. 使用R语言 SDK调取tushare数据

    安装Tushare 打开RStudio,在控制台输入命令: > install.packages('Tushare') Tushare的R包需要依赖httr.tidyverse.forecast ...

  8. 手动从零使用ELK构建一套搜索服务

    前言 这两天需要对接一个新的搜索业务,由于测试机器还没到位,所以就自己创造条件,通过在Windows上安装VM虚拟机,模拟整套环境,从而能快速进入核心业务的开发测试状态中. 系统环境安装配置 虚拟机V ...

  9. mysql 06章_分组查询和链接查询

    一.分组查询 在进行查询时,通常需要按某个或某些字段进行一些统计,因此就需要使用分组查询,但分组后通常需要与聚合函数使用,分组才有意义. 语法:SELECT <字段列表|*> FROM 表 ...

  10. 2018-10-8-3分钟教你搭建-gitea-在-Centos-服务器

    title author date CreateTime categories 3分钟教你搭建 gitea 在 Centos 服务器 lindexi 2018-10-08 09:54:39 +0800 ...