Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fuzzBackEnd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钱炳权
fuzzBackEnd
Commits
00d5206b
Commit
00d5206b
authored
May 11, 2024
by
钱炳权
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加mysql服务 存储测试日志和结果
parent
51b2fbe6
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
136 additions
and
39 deletions
+136
-39
pom.xml
fuzzIntegration/pom.xml
+11
-0
KittyServerMessageController.java
...fuzzControll/controller/KittyServerMessageController.java
+5
-4
KittyDataController.java
...ntroll/controller/dataController/KittyDataController.java
+4
-0
KittyMapper.java
...ain/java/com/example/fuzzControll/mapper/KittyMapper.java
+21
-0
KittyLog.java
.../main/java/com/example/fuzzControll/pojo/vo/KittyLog.java
+5
-0
KittyResult.java
...in/java/com/example/fuzzControll/pojo/vo/KittyResult.java
+10
-0
application-dev.yml
fuzzIntegration/src/main/resources/application-dev.yml
+15
-0
banner.txt
fuzzIntegration/src/main/resources/banner.txt
+9
-17
KittyMapper.xml
fuzzIntegration/src/main/resources/mapper/KittyMapper.xml
+22
-0
mybatis-config.xml
...Integration/src/main/resources/mybatis/mybatis-config.xml
+20
-0
pom.xml
fuzzbackendmaster/pom.xml
+2
-2
FuzzBackendMaster.java
...java/com/example/fuzzbackendmaster/FuzzBackendMaster.java
+5
-1
application.yml
fuzzbackendmaster/src/main/resources/application.yml
+1
-1
banner.txt
fuzzbackendmaster/src/main/resources/banner.txt
+6
-14
No files found.
fuzzIntegration/pom.xml
View file @
00d5206b
...
...
@@ -102,6 +102,17 @@
<artifactId>
Java-WebSocket
</artifactId>
<version>
1.3.8
</version>
</dependency>
<!--mybatis-->
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
2.2.2
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
...
...
fuzzIntegration/src/main/java/com/example/fuzzControll/controller/KittyServerMessageController.java
View file @
00d5206b
package
com
.
example
.
fuzzControll
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.example.fuzzControll.exception.ServerException
;
import
com.example.fuzzControll.pojo.vo.AjaxResult
;
import
com.example.fuzzControll.service.GetServerMessageService
;
...
...
@@ -26,7 +27,7 @@ public class KittyServerMessageController {
@RequestMapping
(
value
=
"/stats"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
getStats
(
)
{
try
{
return
AjaxResult
.
success
(
getServerMessageService
.
getStats
(
));
return
AjaxResult
.
success
(
JSON
.
parse
(
getServerMessageService
.
getStats
()
));
}
catch
(
ServerException
e
)
{
log
.
error
(
e
.
getDefaultMessage
());
return
AjaxResult
.
error
(
"stats信息获取失败!"
);
...
...
@@ -38,7 +39,7 @@ public class KittyServerMessageController {
@RequestMapping
(
value
=
"/templateInfo"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
getTemplateInfo
(
)
{
try
{
return
AjaxResult
.
success
(
getServerMessageService
.
getTemplateInfo
(
));
return
AjaxResult
.
success
(
JSON
.
parse
(
getServerMessageService
.
getTemplateInfo
()
));
}
catch
(
ServerException
e
)
{
log
.
error
(
e
.
getDefaultMessage
());
return
AjaxResult
.
error
(
"templateInfo信息获取失败!"
);
...
...
@@ -50,7 +51,7 @@ public class KittyServerMessageController {
@RequestMapping
(
value
=
"/stages"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
getStages
(
)
{
try
{
return
AjaxResult
.
success
(
getServerMessageService
.
getStages
(
));
return
AjaxResult
.
success
(
JSON
.
parse
(
getServerMessageService
.
getStages
()
));
}
catch
(
ServerException
e
)
{
log
.
error
(
e
.
getDefaultMessage
());
return
AjaxResult
.
error
(
"stages信息获取失败!"
);
...
...
@@ -62,7 +63,7 @@ public class KittyServerMessageController {
@RequestMapping
(
value
=
"/report"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
getReport
(
)
{
try
{
return
AjaxResult
.
success
(
getServerMessageService
.
getReport
(
));
return
AjaxResult
.
success
(
JSON
.
parse
(
getServerMessageService
.
getReport
()
));
}
catch
(
ServerException
e
)
{
log
.
error
(
e
.
getDefaultMessage
());
return
AjaxResult
.
error
(
"report信息获取失败!"
);
...
...
fuzzIntegration/src/main/java/com/example/fuzzControll/controller/dataController/KittyDataController.java
0 → 100644
View file @
00d5206b
package
com
.
example
.
fuzzControll
.
controller
.
dataController
;
public
class
KittyDataController
{
}
fuzzIntegration/src/main/java/com/example/fuzzControll/mapper/KittyMapper.java
0 → 100644
View file @
00d5206b
package
com
.
example
.
fuzzControll
.
mapper
;
import
com.example.fuzzControll.pojo.vo.KittyLog
;
import
com.example.fuzzControll.pojo.vo.KittyResult
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
@Mapper
public
interface
KittyMapper
{
/**
* 查询kitty模糊测试结果
*/
List
<
KittyResult
>
selectAll
();
/**
* 查询kitty日志
*/
// List<KittyLog> selectByNodeType(int nodeType);
}
fuzzIntegration/src/main/java/com/example/fuzzControll/pojo/vo/KittyLog.java
0 → 100644
View file @
00d5206b
package
com
.
example
.
fuzzControll
.
pojo
.
vo
;
public
class
KittyLog
{
int
id
;
}
fuzzIntegration/src/main/java/com/example/fuzzControll/pojo/vo/KittyResult.java
0 → 100644
View file @
00d5206b
package
com
.
example
.
fuzzControll
.
pojo
.
vo
;
import
lombok.Data
;
@Data
public
class
KittyResult
{
private
int
id
;
private
String
resultOut
;
private
String
resultError
;
}
fuzzIntegration/src/main/resources/application-dev.yml
View file @
00d5206b
mybatis
:
# 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations
:
classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
configLocation
:
classpath:mybatis/mybatis-config.xml
logging
:
pattern
:
file
:
"
%d{yyyy-MM-dd
HH:mm:ss.SSS}
[%thread]
%-5level
%logger{50}
-
%msg%n"
...
...
@@ -33,6 +39,11 @@ spring:
nacos
:
discovery
:
server-addr
:
http://${nacos-docker.ip}:8848
datasource
:
url
:
jdbc:mysql://${mysql-docker.ip}:3306/fuzz?allowPublicKeyRetrieval=true&useSSL=falseuseUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
password
:
123456
driver-class-name
:
com.mysql.cj.jdbc.Driver
path
:
webSocketUri
:
ws://${fuzzmaster-docker.ip}:8101/websocket/testResult/
...
...
@@ -40,4 +51,7 @@ nacos-docker:
ip
:
192.168.50.247
fuzzmaster-docker
:
ip
:
192.168.50.247
mysql-docker
:
ip
:
192.168.50.247
\ No newline at end of file
fuzzIntegration/src/main/resources/banner.txt
View file @
00d5206b
,---, ___ ___
.--., ,`--.' | ,--.'|_ ,--.'|_ ,--,
,--.' \ ,--, ,----, ,----,| : : ,---, | | :,' __ ,-. | | :,' ,--.'| ,---. ,---,
| | /\/ ,'_ /| .' .`| .' .`|: | ' ,-+-. / | : : ' : ,----._,.,' ,'/ /| : : ' : | |, ' ,'\ ,-+-. / |
: : : .--. | | : .' .' .' .' .' .'| : | ,--.'|' |.;__,' / ,---. / / ' /' | |' | ,--.--. .;__,' / `--'_ / / | ,--.'|' |
: | |-,,'_ /| : . | ,---, ' ./ ,---, ' ./ ' ' ;| | ,"' || | | / \ | : || | ,'/ \ | | | ,' ,'| . ; ,. :| | ,"' |
| : :/|| ' | | . . ; | .' / ; | .' / | | || | / | |:__,'| : / / || | .\ .' : / .--. .-. |:__,'| : ' | | ' | |: :| | / | |
| | .'| | ' | | | `---' / ;--,`---' / ;--,' : ;| | | | | ' : |__ . ' / |. ; '; || | ' \__\/: . . ' : |__ | | : ' | .; :| | | | |
' : ' : | : ; ; | / / / .`| / / / .`|| | '| | | |/ | | '.'|' ; /|' . . |; : | ," .--.; | | | '.'|' : |_| : || | | |/
| | | ' : `--' \./__; .' ./__; .' ' : || | |--' ; : ;' | / | `---`-'| || , ; / / ,. | ; : ;| | '.'\ \ / | | |--'
| : \ : , .-./; | .' ; | .' ; |.' | |/ | , / | : | .'__/\_: | ---' ; : .' \ | , / ; : ;`----' | |/
| |,' `--`----' `---' `---' '---' '---' ---`-' \ \ / | : : | , .-./ ---`-' | , / '---'
`--' `----' \ \ / `--`---' ---`-'
`--`-'
\ No newline at end of file
__ _ _ _ _ _ _ _
/ _| | | | | | | (_) | | | | (_)
| |_ _ _ ____ ____ ______ | |__ __ _ ___ | | __ ___ _ __ __| | ______ _ _ __ | |_ ___ __ _ _ __ __ _ | |_ _ ___ _ __
| _|| | | ||_ /|_ /|______|| '_ \ / _` | / __|| |/ // _ \| '_ \ / _` ||______|| || '_ \ | __|/ _ \ / _` || '__|/ _` || __|| | / _ \ | '_ \
| | | |_| | / / / / | |_) || (_| || (__ | <| __/| | | || (_| | | || | | || |_| __/| (_| || | | (_| || |_ | || (_) || | | |
|_| \__,_|/___|/___| |_.__/ \__,_| \___||_|\_\\___||_| |_| \__,_| |_||_| |_| \__|\___| \__, ||_| \__,_| \__||_| \___/ |_| |_|
__/ |
|___/
\ No newline at end of file
fuzzIntegration/src/main/resources/mapper/KittyMapper.xml
0 → 100644
View file @
00d5206b
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.example.fuzzControll.mapper.KittyMapper"
>
<resultMap
type=
"com.example.fuzzControll.pojo.vo.KittyResult"
id=
"KittyResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"resultOut"
column=
"resultOut"
/>
<result
property=
"resultError"
column=
"resultError"
/>
</resultMap>
<sql
id=
"selectKittyResult"
>
select id, resultOut, resultError from kittyResult;
</sql>
<select
id=
"selectAll"
resultMap=
"KittyResult"
>
<include
refid=
"selectKittyResult"
/>
</select>
</mapper>
\ No newline at end of file
fuzzIntegration/src/main/resources/mybatis/mybatis-config.xml
0 → 100644
View file @
00d5206b
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- 全局参数 -->
<settings>
<!-- 使全局的映射器启用或禁用缓存 -->
<setting
name=
"cacheEnabled"
value=
"true"
/>
<!-- 允许JDBC 支持自动生成主键 -->
<setting
name=
"useGeneratedKeys"
value=
"true"
/>
<!-- 配置默认的执行器.SIMPLE就是普通执行器;REUSE执行器会重用预处理语句(prepared statements);BATCH执行器将重用语句并执行批量更新 -->
<setting
name=
"defaultExecutorType"
value=
"SIMPLE"
/>
<!-- 指定 MyBatis 所用日志的具体实现 -->
<setting
name=
"logImpl"
value=
"SLF4J"
/>
<!-- 使用驼峰命名法转换字段 -->
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
</settings>
</configuration>
fuzzbackendmaster/pom.xml
View file @
00d5206b
...
...
@@ -136,8 +136,8 @@
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
7
</source>
<target>
7
</target>
<source>
8
</source>
<target>
8
</target>
</configuration>
</plugin>
</plugins>
...
...
fuzzbackendmaster/src/main/java/com/example/fuzzbackendmaster/FuzzBackendMaster.java
View file @
00d5206b
...
...
@@ -3,11 +3,15 @@ package com.example.fuzzbackendmaster;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
java.util.Arrays
;
@SpringBootApplication
@EnableFeignClients
public
class
FuzzBackendMaster
{
//todo 不同测试方法,不同同时启动,会出现问题
public
static
void
main
(
String
[]
args
)
{
Arrays
.
stream
(
args
).
forEach
(
System
.
out
::
println
);
SpringApplication
.
run
(
FuzzBackendMaster
.
class
,
args
);
System
.
out
.
println
(
"Start successfully!"
);
}
...
...
fuzzbackendmaster/src/main/resources/application.yml
View file @
00d5206b
...
...
@@ -5,6 +5,6 @@ spring:
active
:
dev
#默认为开发环境
server
:
port
:
810
3
port
:
810
1
fuzzbackendmaster/src/main/resources/banner.txt
View file @
00d5206b
__ _ _ _ _
/ _| | | | | | | | |
| |_ _ _ ____ ____ ______ | |__ __ _ ___ | | __ ___ _ __ __| | ______ _ __ ___ __ _ ___ | |_ ___ _ __
| _|| | | ||_ /|_ /|______|| '_ \ / _` | / __|| |/ // _ \| '_ \ / _` ||______|| '_ ` _ \ / _` |/ __|| __|/ _ \| '__|
| | | |_| | / / / / | |_) || (_| || (__ | <| __/| | | || (_| | | | | | | || (_| |\__ \| |_| __/| |
|_| \__,_|/___|/___| |_.__/ \__,_| \___||_|\_\\___||_| |_| \__,_| |_| |_| |_| \__,_||___/ \__|\___||_|
,-. ____ ___
.--., ,---, ,--/ /| ,---, ,' , `. ,--.'|_
,--.' \ ,--, ,----, ,----,,---.'| ,--. :/ | ,---, ,---.'| ,-+-,.' _ | | | :,' __ ,-.
| | /\/ ,'_ /| .' .`| .' .`|| | : : : ' / ,-+-. / | | | : ,-+-. ; , || .--.--. : : ' : ,' ,'/ /|
: : : .--. | | : .' .' .' .' .' .': : : ,--.--. ,---. | ' / ,---. ,--.'|' | | | | ,--.'|' | || ,--.--. / / '.;__,' / ,---. ' | |' |
: | |-,,'_ /| : . | ,---, ' ./ ,---, ' ./ : |,-. / \ / \ ' | : / \| | ,"' | ,--.__| || | ,', | |,/ \ | : /`./| | | / \ | | ,'
| : :/|| ' | | . . ; | .' / ; | .' / | : ' | .--. .-. | / / ' | | \ / / | | / | | / ,' || | / | |--'.--. .-. | | : ;_ :__,'| : / / |' : /
| | .'| | ' | | | `---' / ;--,`---' / ;--,| | / : \__\/: . .. ' / ' : |. \ . ' / | | | | |. ' / || : | | , \__\/: . . \ \ `. ' : |__ . ' / || | '
' : ' : | : ; ; | / / / .`| / / / .`|' : |: | ," .--.; |' ; :__ | | ' \ \' ; /| | | |/ ' ; |: || : | |/ ," .--.; | `----. \| | '.'|' ; /|; : |
| | | ' : `--' \./__; .' ./__; .' | | '/ : / / ,. |' | '.'|' : |--' ' | / | | |--' | | '/ '| | |`-' / / ,. | / /`--' /; : ;' | / || , ;
| : \ : , .-./; | .' ; | .' | : |; : .' \ : :; |,' | : | |/ | : :|| ;/ ; : .' \'--'. / | , / | : | ---'
| |,' `--`----' `---' `---' / \ / | , .-./\ \ / '--' \ \ /'---' \ \ / '---' | , .-./ `--'---' ---`-' \ \ /
`--' `-'----' `--`---' `----' `----' `----' `--`---' `----'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment