Eclipse中引入spring的約束
Eclipse中引入spring的約束
約束檔案
spring原始碼、約束檔案和文件說明下載地址:http://repo.spring.io/release/org/springframework/spring/
點選spring-framework-5.0.4.RELEASE-schema.zip ,下載schema約束檔案
解壓spring-framework-5.0.4.RELEASE-schema.zip 檔案
KEY值
#key的型別為
Schema location
#beans的key值
http://www.springframework.org/schema/beans/spring-beans.xsd
#util的key值
http://www.springframework.org/schema/util/spring-util.xsd
#jee的key值
http://www.springframework.org/schema/jee/spring-jee.xsd
#lang的key值
http://www.springframework.org/schema/lang/spring-lang.xsd
#jms的key值
http://www.springframework.org/schema/jms/spring-jms.xsd
#aop的key值
http://www.springframework.org/schema/aop/spring-aop.xsd
#tx的key值
http://www.springframework.org/schema/tx/spring-tx.xsd
#context的key值
http://www.springframework.org/schema/context/spring-context.xsd
#jdbc的key值
http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
#cache的key值
http://www.springframework.org/schema/cache/spring-cache.xsd
#mvc的key值
http://www.springframework.org/schema/mvc/spring-mvc.xsd
#oxm的key值
http://www.springframework.org/schema/oxm/spring-oxm.xsd
#task的key值
http://www.springframework.org/schema/task/spring-task.xsd
#tool的key值
http://www.springframework.org/schema/tool/spring-tool.xsd
#websocket的key值
http://www.springframework.org/schema/websocket/spring-websocket.xsd
在eclipse中配置
點選window->preferences,彈出Preferences視窗-
搜尋xml->點選XML Catalog->點選add按鈕->選擇約束檔案->選擇key的型別和輸入key值->點選ok->點選appliy and close
問題
如果沒有提示,首先檢查檔案是否所有約束是否配置全,如果沒有請配置全。如果有,重啟eclipse即可
測試MVC,配置其他和配置MVC一樣步驟
Application.xml最全格式
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:oxm="http://www.springframework.org/schema/oxm"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:tool="http://www.springframework.org/schema/tool"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool.xsd
http://www.springframework.org/schema/websocket http://www.springframework.org/schema/websocket/spring-websocket.xsd">
</beans>
相關文章
- Eclipse中引入MyBatis約束EclipseMyBatis
- 【SQL】15 SQL 約束(Constraints)、NOT NULL 約束、UNIQUE 約束、PRIMARY KEY 約束、FOREIGN KEY 約束、CHECK 約束、DEFAULT約束SQLAINull
- 10、Oracle中的約 束constraintOracleAI
- MySQL 中的約束及相關操作MySql
- 約束
- Javaweb-約束-外來鍵約束JavaWeb
- 約束CONSTRAINTAI
- 03約束
- MySQL 約束MySql
- SQL約束SQL
- Maven中dependency和plugins的繼承與約束MavenPlugin繼承
- 泛型的約束理解泛型
- Eclipse Spring MVC工程的建立EclipseSpringMVC
- 主鍵約束、唯一約束和唯一索引索引
- (10)邏輯綜合新增約束(環境約束)
- Spring Boot中引入定時任務Spring Boot
- 禁用 Spring Boot 中引入安全元件 spring-boot-starter-security 的方法Spring Boot元件
- 約束介紹
- 差分約束
- 綜合約束
- 約束前端專案中的目錄和檔名前端
- 約束優化的拉格朗日乘子(KKT)優化
- Javaweb-約束的分類JavaWeb
- 表的完整性約束
- 批量刪除MSSQL 中主外來鍵約束SQL
- 支援向量機(SVM)的約束和無約束優化、理論和實現優化
- 用Keras中的權值約束緩解過擬合Keras
- 深度學習中的Lipschitz約束:泛化與生成模型深度學習模型
- 完整性約束
- 外來鍵約束
- SQLServer約束介紹SQLServer
- IDELAY約束測試IDE
- MySQL自增約束MySql
- Javaweb-約束案例JavaWeb
- 《學習》6約束
- MySQL 欄位約束MySql
- 在spring boot專案(maven)中引入其他 spring boot專案Spring BootMaven
- 約束最佳化的拉格朗日乘子(KKT)