会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132370个问题

用IDEA写xml和schema,将schema导入xml的时候 输入xsi报错

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="books"> <!--根元素是books-->
        <xs:complexType>   <!--books中包含了其他的子元素,所以books是复杂的数据类型-->
            <xs:sequence>  <!--按顺序编写-->
                <xs:element name="book" maxOccurs="unbounded">  <!--book可以出现多个,所以maxOccurs="unbounded",不绑定-->
                    <xs:complexType>  <!--book中有也包含其他子元素,所以book是复杂的-->
                        <xs:sequence> <!--按顺序写-->
                            <xs:element name="name" type="xs:string"></xs:element>
                            <xs:element name="author" type="xs:string"></xs:element>
                            <xs:element name="price" type="xs:double"></xs:element>
                        </xs:sequence>
                        <xs:attribute name="id" type="xs:positiveInteger" use="required"></xs:attribute>  <!--book的属性,必须写,所以use="required"-->
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<books xmlns:xs="http://www.w3.org/2001/XMLSchema"
xsi:noNamespaceSchemaLocation="books.xsd">
    <book id="1001">
        <name>java实战开发</name>
        <author>张小三</author>
        <price>98.5</price>
    </book>

</books>

image.png


JAVA 全系列/第二阶段:JAVA 基础深化和提高/XML 技术(旧) 2899楼
JAVA 全系列/第九阶段:Spring Boot实战/Spring Boot 2901楼

老师现在通过SpringBoot脚手架工具构建项目用的是2.4版本的SpringBoot,按照视频里的版本构建项目maven一直在构建,都好几个小时了,一直在下载不同的jar包,请老师告诉我这个pom文件应该放哪些依赖

image.png

image.png

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.0.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.bjsxt</groupId>
    <artifactId>springbootactuatorservice</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>springbootactuatorservice</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-starter-server -->
        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-server</artifactId>
            <version>2.1.6</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>


JAVA 全系列/第九阶段:Spring Boot实战/Spring Boot 2903楼
JAVA 全系列/第三阶段:数据库编程/JDBC技术(旧) 2904楼
WEB前端全系列/第二十阶段:Vue2企业级项目(旧)/疫情动态实时播报 2905楼
JAVA 全系列/第十阶段:百战旅游网项目/百战旅游网 2906楼
JAVA 全系列/第十八阶段:亿级高并发电商项目_架构/编码(旧)/电商:基于SpringSecurity实现后台登录功能 2907楼

一、截图

二、问题11.jpg

以下压缩包为webapps目录下的练习项目工程

servlet_demo01.rar

并没有找到问题出在哪个部分,感谢老师帮忙查找






JAVA 全系列/第五阶段:JavaWeb开发/Servlet技术详解(旧) 2909楼

scrapy03.zip

老师,我写的只能爬取到第一页的数据,第二页的数据就显示读取不到了

c5c9f554431fa6dbfb1a79d583d98e5.png

Python 全系列/第十五阶段:Python 爬虫开发/scrapy框架使用(旧) 2910楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637