Spring Boot进阶1 - 整合Swagger2自动生成RESTful API文档

2022-03-02 14:03

满意答案

看下你的struts.xml 里面配置的
     

这种类型的句子 看看class有没有配置错路径,或者看看你的action文件名字是不是BlogUsers

还有种可能看看struts.xml 里面的namespace有没有弄错,要在jsp页面里面调用action的时候加上namespace的,如namespace=“test/” 你在表单跳转中action="test/....."要写成这样

其他回答

是不是配置文件没写对?这个错误很常见的,用url重写了么?如果有看看url重写的配置文件,看看struts配置文件,再看看要定位的是execute方法还是自己定义的方法,还有在web.xml中配置的struts的后缀,是不是吧*.action改成别的了?等等。这个错误应该跟代码无关,配置或者访问路径问题。
BlogUsers在struts.xml中action配置有问题
你非得用msg.hello这个属性么? 你的action中有一个string类型的msg属性,你想想看你这样会输出什么?
换个名字试试看  
还有你需要引入这个文件么,你不是已经继承了struts-default.xml

相关问答

更多

Java 配置 Struts2 报错 怎么解决啊

看下你的struts.xml 里面配置的 这种类型的句子 看看class有没有配置错路径,或者看看你的action文件名字是不是BlogUsers 还有种可能看看struts.xml 里面的namespace有没有弄错,要在jsp页面里面调用action的时候加上namespace的,如namespace=“test/” 你在表单跳转中action="test/....."要写成这样

struts2 的配置文件路径问题

在web.xml中这样设置 struts org.apache. struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter config struts-default.xml,struts-plugin.xml,config/struts.xml struts /* 必须把struts-default.xml,struts-plugin.xml一起添加。必须:按顺序添加

struts2的配置文件放在哪?

放到SRC下。如果struts.xml里带有INCLUDE标签 则放到对应的包下面。

什么是Java中的Masterpage等效(Struts2)(What is the Masterpage equivalent in Java (Struts2))

我不知道ASP.NET和Masterpages,但你可能想看看Tiles插件 。 编辑:看看Masterpages文档,看起来像Tiles真的是你想要的。 I don't know ASP.NET and Masterpages but you might want to look into the Tiles plugin. Edit: looking at the Masterpages documentation it seems like Tiles really is the equiv...

使用struts2注释定义拦截器(define interceptors with struts2 annotations)

struts2-convention-plugin不会取代XWork及其基于xml的配置。 因此,如果您使用自定义拦截器,则无法消除对struts.xml的需求。 有关约定插件用法的参考和说明,请参阅docs 。 The struts2-convention-plugin doesn't replace XWork and its configuration which is xml based. So you cannot eliminate a need of struts.xml if yo...

在struts2验证中需要帮助(Need Help in struts2 Validation)

你的假设是正确的,当添加一个字段错误时,它会默认返回“INPUT”结果,导致输入结果被渲染。 我会建议寻找实施可预备的,这将允许您始终在页面呈现之前填充组合框。 Your assumption is correct, when a field error is added, it will by default return the "INPUT" result, causing the input result to be rendered. I would suggest looking in...

在struts2中使用tile时出错(error while using tiles in struts2)

这是不可能的全天搜索谷歌,并没有找到一个解决方案。 你错过了一堂课。 你需要一个org.apache.tiles.web.startup.TilesListener类,但是这个文件可以在tiles-core-2.0.6.jar中找到 。 你缺少这个文件。 如果您不想从Web下载每个文件,请使用pom.xml Maven配置,如下面的链接。 当您使用mvn package构建项目时,Maven将下载所有必需的依赖项 除此之外,项目文件中的很多错误都是一个配置: 搞糟不同版本的瓷砖 使用错误和冗余的上...

如何显示所有可用的Struts2操作?(How to display all available Struts2 actions?)

你可以用config-browser插件做到这一点。 检查参考文档。 该插件的一个功能是 显示所有可访问的操作URL You could do it with the config-browser plugin. Check the reference docs. One of the features of that plugin is Shows all accessible action URLs

Struts 1到Struts2升级 - 配置Tiles的问题(Struts 1 to Struts2 Upgrade - Issue with configuring Tiles)

请尝试包括tiles-srvlet jar。 根据tile 2.2,TilesListener类存在于该jar上。 Please try to include the tiles-srvlet jar. The TilesListener class is present on that jar as per tiles 2.2.

struts2中的freemarker配置(freemarker configuration in struts2)

根据Struts文档,您可以使用freemarker.properties文件指定FreeMarker配置设置,该文件应该是“在类路径中”。 (可以在Configuration.setSetting的FreeMarker API文档中找到设置列表) 顺便说一句,不要使用2.3.21; 这是一个非常古老的版本。 (我不是指incompatibleImprovements ,而是版本的jar。) According to the Struts documentation, you can specif...

相关文章

更多

springboot整合Swagger2

Swagger2是一个开源项目,用于为RESTful Web服务自动生成REST API文档。 它提供 ...

什么是Spring boot

什么是Spring boot? Spring Boot是由Pivotal团队提供的全新框架,其设计目的 ...

快速了解Spring Boot

Spring Boot会根据使用@EnableAutoConfiguration批注添加到项目中的依赖 ...

Spring boot整合mybatis plus

快速了解mybatis plus 是对Mybatis框架的二次封装和扩展 纯正血统:完全继承原生 My ...

Spring boot入门实例

入门实例是基于maven工程,主要配置: spring boot 父节点依赖,引入这个之后相关的引入就 ...

spring boot 整合 ueditor 教程一

56463.com全面切到springboot,同时把ueditor 也升级到最新的ueditor1_ ...

Spring Boot使用FastJson解析JSON数据

Spring Boot默认使用jackson,国内很多人比较习惯用fastjson。所以我们看一下怎么 ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本