diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/Campus_second-hand_trading_platform.iml b/.idea/Campus_second-hand_trading_platform.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/Campus_second-hand_trading_platform.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a4feb50 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/trading_platform/.gitattributes b/trading_platform/.gitattributes deleted file mode 100644 index 3b41682..0000000 --- a/trading_platform/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/mvnw text eol=lf -*.cmd text eol=crlf diff --git a/trading_platform/.gitignore b/trading_platform/.gitignore deleted file mode 100644 index 3f1f3e8..0000000 --- a/trading_platform/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ -.idea/ diff --git a/trading_platform/README.md b/trading_platform/README.md new file mode 100644 index 0000000..cdfeccd --- /dev/null +++ b/trading_platform/README.md @@ -0,0 +1,75 @@ +# 目录说明 +### 展示`trading_platform`的 Java 项目的目录结构。项目使用`Maven`构建的。 +``` +trading_platform +├── .mvn/ +├── src/ +│ ├── main/ +│ │ ├── java/ +│ │ │ ├── com.trading_platform/ +│ │ │ │ ├── config/ +│ │ │ │ │ ├── (各种配置类) +│ │ │ │ │ └── WebConfig.java +│ │ │ │ ├── controller/ +│ │ │ │ │ ├── (各种controller) +│ │ │ │ │ └── UsersController.java +│ │ │ │ ├── exception/ +│ │ │ │ │ ├── (各种异常类) +│ │ │ │ │ └── GlobalExceptionHandler.java +│ │ │ │ ├── interceptors/ +│ │ │ │ │ ├── (各种拦截器) +│ │ │ │ │ └── LoginInterceptor.java +│ │ │ │ ├── mapper/ +│ │ │ │ │ └── (各种mapper) +│ │ │ │ ├── service/ +│ │ │ │ │ ├── impl/ +│ │ │ │ │ │ └── (各种serviceImpl) +│ │ │ │ │ └── (各种service) +│ │ │ │ ├── util/ +│ │ │ │ │ ├── (各种工具类) +│ │ │ │ │ ├── JwtUtil.java +│ │ │ │ │ └── Sha256Util.java +│ │ │ │ └──TradingPlatformApplication.java +│ │ ├── resources/ +│ │ │ ├── static/ +│ │ │ │ └── (各种静态资源) +│ │ │ ├── templates/ +│ │ │ │ └── (各种模板) +│ │ │ └── application.yml +│ │ └── test/ +│ │ │ ├── java/ +│ │ │ │ ├── com.trading_platform/ +│ │ │ │ │ └── TradingPlatformApplicationTest.java +├── .gitignore +├── HELP.md +├── mvnw +├── mvnw.cmd +├── pom.xml +External Libraries: +├── JDK<17> +└── 各种依赖包 +``` +### 包含以下主要部分: +1. 主源代码 (`src/main/java/com.trading_platform/`): +- **config/**:存放各种配置类,如WebConfig.java。 +- **controller/**:存放各种控制器类,如UsersController.java。 +- **exception/**:存放各种异常处理类,如GlobalExceptionHandler.java。 +- **interceptors/**:存放各种拦截器类,如LoginInterceptor.java。 +- **mapper/**:存放各种Mapper类。 +- **service/**:存放各种服务接口及其实现类。 +- **util/**:存放各种工具类,如JwtUtil.java和Sha256Util.java。 +- **TradingPlatformApplication.java**:项目的主启动类。 +2. 静态资源文件 (`src/main/resources/`): +- **static/**:存放各种静态资源。 +- **templates/**:存放各种模板文件。 +- **application.yml**:项目的配置文件。 +3. 测试代码 (`src/test/java/com.trading_platform/`): +- **TradingPlatformApplicationTest.java**:项目的测试类。 +4. 其他文件: +- **.gitignore**:Git忽略文件。 +- **HELP.md**:帮助文档。 +- **mvnw** 和 **mvnw.cmd**:Maven Wrapper脚本。 +- **pom.xml**:Maven项目的配置文件。 +5. 外部库: +- **JDK<17>**:使用的Java开发工具包版本。 +- **各种 Maven 依赖包**:项目依赖的第三方库。 \ No newline at end of file diff --git a/trading_platform/target/classes/application.yml b/trading_platform/target/classes/application.yml new file mode 100644 index 0000000..b1f565d --- /dev/null +++ b/trading_platform/target/classes/application.yml @@ -0,0 +1,6 @@ +spring: + datasource: + name: localhost + url: jdbc:mysql://localhost:3306/secondhandtransactions?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + username: root + password: 123456 \ No newline at end of file diff --git a/trading_platform/target/classes/com/trading_platform/TradingPlatformApplication.class b/trading_platform/target/classes/com/trading_platform/TradingPlatformApplication.class new file mode 100644 index 0000000..fc601f5 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/TradingPlatformApplication.class differ diff --git a/trading_platform/target/classes/com/trading_platform/config/WebConfig.class b/trading_platform/target/classes/com/trading_platform/config/WebConfig.class new file mode 100644 index 0000000..4ff8a85 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/config/WebConfig.class differ diff --git a/trading_platform/target/classes/com/trading_platform/controller/UsersController.class b/trading_platform/target/classes/com/trading_platform/controller/UsersController.class new file mode 100644 index 0000000..54d2209 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/controller/UsersController.class differ diff --git a/trading_platform/target/classes/com/trading_platform/entity/Result.class b/trading_platform/target/classes/com/trading_platform/entity/Result.class new file mode 100644 index 0000000..6da23ae Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/entity/Result.class differ diff --git a/trading_platform/target/classes/com/trading_platform/entity/Users.class b/trading_platform/target/classes/com/trading_platform/entity/Users.class new file mode 100644 index 0000000..01849ee Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/entity/Users.class differ diff --git a/trading_platform/target/classes/com/trading_platform/exception/GlobalExceptionHandler.class b/trading_platform/target/classes/com/trading_platform/exception/GlobalExceptionHandler.class new file mode 100644 index 0000000..20a9860 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/exception/GlobalExceptionHandler.class differ diff --git a/trading_platform/target/classes/com/trading_platform/interceptors/LoginInterceptor.class b/trading_platform/target/classes/com/trading_platform/interceptors/LoginInterceptor.class new file mode 100644 index 0000000..1d8188f Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/interceptors/LoginInterceptor.class differ diff --git a/trading_platform/target/classes/com/trading_platform/mapper/UsersMapper.class b/trading_platform/target/classes/com/trading_platform/mapper/UsersMapper.class new file mode 100644 index 0000000..f1fd189 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/mapper/UsersMapper.class differ diff --git a/trading_platform/target/classes/com/trading_platform/service/UsersService.class b/trading_platform/target/classes/com/trading_platform/service/UsersService.class new file mode 100644 index 0000000..d9ce204 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/service/UsersService.class differ diff --git a/trading_platform/target/classes/com/trading_platform/service/impl/UsersServiceImpl.class b/trading_platform/target/classes/com/trading_platform/service/impl/UsersServiceImpl.class new file mode 100644 index 0000000..4cf3e2e Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/service/impl/UsersServiceImpl.class differ diff --git a/trading_platform/target/classes/com/trading_platform/utils/JwtUtil.class b/trading_platform/target/classes/com/trading_platform/utils/JwtUtil.class new file mode 100644 index 0000000..74331aa Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/utils/JwtUtil.class differ diff --git a/trading_platform/target/classes/com/trading_platform/utils/Sha256Util$1.class b/trading_platform/target/classes/com/trading_platform/utils/Sha256Util$1.class new file mode 100644 index 0000000..7665775 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/utils/Sha256Util$1.class differ diff --git a/trading_platform/target/classes/com/trading_platform/utils/Sha256Util.class b/trading_platform/target/classes/com/trading_platform/utils/Sha256Util.class new file mode 100644 index 0000000..cd43237 Binary files /dev/null and b/trading_platform/target/classes/com/trading_platform/utils/Sha256Util.class differ