Skip to content

Commit b99349c

Browse files
authored
Update README.md
1 parent dfb77f1 commit b99349c

File tree

1 file changed

+197
-0
lines changed

1 file changed

+197
-0
lines changed

README.md

+197
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,203 @@ TreeTable支持
114114
115115
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly93d3cucGRhaS50ZWNoL19pbWFnZXMvc3ByaW5nL3NwcmluZ2Jvb3QtamF2YWZ4LWFwcC03LnBuZw?x-oss-process=image/format,png)
116116

117+
### 如何部署
118+
> 收到几个开发问如何进行运行和部署,统一回复下:
119+
120+
+ 安装jar到本地的maven库
121+
122+
![](https://www.pdai.tech/_images/spring/springboot-javafx-app-10.png)
123+
124+
具体执行maven安装的脚本如下(这里D:\git\github\springboot-javafx-app-demo是我本地的项目目录,需要改成你自己的):
125+
126+
```bash
127+
mvn install:install-file -DgroupId=gn -DartifactId=GNCalendar -Dversion=v1.0 -Dpackaging=jar -Dfile=D:\git\github\springboot-javafx-app-demo\lib\GNCalendar-1.0-alpha.jar
128+
129+
mvn install:install-file -DgroupId=gn -DartifactId=GNButton -Dversion=v1.1.0 -Dpackaging=jar -Dfile=D:\git\github\springboot-javafx-app-demo\lib\GNButton-1.1.0.jar
130+
131+
mvn install:install-file -DgroupId=gn -DartifactId=GNCarousel -Dversion=v2.1.5 -Dpackaging=jar -Dfile=D:\git\github\springboot-javafx-app-demo\lib\GNCarousel-2.1.5.jar
132+
133+
mvn install:install-file -DgroupId=gn -DartifactId=GNDecorator -Dversion=v2.1.2-alpha -Dpackaging=jar -Dfile=D:\git\github\springboot-javafx-app-demo\lib\GNDecorator-2.1.2-alpha.jar
134+
135+
mvn install:install-file -DgroupId=gn -DartifactId=GNAvatarView -Dversion=v1.0-rc -Dpackaging=jar -Dfile=D:\git\github\springboot-javafx-app-demo\lib\GNAvatarView-1.0-rc.jar
136+
137+
```
138+
139+
在这里执行:
140+
141+
![](https://www.pdai.tech/_images/spring/springboot-javafx-app-8.png)
142+
143+
144+
+ 编译的maven插件
145+
146+
![](https://www.pdai.tech/_images/spring/springboot-javafx-app-9.png)
147+
148+
149+
+ pom.xml如下
150+
151+
```xml
152+
<?xml version="1.0" encoding="UTF-8"?>
153+
<project xmlns="http://maven.apache.org/POM/4.0.0"
154+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
155+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
156+
<modelVersion>4.0.0</modelVersion>
157+
<parent>
158+
<groupId>org.springframework.boot</groupId>
159+
<artifactId>spring-boot-starter-parent</artifactId>
160+
<version>2.1.4.RELEASE</version>
161+
<relativePath /> <!-- lookup parent from repository -->
162+
</parent>
163+
<groupId>com.example</groupId>
164+
<artifactId>spring-fx-app</artifactId>
165+
<version>0.0.1-SNAPSHOT</version>
166+
<name>spring-fx-app</name>
167+
<description>Demo project for Spring Boot</description>
168+
169+
<properties>
170+
<java.version>1.8</java.version>
171+
</properties>
172+
173+
<dependencies>
174+
<dependency>
175+
<groupId>org.springframework.boot</groupId>
176+
<artifactId>spring-boot-starter</artifactId>
177+
</dependency>
178+
179+
<!-- mvn install:install-file -DgroupId=gn -DartifactId=GNAvatarView -Dversion=v1.0-rc -Dpackaging=jar -Dfile=D:\git\github\springb
180+
oot-javafx-app-demo\lib\GNAvatarView-1.0-rc.jar
181+
-->
182+
<dependency>
183+
<groupId>gn</groupId>
184+
<artifactId>GNAvatarView</artifactId>
185+
<version>v1.0-rc</version>
186+
</dependency>
187+
<dependency>
188+
<groupId>gn</groupId>
189+
<artifactId>GNButton</artifactId>
190+
<version>v1.1.0</version>
191+
</dependency>
192+
<dependency>
193+
<groupId>gn</groupId>
194+
<artifactId>GNCalendar</artifactId>
195+
<version>v1.0</version>
196+
</dependency>
197+
<dependency>
198+
<groupId>gn</groupId>
199+
<artifactId>GNCarousel</artifactId>
200+
<version>v2.1.5</version>
201+
</dependency>
202+
<dependency>
203+
<groupId>gn</groupId>
204+
<artifactId>GNDecorator</artifactId>
205+
<version>v2.1.2-alpha</version>
206+
</dependency>
207+
208+
<!-- https://mvnrepository.com/artifact/io.github.typhon0/AnimateFX -->
209+
<dependency>
210+
<groupId>io.github.typhon0</groupId>
211+
<artifactId>AnimateFX</artifactId>
212+
<version>1.2.1</version>
213+
</dependency>
214+
<!-- https://mvnrepository.com/artifact/org.controlsfx/controlsfx -->
215+
<dependency>
216+
<groupId>org.controlsfx</groupId>
217+
<artifactId>controlsfx</artifactId>
218+
<version>8.40.14</version>
219+
</dependency>
220+
<!-- https://mvnrepository.com/artifact/de.jensd/fontawesomefx -->
221+
<dependency>
222+
<groupId>de.jensd</groupId>
223+
<artifactId>fontawesomefx</artifactId>
224+
<version>8.9</version>
225+
</dependency>
226+
<!-- https://mvnrepository.com/artifact/com.jfoenix/jfoenix -->
227+
<dependency>
228+
<groupId>com.jfoenix</groupId>
229+
<artifactId>jfoenix</artifactId>
230+
<version>8.0.7</version>
231+
</dependency>
232+
<!-- https://mvnrepository.com/artifact/eu.hansolo/tilesfx -->
233+
<dependency>
234+
<groupId>eu.hansolo</groupId>
235+
<artifactId>tilesfx</artifactId>
236+
<version>1.6.5</version>
237+
</dependency>
238+
<!-- https://mvnrepository.com/artifact/eu.hansolo/colors -->
239+
<dependency>
240+
<groupId>eu.hansolo</groupId>
241+
<artifactId>colors</artifactId>
242+
<version>1.4</version>
243+
</dependency>
244+
<dependency>
245+
<groupId>org.springframework.boot</groupId>
246+
<artifactId>spring-boot-starter-test</artifactId>
247+
<scope>test</scope>
248+
</dependency>
249+
</dependencies>
250+
251+
<build>
252+
<plugins>
253+
<!-- <plugin>-->
254+
<!-- <groupId>org.springframework.boot</groupId>-->
255+
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
256+
<!-- </plugin>-->
257+
258+
<plugin>
259+
<groupId>com.zenjava</groupId>
260+
<artifactId>javafx-maven-plugin</artifactId>
261+
<version>8.8.3</version>
262+
<configuration>
263+
<vendor>pdai</vendor>
264+
<mainClass>com.pdai.javafx.app.SpringFxAppApplication</mainClass>
265+
<allPermissions>true</allPermissions>
266+
</configuration>
267+
</plugin>
268+
</plugins>
269+
</build>
270+
271+
</project>
272+
```
273+
274+
+ 以jar运行为例:
275+
276+
```bash
277+
D:\git\github\springboot-javafx-app-demo>java -jar D:\git\github\springboot-javafx-app-demo\target\jfx\native\spring-fx-app-0.0.1-SNAPSHOT\app\spring-fx-app-0.0.1-SNAPSHOT-jfx.jar
278+
279+
. ____ _ __ _ _
280+
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
281+
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
282+
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
283+
' |____| .__|_| |_|_| |_\__, | / / / /
284+
=========|_|==============|___/=/_/_/_/
285+
:: Spring Boot :: (v2.1.4.RELEASE)
286+
287+
2020-07-01 06:27:46.091 INFO 144952 --- [onPool-worker-1] o.s.boot.SpringApplication : Starting application on pdai with PID 144952 (started by pdai in D:\git\github\springboot-javafx-app-demo)
288+
2020-07-01 06:27:46.099 INFO 144952 --- [onPool-worker-1] o.s.boot.SpringApplication : No active profile set, falling back to default profiles: default
289+
2020-07-01 06:27:47.099 INFO 144952 --- [onPool-worker-1] o.s.boot.SpringApplication : Started application in 1.784 seconds (JVM running for 2.838)
290+
2020-07-01 06:27:47.163 WARN 144952 --- [JavaFX-Launcher] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
291+
X runtime of version 8.0.65
292+
2020-07-01 06:27:51.932 WARN 144952 --- [JavaFX-Launcher] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
293+
X runtime of version 8.0.65
294+
2020-07-01 06:27:53.084 WARN 144952 --- [JavaFX-Launcher] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
295+
X runtime of version 8.0.65
296+
2020-07-01 06:27:54.166 WARN 144952 --- [JavaFX-Launcher] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
297+
X runtime of version 8.0.65
298+
2020-07-01 06:27:54.207 WARN 144952 --- [JavaFX-Launcher] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
299+
X runtime of version 8.0.65
300+
2020-07-01 06:27:54.263 WARN 144952 --- [JavaFX-Launcher] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
301+
X runtime of version 8.0.65
302+
2020-07-01 06:27:54.322 WARN 144952 --- [JavaFX-Launcher] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
303+
X runtime of version 8.0.65
304+
2020-07-01 06:27:56.569 WARN 144952 --- [lication Thread] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
305+
X runtime of version 8.0.65
306+
2020-07-01 06:27:56.590 WARN 144952 --- [lication Thread] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
307+
X runtime of version 8.0.65
308+
2020-07-01 06:27:56.694 WARN 144952 --- [lication Thread] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
309+
X runtime of version 8.0.65
310+
2020-07-01 06:27:56.707 WARN 144952 --- [lication Thread] javafx : Loading FXML document with JavaFX API of version 8.0.171 by JavaF
311+
X runtime of version 8.0.65
312+
```
313+
117314
### 示例代码
118315
119316
@See https://github.com/realpdai/springboot-javafx-app-demo

0 commit comments

Comments
 (0)