会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 133533个问题
JAVA 全系列/第二阶段:JAVA 基础深化和提高/网络编程(旧) 35956楼
软件测试 全系列/第四阶段:功能测试与项目实战/提交缺陷报告 35957楼
JAVA 全系列/(旧的隐藏)第八阶段:电商高级项目_架构/编码/电商ego-基于SOA架构_Dubbo使用_逆向工程_分页插件完成商品查询 35958楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/手写服务器项目(旧) 35959楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/手写服务器项目(旧) 35960楼

package 复习服务器;


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.net.ServerSocket;
import java.net.Socket;

public class Server3 {
 public static void main(String[] args) {
  String CRLF="\r\n"; //换行
  String BWZ=" ";     //空格
  //创建ServerSocket对象
  ServerSocket server=null;
  //监听是否有客户端发送请求
  Socket clinet=null;
  
  InputStream is=null;
  
    
  try {
    server=new ServerSocket(8080);
   clinet = server.accept();
   //获取来自浏览器的请求信息
   is=clinet.getInputStream();
   byte[] buf=new byte[20480];
   int len=is.read(buf);
   System.out.println(new String(buf,0,len));
   
   /*获取来自浏览器的请求信息*/
   StringBuffer sb=new StringBuffer();
   StringBuffer sbContent=new StringBuffer();//响应的文本
   sbContent.append("<html><head><title>响应结果</title></head>");
   sbContent.append("<body>登录成功</body></html>");
   
   //(1)拼接响应头
   sb.append("HTTP/1.1").append(BWZ).append(200).append(BWZ).append("ok");
   sb.append(CRLF);//换行
   sb.append("Content-Type: text/html;charset=utf-8");
   sb.append(CRLF);//换行
   sb.append("Content-Length:").append(sbContent.toString().getBytes().length).append(CRLF);
   sb.append(CRLF);//换行,代表响应头与响应的正文部门之间的空格
   sb.append(sbContent);
   
   //通过流输出
   BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(clinet.getOutputStream(),"utf-8"));
   bw.write(sb.toString());
   bw.flush();
   bw.close();
   
   
  }
   catch (IOException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
  finally {

  //关闭流
   IOaa.a(is,clinet,server);
 }
}
}


<html>
   <head>
   <title>我的第一个heml</title>
  </head>
 <body>
   <h1>heelo word</h1>
   <form  action=“http://localhost:8000/index.html" method="post">  
    <p>用户名:<input type="text" id="uname" name="userroname"/></p>
    <p>密码:<input type="password" id="pwd" name="password"/></p>
    <p>兴趣爱好<input type="checkbox" name="hobby" value="ball"/>球
<input type="checkbox" name="hobby" value="read"/>读书
<input type="checkbox" name="hobby" value="paint"/>画画</p>
    <p><input type="submit" value="登录/>"</p>
   </form>
 </body>
</html>


服务器没有显示

网页显示找不到

JAVA 全系列/第二阶段:JAVA 基础深化和提高/手写服务器项目(旧) 35962楼
JAVA 全系列/(旧的隐藏)第十五阶段:百战商城项目(Spring Cloud最新架构)/百战商城项目 35963楼
Python 全系列/第二阶段:Python 深入与提高/GUI编程(隐藏) 35964楼

老师,我在执行这里的时候报了这个错误,原因是我觉得是编译文件里面没有mapper文件所造成的,但我把对应依赖也给加上了怎么会编译不进去呢?我使用的IDE是idea,请老师帮忙看看

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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>cn.kent</groupId>
        <artifactId>ego-rpc</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <artifactId>ego-rpc-service-impl</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>ego-rpc-service-impl</name>

    <repositories>
        <repository>
            <id>maven-ali</id>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>cn.kent</groupId>
            <artifactId>ego-rpc-mapper</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>cn.kent</groupId>
            <artifactId>ego-rpc-service</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
        </dependency>
        <!-- 连接池 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
        </dependency>
        <!-- mybatis和spring的整合包 -->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
        </dependency>
        <!-- 支持mybatis的日志记录 -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>
        <dependency>
            <groupId>aopalliance</groupId>
            <artifactId>aopalliance</artifactId>
        </dependency>
        <!-- 单元测试 -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- dubbo依赖 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dubbo</artifactId>
        </dependency>
        <!-- zookeeper客户端依赖 -->
        <dependency>
            <groupId>com.101tec</groupId>
            <artifactId>zkclient</artifactId>
        </dependency>
        <!-- mybatis分页插件 -->
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper</artifactId>
        </dependency>
        <!-- Redis客户端 -->
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
        </dependency>
        <!-- Apache的通用工具 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <!-- solr客户端 -->
        <dependency>
            <groupId>org.apache.solr</groupId>
            <artifactId>solr-solrj</artifactId>
        </dependency>
    </dependencies>

    <build>
        <!-- <plugins>
            指定项目的打包插件信息
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    指定打包描述文件的位置:相对项目根目录的路径
                    assembly打包的描述文件
                    <descriptor>assembly/assembly.xml</descriptor>
                </configuration>
                <executions>
                    mvn package的时候打包
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            </plugins> -->
        <!-- dubbo加载spring的配置文件的时候,是从META-INF/spring开始查找 -->
        <resources>
            <resource>
                <!-- 指定从哪个文件夹拷贝 -->
                <directory>src/main/resources/spring</directory>
                <!-- 指定将spring配置文件拷贝到jar包中的META-INF/spring目录 -->
                <targetPath>META-INF/spring</targetPath>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <!-- 其他的文件拷贝到默认的位置 -->
            <resource>
                <!-- 指定从哪个文件夹拷贝 -->
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.xml</include>
                    <include>**/*.properties</include>
                </includes>
            </resource>
        </resources>


    </build>

</project>


JAVA 全系列/(旧的隐藏)第八阶段:电商高级项目_架构/编码/电商ego-基于SOA架构_Dubbo使用_逆向工程_分页插件完成商品查询 35966楼

老师,我这几天认真的看了一下视频相关的知识,我发现这视频的知识跟www.sxt.com里面的Java还是有很大出入的,首先docker这里,我觉得少了,现在docker是微服务比较重要的一个容器,第二个数据结构与算法,jvm详解这里都没有,还有这套视频的排版问题,就比如第七阶段里面的老师老是说我们前面已经讲了设计模式,如果初学者的话会蒙的!

第二个powerdesigner这里也没,对于一个中级工程师这个必须要会用才行,easyUI,jFinal,ssh,jvm虚拟机优化,git,netty都没有,这些没有都不重要,

最重要的是算法,docker这两个不能少啊,面试都会问算法,希望老师能采纳一下我的建议,谢谢!

JAVA 全系列/(旧的隐藏)第七阶段:JAVA 高级技术/ActiveMQ 35967楼
Python 全系列/第一阶段:Python入门/编程基本概念 35970楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

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