项目目录修改
This commit is contained in:
parent
b0e70dc3eb
commit
a3275155bf
18
JDBC/src/main/java/test.java
Normal file
18
JDBC/src/main/java/test.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
public class test {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Scanner reader = new Scanner(System.in);
|
||||||
|
String s = "";
|
||||||
|
while (!reader.hasNext("end")){
|
||||||
|
s = reader.nextLine();
|
||||||
|
}
|
||||||
|
String[] sn = s.split("\\s+");
|
||||||
|
for (String item:sn) {
|
||||||
|
System.out.println(item);
|
||||||
|
}
|
||||||
|
System.out.println(Arrays.toString(sn));
|
||||||
|
}
|
||||||
|
}
|
@ -30,20 +30,38 @@ public class IndentItemView {
|
|||||||
int flag = 0;
|
int flag = 0;
|
||||||
while (!reader.hasNext("end")) {
|
while (!reader.hasNext("end")) {
|
||||||
IndentItem IItem = new IndentItem();
|
IndentItem IItem = new IndentItem();
|
||||||
|
String s;
|
||||||
|
String[] sn;
|
||||||
|
while (!reader.hasNext("end")) {
|
||||||
|
s = reader.nextLine();
|
||||||
|
sn = s.split("\\s+");
|
||||||
//菜名
|
//菜名
|
||||||
IItem.setName(reader.next());
|
IItem.setName(sn[0]);
|
||||||
//初始价格
|
//初始价格
|
||||||
IItem.setInitialPrice(reader.nextFloat());
|
IItem.setInitialPrice(Float.valueOf(sn[1]));
|
||||||
//折扣
|
//折扣
|
||||||
if (reader.hasNextFloat()) {
|
if (sn[3] != null) {
|
||||||
IItem.setDiscount(reader.nextFloat());
|
IItem.setDiscount(Float.valueOf(sn[2]));
|
||||||
} else {
|
} else {
|
||||||
IItem.setDiscount(-1F);
|
IItem.setDiscount(-1F);
|
||||||
}
|
}
|
||||||
//描述
|
//描述
|
||||||
if (!reader.hasNext("end") && !Objects.equals(reader.nextLine(), " ")) {
|
if (sn[3] != null) {
|
||||||
IItem.setDescription(reader.nextLine());
|
IItem.setDescription(sn[3]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// IItem.setName(reader.next());
|
||||||
|
// IItem.setInitialPrice(reader.nextFloat());
|
||||||
|
|
||||||
|
// if (reader.hasNextFloat()) {
|
||||||
|
// IItem.setDiscount(reader.nextFloat());
|
||||||
|
// } else {
|
||||||
|
// IItem.setDiscount(-1F);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (!reader.hasNext("end") && !Objects.equals(reader.nextLine(), " ")) {
|
||||||
|
// IItem.setDescription(reader.nextLine());
|
||||||
|
// }
|
||||||
//菜单ID
|
//菜单ID
|
||||||
indentDAO indent = new indentDAO();
|
indentDAO indent = new indentDAO();
|
||||||
IItem.setIndentID(indent.searchID(indentID));
|
IItem.setIndentID(indent.searchID(indentID));
|
29
pom.xml
29
pom.xml
@ -1,13 +1,14 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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">
|
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>
|
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.example</groupId>
|
<groupId>org.example</groupId>
|
||||||
<artifactId>JavaElm</artifactId>
|
<artifactId>Elm</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>JavaEle</name>
|
<name>Elm</name>
|
||||||
<url>https://maven.apache.org</url>
|
<url>https://maven.apache.org</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@ -37,6 +38,7 @@
|
|||||||
<artifactId>mssql-jdbc</artifactId>
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
<version>12.2.0.jre11</version>
|
<version>12.2.0.jre11</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains</groupId>
|
<groupId>org.jetbrains</groupId>
|
||||||
<artifactId>annotations</artifactId>
|
<artifactId>annotations</artifactId>
|
||||||
@ -44,4 +46,23 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<directory>JDBC/target</directory>
|
||||||
|
<sourceDirectory>JDBC/src/main/java</sourceDirectory>
|
||||||
|
<testSourceDirectory>JDBC/src/test/java</testSourceDirectory>
|
||||||
|
<outputDirectory>JDBC/target/classes</outputDirectory>
|
||||||
|
<testOutputDirectory>JDBC/target/test-classes</testOutputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>JDBC/src/main/resources</directory>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<testResources>
|
||||||
|
<testResource>
|
||||||
|
<directory>JDBC/src/test/resources</directory>
|
||||||
|
</testResource>
|
||||||
|
</testResources>
|
||||||
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
Reference in New Issue
Block a user