schema

XML schema attribute dependancies

假如想象 提交于 2019-12-25 02:42:31
问题 I'd like to ask if it's possible in XML xsd schema declare dependant attributes... Example: <xsd:simpleType name="packCategories"> <xsd:restriction base="xsd:byte"> <xsd:minInclusive value="0"/> <xsd:maxInclusive value="4"/> </xsd:restriction> </xsd:simpleType> <xs:element name="pack"> <xs:complexType> <!-- elements go here --> <xs:attribute type="packCategories" name="category" use="required"/> <xs:attribute type="xs:string" name="explanation" use="optional"/> </xs:complexType> </xs:element>

XML schema attribute dependancies

岁酱吖の 提交于 2019-12-25 02:42:00
问题 I'd like to ask if it's possible in XML xsd schema declare dependant attributes... Example: <xsd:simpleType name="packCategories"> <xsd:restriction base="xsd:byte"> <xsd:minInclusive value="0"/> <xsd:maxInclusive value="4"/> </xsd:restriction> </xsd:simpleType> <xs:element name="pack"> <xs:complexType> <!-- elements go here --> <xs:attribute type="packCategories" name="category" use="required"/> <xs:attribute type="xs:string" name="explanation" use="optional"/> </xs:complexType> </xs:element>

Entity Framework not getting column info on a different schema

大兔子大兔子 提交于 2019-12-25 01:26:32
问题 I am having trouble getting column information on a different schema. It was working fine until we changed the connection string. default schema is [dbo] the newly adding stored procedure is in "different_schema" Does anyone know and had the same experience on this issue? Thank you in advance. 回答1: At the start of the stored proc temporarily add SET FMTONLY OFF to get the column information returned. This is explained well here 来源: https://stackoverflow.com/questions/46940660/entity-framework

SpringMVC入门案例:HelloWorld

浪子不回头ぞ 提交于 2019-12-25 00:40:14
本文摘自:http://www.cnblogs.com/bigdataZJ/p/springmvc1.html 软件参数   Eclipse:Mars.1 Release (4.5.1)   Tomcat: 8.0.36   JDK:1.8.0_60   Spring-framework: 4.0.4.RELEASE 新建项目   File-New-Other,选择Dynamic web project 项目建好之后,目录结构如下: 导入jar包   我们基于Spring mvc框架进行开发,需要依赖一下的spring jar包: spring-aop-4.0.4.RELEASE.jar spring-beans-4.0.4.RELEASE.jar spring-context-4.0.4.RELEASE.jar spring-core-4.0.4.RELEASE.jar spring-expression-4.0.4.RELEASE.jar spring-web-4.0.4.RELEASE.jar spring-webmvc-4.0.4.RELEASE.jar commons-logging-1.1.1.jar(用来打印log)   在WEB-INF目录下新建lib文件夹,并将上面的jar包放入其中。 配置文件及编写代码   web.xml(WEB-INF下) 1 <?xml

springmvc

好久不见. 提交于 2019-12-24 19:11:08
一、什么是SpringMVC?   Spring MVC框架是一个开源的Java平台,为开发强大的基于Java的Web应用程序提供全面的基础架构支持非常容易和非常快速。   Spring web MVC框架提供了MVC(模型 - 视图 - 控制器)架构和用于开发灵活和松散耦合的Web应用程序的组件。 MVC模式导致应用程序的不同方面(输入逻辑,业务逻辑和UI逻辑)分离,同时提供这些元素之间的松散耦合。 模型(Model)封装了应用程序数据,通常它们将由POJO类组成。 视图(View)负责渲染模型数据,一般来说它生成客户端浏览器可以解释HTML输出。 控制器(Controller)负责处理用户请求并构建适当的模型,并将其传递给视图进行渲染。 二、SpringMVC的原理 三、SpringMVC的简单使用:     1.导入Spring框架的jar包     2.在 web.xml 中配置前端控制器 DispatcherServlet      1 <?xml version="1.0" encoding="UTF-8"?> 2 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xmlns="http://xmlns.jcp.org/xml/ns/javaee" 4 xsi:schemaLocation=

Spring常用注解

戏子无情 提交于 2019-12-24 19:02:16
Spring引入注解之前,使用.xml对bean进行注入或者配置aop、事务,缺点是.xml文件过于庞大,开发过程中 .java和.xml经常切换,开发效率低。 传统Spring的示例 ,参照这里很好的例子: https://www.cnblogs.com/xiaoxi/p/5935009.html 1. @Autowired 自动装配,作用是消除代码Java代码里面的getter/setter与bean属性中的property。 不使用注解 : 1 package com.spring.model; 2 3 public class Zoo { 4 private Tiger tiger; 5 private Monkey monkey; 6 7 public Tiger getTiger() { 8 return tiger; 9 } 10 public void setTiger(Tiger tiger) { 11 this.tiger = tiger; 12 } 13 public Monkey getMonkey() { 14 return monkey; 15 } 16 public void setMonkey(Monkey monkey) { 17 this.monkey = monkey; 18 } 19 20 public String toString(){

IDEA用maven创建springMVC项目和配置(XML配置和Java配置)

一笑奈何 提交于 2019-12-24 18:03:57
1、DEA创建项目 新建一个maven project,并且选择webapp原型。 然后点击next 这里的GroupId和ArtifactID随意填写,但是ArtifactID最好和你的项目一名一样然后next 为了快一点创建,我们添加一个属性值,如图中亮的所示,点右边的加号,name=archetypeCatalog value=internal。 这里我们选择使用IDEA自带的maven,下面的两个分别是你的maven配置文件和你的仓库地址,我记得idea的maven一开始是没有setting.xml的,所以你要去maven的目录里面拷一份setting.xml到你的仓库中。idea的maven在安装路径的plugins文件夹下,即X:\xxx\JetBrains\IntelliJ IDEA 2016.3.2\plugins\plugins\maven\lib\maven3\conf\setting.xml拷贝到你的用户文件夹下的.m2文件夹下,为了之后能够快速的下载依赖包,我们要加一个官方库的镜像,因为maven的官方仓库在国外,太慢了。 我们在你的.m2文件夹下的setting.xml中添加如下代码: <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url

Vue node.js 前后端数据传递

回眸只為那壹抹淺笑 提交于 2019-12-24 17:57:11
1 、利用 Mongoose 查询 MongoDB 通过 mongoose 插件可以简捷地从 mongodb 中获取数据,首先安装 mongoose : cnpm install mongoose --save 使用 mongoose 需要一个 模式 Schema ,它用于定义你从 mongodb 中查询的每个文档条目的内容,然后通过 mongoose.model() 生成一个 模板 model ,模板像一个架子,将数据库取到的每个条目中的内容按架子的结构填充,这样就形成了一个便于操作、结构条理的数据对象。通过这个对象就可以访问模板的相关属性,甚至为其定义函数方法。 例如 mongodb 中的条目如图: 针对其定义 Schema ,生成并导出商品模板 goods : var mongoose = require('mongoose'); var Schema = mongoose.Schema; //设计集合结构(表 结构) var productSchema = new Schema({ "productId": {type: String}, "productName": String, "salePrice": Number, "productImage": String, }); // 得到了一个带有 productId、productName、salePrice

mybatis逆向工程

好久不见. 提交于 2019-12-24 16:15:21
本文介绍一下用Maven工具如何生成Mybatis的代码及映射的文件。 一、配置Maven pom.xml 文件 在pom.xml增加以下插件: <build> <finalName>table</finalName> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> </plugin> </plugins> </build> 配置好Maven插件,下面需要配置插件需要配置文件 二、在maven项目下的src/main/resources 目录下建立名为 Maven的项目配置文件存放路径如下图:generatorConfig.xml配置文件, Maven的项目配置文件存放路径如下图: generatorConfig.xml代码如下: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE generatorConfiguration PUBLIC

MySQL Database Design for a list of services

▼魔方 西西 提交于 2019-12-24 15:42:54
问题 Below is a preview of the type of list I am talking about. What is going to happen is each user is going to have their own list that they can create. They will be able to modify the headings (Maintenance, Tire Services) and modify each item and add to it and add more rows. Here is a database design I had in mind: titles: id - name - user_id 1 - Maintenance - 1 2 - Tire Services - 1 services: id - title_id - name - user_id 1 - 1 - Wiper Blades - 1 2 - 1 - Cooling System - 1 3 - 2 - Tire