This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4e 00 00 // 数据长度,3字节,0x4e = 79字节 | |
00 // 序号,1字节 | |
# 具体内容 | |
0a // 协议,1字节,0x0A = 10,表示第10版协议 | |
35 2e 37 2e 31 38 2d 6c 6f 67 00 // MySQL版本信息,5.7.18-log,以\0结尾 | |
12 7a 29 00 // 连接ID,四字节 | |
33 58 38 18 44 5e 16 48 // 加密串的前半部分,定长8字节,为了兼容旧版本协议 | |
00 // 固定填充0 | |
ff ff // MySQL服务器的属性,2字节,低16位 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
eurekaServer1: | |
image: "asd1245dss/cloud-eureka-server:latest" | |
networks: | |
spring-cloud-overlay: | |
aliases: | |
- eurekaServer | |
ports: | |
- "8761:8761" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>org.springframework</groupId> | |
<artifactId>spring-context</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>commons-logging</groupId> | |
<artifactId>commons-logging</artifactId> | |
<version>1.2</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<dependency> | |
<groupId>org.springframework</groupId> | |
<artifactId>spring-context</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>commons-logging</groupId> | |
<artifactId>commons-logging</artifactId> | |
<version>1.2</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by .ignore support plugin (hsz.mobi) | |
### Java template | |
# Intellij Idea configuration folder | |
.idea/ | |
# Mobile Tools for Java (J2ME) | |
.mtj.tmp/ | |
# Package Files # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
由于IntelliJ Idea自带的open jdk有BUG导致中文输入法不跟随,所以通过替换为Oracle的jdk问题得到解决 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
经过摸索,我解决了上面的警告。 | |
对于第二个警告,我把pom.xml中的JDBC 修改为provided,然后再tomcat的./lib/下增加对应的jar。 | |
对于第一个警告,我的解决方案是:实现ServletContextListener,然后再contextDestroyed()方法中添加如下代码: | |
Enumeration drivers = DriverManager.getDrivers(); | |
while (drivers.hasMoreElements()) { | |
Driver driver = drivers.nextElement(); | |
try { | |
DriverManager.deregisterDriver(driver); | |
logger.info(String.format("deregistering jdbc driver: %s", driver)); | |
} catch (SQLException e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
文件上传 | |
当数据以multipart/form-data的格式发送时,servlet 容器支持文件上传。 | |
如果满足以下任何一个条件,servlet 容器提供 multipart/form-data格式数据的处理。 | |
servlet处理的请求使用了第8.1.5节定义的注解@MultipartConfig。 | |
为了servlet处理请求,部署描述符包含了一个 multipart-config元素。 | |
请求中的 multipart/form-data 类型的数据如何可用,取决于servlet 容器是否提供 multipart/form-data 格式数据的处理: | |
如果 servlet 容器提供 multipart/form-data 格式数据的处理,可通过 HttpServletRequest 中的以下方法得到: | |
public Collection getParts() | |
public Part getPart(String name) 每个 part 都可通过 Part.getInputStream 方法访问头部,相关的内容类型和内容。 对于表单数据的 Content-Disposition,即使没有文件名,也可使用 part 的名称通过 HttpServletRequest 的 getParameter 和getParameterValues 方法得到 part 的字符串值。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modified /usr/share/tomcat7-admin/manager/WEB-INF/web.xml to handle larger uploads. | |
<multipart-config> | |
<max-file-size>72428800</max-file-size> | |
<max-request-size>72428800</max-request-size> | |
<file-size-threshold>0</file-size-threshold> | |
</multipart-config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
构造块2 | |
构造块1 | |
构造函数 | |
构造块2 | |
构造块1 | |
构造函数 | |
构造块2 | |
构造块1 | |
构造函数 | |
Child |