No Spring WebApplicationInitializer types detected on classpath 載入不到配置檔案或找不到spring主配置
第一種情況
在web.xml當中配置錯誤,沒有正確的引入spring的配置檔案。找不到時,報告次錯誤。
檢查配置檔案,引入是否正確。
classpath:springconfig.xml ,這個格式的配置為讀取本專案classpath下的檔案
classpath*:springconfig.xml 這個格式的配置為讀取本專案下或者是jar包的classpath下的配置檔案。多個同名只讀第一個。
第二種情況
No Spring WebApplicationInitializer types detected on classpath
tomacat 伺服器載入jar 不全 ,導致啟動錯誤。
使用編譯器 maven clean 下。在clean 下專案。
第三種情況
lag4j.properties 配置檔案的載入
這個配置檔案一般要配置到當前目錄中。web.xml 當中引入日誌配置檔案時,使用classpath*:log4j.properties 配置引數,如果檔案在jar包,會報錯:找不到此檔案。
相關推薦
No Spring WebApplicationInitializer types detected on classpath 載入不到配置檔案或找不到spring主配置
第一種情況 在web.xml當中配置錯誤,沒有正確的引入spring的配置檔案。找不到時,報告次錯誤。 檢查配置檔案,引入是否正確。 classpath:springconfig.xml ,這個格式的配置為讀取本專案classpath下的檔案 classpath*:s
啟動報錯:spring No Spring WebApplicationInitializer types detected on classpath
我通過maven外掛把專案送過去後,馬上就說**war has finished in 1,618 ms,開啟瀏覽器登入找不到404。 看日誌開啟catalina.2017-01-08.log,發現報錯【spring No Spring WebApplicationInit
關於 No Spring WebApplicationInitializer types detected on classpath卡死的解決辦法
在做一個SSH專案的時候Tomcat遇到了卡死,錯誤如下 資訊: No Spring WebApplicationInitializer types detected on classpath 七月
"No Spring WebApplicationInitializer types detected on classpath" 解決方案
前言 這兩天從新搭建專案框架,用的框架版本如下: * Maven 3.3.3 * Spring 4.1.5 * SpringMVC 4.1.5 * MyBatis 3.3.0 * Servlet 3.0 伺服器啟動的log中有這樣一行: 雖然
在ServletContextListener 的實現類中(使用Spring @Value 註解的方式讀取配置檔案、或者注入Spring bean)
在ServletContextListener 的實現類中 使用Spring @Value 註解的方式讀取配置檔案 我想向ServletContextListener中通過Spring @value 的方法讀取 properties 配置檔案資訊,但是我開始的方法不行 public class MyLi
3springboot:springboot配置檔案(配置檔案佔位符、Profile、配置檔案的載入位置)
1.配置檔案佔位符 RaandomValuePropertySourcr:配置檔案可以使用隨機數 ${random.value} ${random.int} ${random.long} &nbs
以activiti配置檔案為例介紹Spring管理的bean工廠
配置工廠Bean 通常由應用程式直接使用new建立新的物件,為了將物件的建立和使用相分離,採用工廠模式,即應用程式將物件的建立及初始化職責交給工廠物件. 一般情況下,應用程式有自己的工廠物件來建立bean.如果將應用程式自己的工廠物件交給Spring管理,那麼Spring管理的就不是
解決Linux中文名檔案下載找不到路徑(java.io.FileNotFoundException: ***(No such file or directory))
問題描述 以前寫過一個檔案上傳下載的專案,在本地測試沒有問題,但最近在部署到Linux伺服器實際應用發現,當檔名為中文時,會報java.io.FileNotFoundException: ***(No
R中讀取檔案,找不到路徑問題 No such file or directory
R中讀取檔案,找不到路徑問題 No such file or directory 近日,讀取檔案時,出現如下問題 > passenger = read.csv('international-
C#使用SQLite 無法載入 DLL“SQLite.Interop.dll 找不到指定的模組
場景 最近弄個新專案,需要用到ORM。基本就是VS2017+C#+Dapper+Sqlite這樣的結構。從Nuget上下載相關的package,並關聯好對應的資料結構。編譯通過,但在執行時報錯。如下圖: 查看了下,packages目錄下對應的System.Data.SQLit
Spring boot 如何通過配置檔案讀取定時器何時啟動配置
場景描述: 當開發完成一個需求後,需要區分線上和線下配置。定時任務也是這樣的,開發了一個需要每天十二點執行的定時器,但這也僅僅是線上要每天十二點執行,這對於測試來說,十分不方便,所以需要通過配置檔案來獲取配置的定時器執行時間。 啟動類中使用@EnableSch
Spring-boot中讀取核心配置檔案application和自定義properties配置檔案的方式
前言:瞭解過spring-Boot這個技術的,應該知道Spring-Boot的核心配置檔案application.properties,當然也可以通過註解自定義配置檔案**.properties的資
Eclipse中Spring的xml配置檔案提示類屬性值的配置
在開發Spring專案時,發現在配置xml檔案時,class類的屬性值一直都不提示,這樣很容易導致引用的包名寫錯。因此我通過床上看資料,總結了下面的配置方法。 一、檢視Eclipse的版本號 方法一:檢視自己的安裝包 方法二:開啟Eclipse軟體,點選Help—>About
通過XMLHttpRequest載入外部圖片檔案或資料
var remoteImage, container = document.querySelector('.imageContainer'), toLoad = { 'images': [ 'http://myserver.com/im
Spring 在 xml配置檔案或annotation註解中運用Spring EL
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-ins
spring配置檔案applicationContext.xml不能提示的解決方法
依次開啟windows→preference→myeclipse→iles and editors→xml→xmlcatalog 點選Add 在Add XML Catalog Element視窗中選擇File System..選擇對應spring版本的x
spring boot 1.5.7 搭建基礎專案框架二 錯誤: 找不到或無法載入主類
一:當在eclipse啟動spring boot專案時出現問題:錯誤: 找不到或無法載入主類 com.example.demo.DemoApplication解決辦法:1,通過cmd命令列,進入專案目錄進行,mvn clean install 進行編譯專案install後,再
C# 程式執行無法載入 C++ DLL“xxx.dll”: 找不到指定的模組
C# 編寫的web專案在釋出後將拷貝到伺服器上面,訪問系統時如下錯誤資訊: 針對所呼叫的dll為C++編寫的類庫,呼叫方式如下: [DllImport("xxxxxxxx.dll", Cha
ios 載入本地HTML檔案,圖片不顯示的問題
第一種方式匯入HTML檔案的時候,要用這種方法: NSString *path = [[NSBundle mainBundle] pathForResource:@"檔名" ofType:@"html"]; NSString *html = [NSStrin
spring+mybatis 配置檔案佔位符不能解析的問題
在spring裡使用org.mybatis.spring.mapper.MapperScannerConfigurer 進行自動掃描的時候,設定了sqlSessionFactory 的話,可能會導致PropertyPlaceholderConfigurer失效,