【01】Eclipse中配置spring的xsd 便于从本地加载而非网络

news2024/9/23 7:30:33

spring xsd

文章目录

  • spring xsd
    • 1.spring的xsd在Eclipse中的配置
      • 1.1xsi:schemaLocation
      • 1.2Eclipse中设置的key名
      • 1.3在本地文件系统中选择xsd文件进行配置
      • 1.4在workspace工作空间中选择xsd文件进行配置
    • 2.重点
      • 2.1Key的配置
      • 2.2spring配置文件中xml的xsi:schemaLocation的配置变更
      • 2.3具体代码
    • 3.尽情享受代码编写时的提示信息吧

1.spring的xsd在Eclipse中的配置

1.1xsi:schemaLocation

		http://www.springframework.org/schema/beans 
		http://www.springframework.org/schema/beans/spring-beans.xsd 
		http://www.springframework.org/schema/mvc 
		http://www.springframework.org/schema/mvc/spring-mvc.xsd 
		http://www.springframework.org/schema/context 
		http://www.springframework.org/schema/context/spring-context.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 

1.2Eclipse中设置的key名

(1)此key名称,指向的是本地spring的xsd文件。
(2)在我的项目中,是将spring4.2.6的所有xsd文件放在了项目的
webapp/WEB-INF/spring_4_2_6_schema
文件中。
(3)这些xsd文件来源于spring4.2.6的源码库,即下次只需要下载一个Spring4.2.6的源码库文件下来,就可以在Eclipse中配置从本地文件系统中或工作空间中加载xsd文件。我的项目采用的是从工作空间中加载xsd文件

1.3在本地文件系统中选择xsd文件进行配置

在这里插入图片描述

1.4在workspace工作空间中选择xsd文件进行配置

在这里插入图片描述

2.重点

2.1Key的配置

上面两种配置方式中,指向xsd文件的key一定要修改一下,不要用默认的路径,要在路径的尾巴上把该xsd文件的文件全名给加上,如下总结了所有的key名称。加上全名儿,是让eclipse知道不要从网络上去加载xsd文件了,只要加载我本地的就可以了。


    http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
    http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
    http://www.springframework.org/schema/cache/spring-cache-4.2.xsd
    http://www.springframework.org/schema/context/spring-context-4.2.xsd
    http://www.springframework.org/schema/jdbc/spring-jdbc-4.2.xsd
    http://www.springframework.org/schema/jee/spring-jee-4.2.xsd
    http://www.springframework.org/schema/jms/spring-jms-4.2.xsd
    http://www.springframework.org/schema/lang/spring-lang-4.2.xsd
    http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
    http://www.springframework.org/schema/oxm/spring-oxm-4.2.xsd
    http://www.springframework.org/schema/task/spring-task-4.2.xsd
    http://www.springframework.org/schema/tool/spring-tool-4.2.xsd
    http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
    http://www.springframework.org/schema/util/spring-util-4.2.xsd
    http://www.springframework.org/schema/websocket/spring-websocket-4.2.xsd

2.2spring配置文件中xml的xsi:schemaLocation的配置变更

意思是要把spring的配置文件,比如springmvc.xml,service.xml,dao.xml中的xsi:schemaLocation统一变更一下,变更为上面配置的key,如下图所示:
在这里插入图片描述

2.3具体代码

<?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:mvc="http://www.springframework.org/schema/mvc"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop" 
	xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
		http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
		http://www.springframework.org/schema/mvc 
		http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd 
		http://www.springframework.org/schema/context 
		http://www.springframework.org/schema/context/spring-context-4.2.xsd
		http://www.springframework.org/schema/aop 
		http://www.springframework.org/schema/aop/spring-aop-4.2.xsd 
		http://www.springframework.org/schema/tx 
		http://www.springframework.org/schema/tx/spring-tx-4.2.xsd">

3.尽情享受代码编写时的提示信息吧

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2068510.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Java重修笔记 第三十九天 集合的体系、Collection方法、迭代器遍历集合、增强for循环遍历集合

集合的体系 1. 单列集合 2. 双列集合 Collection的常用方法 1. boolean add(E e) 添加元素&#xff0c;添加基本数据类型的元素有自动装箱的过程 2. boolean remove(Object o) 删除指定元素&#xff0c;删除成功返回true 3. boolean contains(Object o) 查询指定元素&…

深度学习入门-04

PS&#xff1a;基于小土堆视频学习 1、add_image()的使用 读取样本集中的数据 image_path "data/train/ants_image/0013035.jpg" from PIL import Image img Image.open(image_path)在pycharm的控制台中运行该代码&#xff0c;运行后可以发现&#xff1a; 数据格…

前端面试宝典【设计模式】【4】

在前端开发的世界里,每一次面试都是一次机遇,也是一次挑战。 你是否曾因技术深度不够而错失良机? 或是面对最新的技术趋势感到迷茫? 我们的【前端面试宝典】正是为此而来。 由拥有多年一线实战经验的资深工程师亲自授课,结合最新的行业动态与实战案例,旨在全面提升你的技…

学习大数据DAY44 帆软 report 配置

目录 Linux 系统独立部署 Tomcat 服务器设置 上机练习 Linux 系统独立部署 ## 题目要求 在 LINUX 系统&#xff0c; Tomcat 服务器容器下&#xff0c;完成 FineReport 报表工程的独立部 署&#xff0c;并设置服务器开机自启动&#xff0c;并请实操演示 得分点&#xf…

全感知、全覆盖、全智能的名厨亮灶开源了

简介 AI视频监控平台, 是一款功能强大且简单易用的实时算法视频监控系统。愿景在最底层打通各大芯片厂商相互间的壁垒&#xff0c;省去繁琐重复的适配流程&#xff0c;实现芯片、算法、应用的全流程组合&#xff0c;减少企业级应用约 95%的开发成本&#xff0c;在强大视频算法加…

牛客练习小题

目录 牛客. 矩阵最长递增路径 牛客.奇数位丢弃 牛客.天使果冻 牛客.dd爱旋转 牛客. 矩阵最长递增路径 import java.util.*;public class Solution {/*** 代码中的类名、方法名、参数名已经指定&#xff0c;请勿修改&#xff0c;直接返回方法规定的值即可** 递增路径的最大长…

【C++ Primer Plus习题】3.5

问题: 解答: #include <iostream> using namespace std;int main() {long long populationWorld 0;long long populationChina 0;cout << "请输入全球的人口数:";cin >> populationWorld;cout << "请输入中国的人口数:";cin &g…

【STM32】RTT-Studio中HAL库开发教程五:UART的DMA应用

文章目录 一、简介1.关于DMA2.DMA使用场景3.DMA控制结构4.IDLE空闲中断5.实现方法 二、RTT配置三、串口收发流程四、完整代码五、测试验证 一、简介 1.关于DMA DMA(Direct Memory Access&#xff0c;直接存储器访问) 是所有现代电脑的重要特色&#xff0c;它允许不同速度的硬件…

谷粒商城实战笔记-249-商城业务-消息队列-RabbitMQ工作流程

文章目录 一&#xff0c;基本概念二&#xff0c;消息从producer到consumer的过程 一&#xff0c;基本概念 RabbitMQ是一个流行的开源消息代理软件&#xff0c;它实现了高级消息队列协议&#xff08;AMQP&#xff09;。以下是RabbitMQ的一些基本概念&#xff1a; Broker&#x…

真题解析 | CCF CSP-J 2020 入门级 C++语言真题及答案

一、单项选择题(共15题&#xff0c;每题2分&#xff0c;共计30分;每题有且仅有一个正确选项) 解析&#xff1a;常识题。在计算机内存中&#xff0c;每个存储单元都有一个唯一的标识号&#xff0c;这个标识号被称为地址。地址用来唯一标识内存中的每个存储单元&#xff0c;类似于…

【Stream】流媒体从入门到入土 (1)

最近工作需要学了很多流媒体相关的知识&#xff0c;谁能想象一个月前还是只听说过 HLS 的快乐小屁孩&#xff0c;现在已经背负了巨大的知识的重担了&#xff0c;头发也秃了几根&#xff0c;发际线严重后移 H.264 (AVC) vs H.265 (HEVC) H.264 和 H.265 是两种视频编码&#x…

【学习笔记】Day 22

一、进度概述 1、机器学习常识23-24&#xff0c;以及相关代码复现 2、python 补完计划&#xff08;详见 python 专题&#xff09; 二、详情 23、U-Net 从宏观结构上来讲&#xff08;以下摘自常识23&#xff09;&#xff1a; U-Net 就是 U 形状的网络, 前半部分 (左边…

[Android studio]无法联网

问题情景&#xff1a; 我的Android studio 更新软件到 Android Studio Koala | 2024.1.1 Patch 1 这个版本后&#xff0c;当前的项目无法正常编译。 因为之前有次更新版本后&#xff0c;我也遇到这个无法编译的问题&#xff0c;后面给解决掉了。想着这次应该也没有事情。 可这…

【通信协议】SPI总线

目录 SPI简介 硬件电路 SPI模式 软件模拟初始化 时序基本单元 起始条件 终止条件 发送与接收 SPI基本单元代码 MySPI.h MySPI.c SPI简介 SPI&#xff08;Serial Peripheral Interface&#xff09;&#xff0c;即串行外围设备接口&#xff0c;是由Motorola公司开…

在 FPGA 上实现以太网的“低级”指南

如今&#xff0c;我们日常的网络连接大多是通过无线方式进行的&#xff0c;因此很容易忘记以太网。但它仍然是一种有用的标准&#xff0c;是一个可靠的高吞吐量网络链接的好方法。为此&#xff0c;[Robert Feranec] 和 [Stacy Rieck] 编写了一个关于如何在 FPGA 上使用以太网的…

uniapp实现苹果账号登录

appleLogin(){uni.showToast({title: 正在进行苹果账户登录...,icon: none})uni.login({provider: apple,success: (loginRes) > {uni.getUserInfo({provider: apple,success: async(userInfoRes) > {console.log(用户信息, userInfoRes)// userInfoRes.userInfo.identit…

Python和MATLAB和R对比敏感度函数导图

&#x1f3af;要点 深度学习网络两种选择的强制选择对比度检测贝叶斯自适应估计对比敏感度函数空间观察对比目标量化视觉皮质感知差异亮度、红/绿值、蓝/黄值色彩空间改变OpenCV图像对比度对比敏感度函数模型空间对比敏感度估计眼球运动医学研究空间时间颜色偏心率对比敏感度函…

技术债务已接管经济

“技术债务”一词通常指软件开发过程中的捷径或次优方法。它表现为设计不良的代码、缺乏文档和过时的组件。虽然正确编写的代码和文档是永恒的&#xff0c;但组件和方法却不是。随着时间的推移&#xff0c;软件及其组件可能会成为技术债务。自 40 年前的 20 世纪 80 年代软件行…

Qt使用usbcan通信

一.usbcan环境搭建 可以参照我的这篇博客&#xff1a;USBCAN-II/II使用方法以及qt操作介绍 二.项目效果展示 三.项目代码 这部分代码仅仅展示了部分功能&#xff0c;仅供参考。 #include"ControlCAN.h" #include<QDebug> #include <windows.h> #incl…