-
2021-10-11 11:14:54
问题说明
Annotation-specified bean name conflicts with existing,non-compatible bean definition of same name and class
翻译一下,大概就是:
使用的注解发现了2个同名的bean导致了冲突。
原因分析
我用的springboot依赖了2个第三方jar,里面分别有一个
AuditConfig
bean,我又不能去修改他们,因为不是我维护的。问题清楚了下面解决吧!问题解决
既然不能去改变第三方依赖,那就尝试在我应用启动的时候排除掉那个不用的bean即可,例如我的做法:
@ComponentScan(basePackages = {"com.xx.xx.*"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {AuditConfig.class}))
更多相关内容 -
nginx+php出现No input file specified解决办法
2021-01-10 11:37:54今天在自己本地的开发环境突然出现了No input file specified错误,反复检查返现自己的配置文件和配置路径以及权限都没有问题。经过反复的排查终于发现了问题,现将问题及解决分享如下: 问题原因分析 在GitHub上... -
详解no input file specified 三种解决方法
2020-12-20 04:32:14一.IIS Noinput file specified 方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS 方法二: 请修改php.ini 找到 ; cgi.force_redirect = 1 去掉前面分号,把后面的1改为0 即 cgi.... -
关于PHP5.6+版本“No input file specified”问题的解决
2020-10-15 21:25:22主要介绍了关于PHP5.6+版本“No input file specified”问题的解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧 -
调整参数后引起,ORA-00838: Specified value of MEMORY_TARGET is too small
2022-03-30 09:27:19调整参数后引起,ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 3 2768M 的解决方案 -
MyBatis异常-Property 'configLocation' not specified, using default MyBatis Configuration
2020-08-26 04:44:08今天小编就为大家分享一篇关于MyBatis异常-Property 'configLocation' not specified, using default MyBatis Configuration,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来... -
Laravel框架运行出错提示RuntimeException No application encryption key has been specified.解决方法
2020-10-17 05:34:35主要介绍了Laravel框架运行出错提示RuntimeException No application encryption key has been specified.解决方法,涉及Laravel框架相关配置、设置与运行操作技巧,需要的朋友可以参考下 -
oracle 10g OEM常规错误(Unknown host specified)解决
2020-09-11 00:07:23本文将详细介绍oracle 10g OEM常规错误-------Unknown host specified解决方法,需要了解的朋友可以参考下 -
解决Mysql Error-The user specified as a definer (‘mysql.infoschema’
2021-01-07 11:43:23解决Mysql Error-The user specified as a definer (‘mysql.infoschema’@’localhost’) does not exist -
APACHE支持.htaccess伪静重写出错 No input file specified的解决方案
2020-09-15 15:26:26主要介绍了APACHE支持.htaccess伪静重写出错 No input file specified的解决方案,需要的朋友可以参考下 -
ASP.NET The system cannot find the file specified解决办法
2021-01-02 20:06:47ASP.NET The system cannot find the file specified解决办法 Server Error in ‘/’ Application. The system cannot find the file specified Description: An unhandled exception occurred during the execution... -
mysql建库时提示Specified key was too long max key length is 1000 bytes的问题的解决方法
2020-09-11 00:39:18本文将详细提供mysql建库时提示Specified key was too long max key length is 1000 bytes的问题的解决方法,有需求的朋友可以参考 -
ValueError: Could not find a format to read the specified file in mode ‘i’
2021-01-06 21:51:00此类问题一般跟python的imageio模块有关, 解决办法一 可尝试加个plugin image = io.imread(filename,plugin='matplotlib') 或者加个pilmode imageio.imread(filename,pilmode=RGB) 参考链接一 ... -
【LNMP】提示Nginx PHP “No input file specified”错误的解决办法
2018-07-13 12:15:40【LNMP】提示Nginx PHP “No input file specified”错误的解决办法 -
提示No input file specified的解决方法
2020-07-30 20:06:27本文给出几种编程时提示No input file specified的解决方法。 -
The user specified as a definer ('root'@'%') does not exist 解决方法
2016-12-26 11:08:06mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法 -
MySQL错误“Specified key was too long; max key length is 1000 bytes”的解决办法
2020-09-11 05:43:39今天在为数据库中的某两个字段设置unique索引的时候,出现了Specified key was too long; max key length is 1000 bytes错误 -
The specified CGI application misbehaved by not returning a complete set of HTTP headers
2020-10-28 15:26:00The specified CGI application misbehaved by not returning a complete set of HTTP headers -
No input file specified. Nginx PHP
2022-04-23 18:42:35今天按照官方文档安装完Nginx和PHP之后,打开本地localhost,出现了这个错误:No input file specified. 一. 安装 Nginx 系统是Ubuntu-20.04.1,Nginx是通过官方文档 apt 方式安装的,参考官方wiki:Install | ...都2022了,再写PHP的文章是不是过时了?现在还坚持搞PHP的不多了吧。
今天按照官方文档安装完Nginx和PHP之后,打开本地localhost,出现了这个错误:No input file specified.
一. 安装 Nginx
系统是Ubuntu-20.04.1,Nginx是通过官方文档 apt 方式安装的,参考官方wiki:Install | NGINX,
Ubuntu系统默认的apt源里是有Nginx的,不过版本不是最新的1.20,而是1.18.按照Nginx官方文档的教程安装最新版本,首先添加Nginx的源,在
/etc/apt/sources.list里添加以下代码,或者新建一个/etc/apt/sources.list.d/nginx.list文件添加以下代码
## Replace $release with your corresponding Ubuntu release. deb https://nginx.org/packages/ubuntu/ $release nginx #deb-src https://nginx.org/packages/ubuntu/ $release nginx
将代码中的 $release 换成Ubuntu系统版本的代号,比如20.04的代号是 focal,替换后为
deb https://nginx.org/packages/ubuntu/ focal nginx #deb-src https://nginx.org/packages/ubuntu/ focal nginx
然后执行
sudo apt update
更新 apt 包信息,如果出现以下错误
W: GPG error: https://nginx.org/packages/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY $key
是 nginx.org 公钥的问题,其中 $key 是一个数字串,执行以下代码,注意替换$key为上面报错信息里的数字串
## 把 $key 替换成报错的那个数字串 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key sudo apt update
不报错的话,apt 源就更新成功了,如图
然后安装nginx。
sudo apt install nginx
安装成功后,启动 nginx。可以通过 nginx命令启动,也可以通过systemctl 启动
sudo systemctl start nginx
二. 安装 PHP
Ubuntu官方apt源里的PHP版本比较旧,PHP官方也没有 apt 源,按官方文档 PHP: Nginx 1.4.x on Unix systems - Manual 只能源码安装了。
通过 PHP: Downloads 下载源码,我下载的是 php-8.0.18.tar.gz ,解压
tar -xzvf php-8.0.18.tar.gz
进入到解压后的目录
cd php-8.0.18/
配置与编译
./configure --enable-fpm --with-mysqli make sudo make install
第一步./configure的时候会提示错误,缺少编译器,需要安装gcc,通过 sudo apt install gcc 安装即可。 也可能会提示缺少相关的工具,比如 libxml2, zlib等,同样通过 sudo apt install libxml2 libxml2-dev即可,需要注意的是提示缺少libxml2,光安装libxml2不行,还需要安装 libxml2-dev;安装zlib的时候,zlib的apt包名是 zlib1g,所以通过 sudo apt install zlib1g zlib1g-dev 来安装。其它缺少的包都这样安装就行。
make的时间会稍有点长,一二十分钟吧。
make完会提示让执行make test, 执行 make test 即可。
sudo make install完成后即安装完成了,接下来开始配置。
将源码目录中的 php.ini-development 拷贝到他们正确的位置,这个位置通过 php --ini 命令来查看,这个PHP默认加载php.ini的位置
目录是 /usr/local/lib, 拷贝到此目录
cp php.ini-development /usr/local/lib/php.ini
拷贝 php-fpm 的配置文件和执行文件到指定位置
cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf cp /usr/local/etc/php-fpm.d/www.conf.default /usr/local/etc/php-fpm.d/www.conf cp sapi/fpm/php-fpm /usr/local/bin
当文件不存在时阻止Nginx转发到后端 php-fpm,编辑 php.ini 修改一个配置项
vim /usr/local/lib/php.ini
定位到 cgi.fix_pathinfo=, 去掉前面的分号,修改成
cgi.fix_pathinfo=0
编辑 php-fpm 的配置文件,修改一下 php-fpm 的启动用户和组
vim /usr/local/etc/php-fpm.d/www.conf
找到 user = nobody group = nobody 这里,改成
user = www-data group = www-data
启动 php-fpm
sudo /usr/local/bin/php-fpm
这里需要加 sudo,不然会提示没有权限。
配置完 PHP 的配置文件 和 php-fpm 的配置文件,接下来配置 Nginx 的配置文件了。
首先找到Nginx的配置文件的位置,通过 nginx -V 命令可以查看。
编辑此文件
sudo vim /etc/nginx/nginx.conf
这个是 nginx 的总配置文件,打开后可以看到有两个重要信息
上面的 error_log 那一行是nginx的错误日志文件的位置,下面的 include 是包含的子配置文件的位置,这个文件以 http {} 为主, 在子配置文件里以 server{}为主,虚拟主机配置可以通过添加子配置文件来设置,打开子配置文件的目录 /etc/nignx/conf.d/ 看以下
只有一个子配置文件 default.conf,编辑此文件
sudo vim /etc/nginx/conf.d/default.conf
添加红框里内容
Nginx 配置完毕,重启一下。
sudo systemctl restart nginx
完事了,建一个 .php 文件测试一下吧。找到 nginx 的 文档根目录,打开 nginx 的配置文件里面有
sudo vim /etc/nginx/nginx.conf
切换到此目录,创建 index.php
cd /usr/share/nginx/html/ rm index.html vim index.php
输入以下php代码
<?php phpinfo(); ?>
打开浏览器 http://localhost, 结果出现如下错误:
一切都是按照官方文档配置下来的, 就这一个模糊信息,到底是 nginx 的配置有问题,还是 php-fpm的配置或者php的配置有问题?
查看 headers,报的是 404 错误,根目录明明有 index.php,为什么还404错误呢?既然这里错误信息这么模糊,只能去错误日志里看看了。在上面的 /etc/nginx/nginx.conf 配置文件里可以看到 nginx 的错误日志目录在 /var/log/nginx/error.log, 打开此文件的最后看一下
tail /var/log/nginx/error.log
有一个错误,显示FastCGI返回了一个错误,没有找到此文件,/etc/nginx/html/index.php,在 /etc/nginx/conf.d/default.conf 这个配置文件里,明明文档根目录是 /usr/share/nginx/html
为什么会去 /etc/nginx/html 目录去找呢?
考虑到这个root 是在 location / 块里配置的, 新添加的那块是 location ~* \.php$ 块,有没有可能是那个块里也需要指定 root 配置项? 试一下
重启 nginx
sudo systemctl restart nginx
刷新浏览器 http;//localhost,终于出现如下页面
成功解决。
总结:nginx 对于 php 文件的请求会转发给后端的 php-fpm, 但是出现404错误的时候,并没有显示出详细的错误信息,只是显示了一个 No input file specified. 详细的错误信息需要到错误日志里去看。
-
Delete the specified folder
2015-05-29 08:23:02Delete the folder under the specified path -
为什么nvcc提示nvcc fatal: no input files specified ?
2020-09-12 09:49:35问题是当我试图去修改nvcc的--gpu-architecture 和 --gpu-code的时候总是报错,提示No input files specified; use option --help for more information ![图片说明]... -
no input file specified 三种解决方法
2021-04-20 02:25:19一.IISNoinput file specified方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS方法二:请修改php.ini找到; cgi.force_redirect = 1去掉前面分号,把后面的1改为0即cgi.force_redirect = 0二....一.IIS Noinput file specified
方法一:改PHP.ini中的doc_root行,打开ini文件注释掉此行,然后重启IIS
方法二:
请修改php.ini
找到
; cgi.force_redirect = 1
去掉前面分号,把后面的1改为0
即
cgi.force_redirect = 0
二.apache No input file specified
apache No input filespecified,今天是我们配置apache RewriteRule时出现这种问题,解决办法很简单如下
打开.htaccess 在RewriteRule 后面的index.php教程后面添加一个“?”
完整代码如下.htaccess
RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
如果是apache服务器出问题,看看是不是的Apache 把 .php 后缀的文件解析哪里有问题了。
总结
Apache 将哪些后缀作为 PHP 解析。例如,让 Apache 把 .php 后缀的文件解析为PHP。可以将任何后缀的文件解析为 PHP,只要在以下语句中加入并用空格分开。这里以添加一个 .phtml 来示例。AddType application/x-httpd-php .php .phtml
为了将 .phps教程作为 PHP 的源文件进行语法高亮显示,还可以加上:AddType application/x-httpd-php-source .phps
用通常的过程启动 Apache(必须完全停止 Apache 再重新启动,而不是用 HUP 或者USR1 信号使 Apache 重新加载)。
三.nginx配置遭遇No inputfile specified
虚拟机测试nginx 遭遇 Noinput file specified,多方查找终于找到解决办法
1、 php.ini(/etc/php5/cgi/php.ini)的配置中这两项cgi.fix_pathinfo=1 (这个是自己添加的)
doc_root=
2、nginx配置文件/etc/nginx/sites-available/default中注意以下部分location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include fastcgi_params;
}
上面的部分路径需要根据你主机主目录的实际情况填写
配置完以上部分,重启一下service nginx restart,应该没问题了
-
Tomcat Error: Application Server not specified
2022-04-06 23:47:51Tomcat Error: Application Server not specified在IDEA中tomcat不能运行,点开Edit Configuration发现如下图情况:tomcat图标猫上有个红叉,且下面有警告提示:Error: Application Server not specified。
原因是没有关联本地的tomcat,关联本地tomcat即可
解决方案:
首先,在Application server中,点击Configure…,选择自己安装的tomcat;
其次,下面的JRE一定要选,不能为空,否则还是报错!
配好这两个东西之后,红叉和Error都将得到解决。一、问题
idea中的tomcat报错: Application Server not specified
二、解决
原因是没有关联本地的tomcat,关联本地tomcat即可
1. Maven里先clean一下,清理target;
2. 把Tomcat--> Deployment--> Deploy at the server startup框中删除干净,
并在下方的Before launch删除Build以外的所有东西,
删错Build也可以在右方+号处进行添加;
3. 点击下方Warning提示右方的fix进入Project Structure
(也可在主页面Ctrl + Alt + Shift + S 进入);
4. 在Facets页面的左上方+号添加Web;
5. 在Artifacts中,先添加Web Application:Exploded-->
From Modules--> 此项目
Name:servlet01:war exploded
Type:Web Application:Exploded
Output directory:项目地址\target\servlet-01
6. 然后添加Web Application:Archive-->
For servlet01:war exploded
Name:servlet01:war
Type:Web Application:Archive
Output directory:项目地址\target\
7. 先运行一次,报错不要慌,此时在可以看到target文件夹已建成,
打开发现servlet-01文件夹,或许只有WEB-INF文件夹,并没有META-INF和index.jsp,WEB-INF中只有class,没有lib文件夹
8. 自己手动添加lib文件夹,将javax.servlet-api-4.0.1.jar文件放进去,并非文件夹!!!不要偷懒在下面的External Libraries中直接拿,那是文件夹!要去官网下在jar包
9.再把servlet-01中该有的,比如webapp\WEB-INF\index.jsp复制过去,还有META-INF,视频36:09可看。
将target中补充完毕后,重启Tomcat。
Hello World is coming! -
module not specified如何解决
2021-12-13 13:45:24module not specified如何解决 重新跑一下gradle发现是因为原来的配置影响了现有的运行 点击“open dialog” remove掉全部的module 点击下拉框选择module即可运行 -
too few variables specified 怎么解决
2022-03-10 09:58:55too few variables specified 怎么解决 -
Column 'box_id' specified twice 错误
2021-02-01 14:46:37使用 Spring Data JPA插入数据到数据表时,抛出如下错误信息:Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Column 'box_id' specified twiceat sun.reflect.... -
成功解决ValueError: Data is not binary and pos_label is not specified
2022-03-19 17:47:05成功解决ValueError: Data is not binary and pos_label is not specified 目录 解决问题 解决思路 解决方法 解决问题 raise ValueError("Data is not binary and pos_label is not ...