parent
2e8c447280
commit
17adb9ba0f
@ -0,0 +1,97 @@
|
|||||||
|
<?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>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-module-wms</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
ruoyi-modules-wms WMS模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos Config -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- 更新nacos-client到最新 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.nacos</groupId>
|
||||||
|
<artifactId>nacos-client</artifactId>
|
||||||
|
<version>${nacos-client.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Sentinel -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot Actuator -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot Web -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mysql Connector -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common DataSource -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-datasource</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common DataScope -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-datascope</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.ruoyi.wms;
|
||||||
|
|
||||||
|
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure;
|
||||||
|
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WMS模块
|
||||||
|
*
|
||||||
|
* @author Alan Scipio
|
||||||
|
* created on 2024/2/1
|
||||||
|
*/
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableRyFeignClients
|
||||||
|
@SpringBootApplication(exclude = {DruidDataSourceAutoConfigure.class})
|
||||||
|
public class RuoYiWmsApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.setProperty("pagehelper.banner", "false"); //关闭pagehelper的banner
|
||||||
|
SpringApplication.run(RuoYiWmsApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ WMS模块启动成功 ლ(´ڡ`ლ)゙");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.wms.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Alan Scipio
|
||||||
|
* created on 2024/2/1
|
||||||
|
*/
|
||||||
|
@RequestMapping("/test")
|
||||||
|
@RestController
|
||||||
|
public class TestWmsController extends BaseController {
|
||||||
|
|
||||||
|
@GetMapping("/showInfo")
|
||||||
|
public AjaxResult showInfo() {
|
||||||
|
return success("Hello World! This is wms module.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
||||||
|
_
|
||||||
|
_ __ _ _ ___ _ _(_) __ ___ __ ___ ___
|
||||||
|
| '__| | | |/ _ \| | | | |____\ \ /\ / / '_ ` _ \/ __|
|
||||||
|
| | | |_| | (_) | |_| | |_____\ V V /| | | | | \__ \
|
||||||
|
|_| \__,_|\___/ \__, |_| \_/\_/ |_| |_| |_|___/
|
||||||
|
|___/
|
@ -0,0 +1,27 @@
|
|||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9204
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: ruoyi-wms
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 127.0.0.1:8848
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 127.0.0.1:8848
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||||
|
# 指定分组
|
||||||
|
group: DEFAULT_GROUP #默认微服务组
|
@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/ruoyi-wms"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统日志输出 -->
|
||||||
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/info.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/error.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.ruoyi" level="info"/>
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info"/>
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
@ -0,0 +1,21 @@
|
|||||||
|
package ryas.gen;
|
||||||
|
|
||||||
|
import com.ruoyi.common.datasource.mybatis.gen.MyBatisGenerationHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MyBatis代码生成
|
||||||
|
*
|
||||||
|
* @author Alan Scipio
|
||||||
|
* created on 2024/2/1
|
||||||
|
*/
|
||||||
|
public class GenWms {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
MyBatisGenerationHelper.generate();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package ryas.test;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Alan Scipio
|
||||||
|
* created on 2024/2/1
|
||||||
|
*/
|
||||||
|
public class Common2Test {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test0() {
|
||||||
|
System.out.println("abc");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
<!DOCTYPE generatorConfiguration PUBLIC
|
||||||
|
"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
|
||||||
|
<generatorConfiguration>
|
||||||
|
<!-- MyBatis3 动态SQL生成 -->
|
||||||
|
<context id="mbg" targetRuntime="MyBatis3DynamicSql">
|
||||||
|
|
||||||
|
<commentGenerator>
|
||||||
|
<property name="suppressAllComments" value="false"/>
|
||||||
|
<property name="suppressDate" value="true"/>
|
||||||
|
<property name="addRemarkComments" value="true"/>
|
||||||
|
</commentGenerator>
|
||||||
|
|
||||||
|
<!-- 数据库连接 -->
|
||||||
|
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
|
||||||
|
connectionURL="jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true%26characterEncoding=utf8%26zeroDateTimeBehavior=convertToNull%26useSSL=true%26serverTimezone=GMT%2B8"
|
||||||
|
userId="root"
|
||||||
|
password="password"/>
|
||||||
|
|
||||||
|
<!-- Java 模型 -->
|
||||||
|
<javaModelGenerator targetPackage="com.ruoyi.wms.domain" targetProject="ruoyi-modules/ruoyi-wms/src/main/java">
|
||||||
|
<property name="rootClass" value="com.ruoyi.common.core.web.domain.BaseEntity"/>
|
||||||
|
<property name="enableSubPackages" value="true" />
|
||||||
|
<property name="trimStrings" value="true" />
|
||||||
|
</javaModelGenerator>
|
||||||
|
|
||||||
|
<!-- Mapper.xml (对于MyBatis动态SQL特性来说不再需要) -->
|
||||||
|
<sqlMapGenerator targetPackage="mappers" targetProject="ruoyi-modules/ruoyi-wms/src/main/resources">
|
||||||
|
<property name="enableSubPackages" value="true" />
|
||||||
|
</sqlMapGenerator>
|
||||||
|
|
||||||
|
<!-- Mapper.java -->
|
||||||
|
<javaClientGenerator targetPackage="com.ruoyi.wms.mapper" targetProject="ruoyi-modules/ruoyi-wms/src/main/java" type="XMLMAPPER">
|
||||||
|
<property name="enableSubPackages" value="true" />
|
||||||
|
</javaClientGenerator>
|
||||||
|
|
||||||
|
<!-- 要生成的表 -->
|
||||||
|
<table tableName="sys_common" domainObjectName="SysCommon"/>
|
||||||
|
</context>
|
||||||
|
</generatorConfiguration>
|
Loading…
Reference in new issue