In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Gradle how to build spring-boot-vuejs, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Find a suitable project spring-boot-vuejs in Github and download it ready to build. But the original project had only maven configuration, and I wanted to build it in gradle. Go online and find out that gradle comes with the ability to convert POM, although this is still a hatching feature:
Gradle init-type pom
Execute the above command directly in the project root directory, and the relevant files for gradle will be automatically generated.
After that, I directly use the system commands to build, instead of using the generated gradlew, and then run the generated jar package:
Gradle buildjava-jar. / backend/build/libs/backend-0.0.1-SNAPSHOT.jar
Failed to run the project successfully:
Picked up _ JAVA_OPTIONS:-Dawt.useSystemAAFontSettings=gasp
There is no main manifest property in build/libs/backend-0.0.1-SNAPSHOT.jar
Manually modify the build.gradle of the backend project:
Plugins {id 'org.springframework.boot' version' 2.1.6.RELEASE' id 'java'} apply plugin:' io.spring.dependency-management'repositories {mavenCentral ()} jar {baseName = 'spring-boot-vuejs' version =' 0.1.0'} sourceCompatibility = 1.8targetCompatibility = 1.8dependencies {compile 'org.springframework.boot:spring-boot-starter-actuator' compile' org.springframework.boot:spring-boot-starter- Web' compile 'org.springframework.boot:spring-boot-devtools' compile' org.springframework.boot:spring-boot-starter-data-jpa' compile 'com.h3database:h3:1.4.199' compile' org.apache.tomcat:tomcat-jdbc:9.0.21' compile 'org.postgresql:postgresql:42.2.5' compile' org.springframework.boot:spring-boot-starter-security' testCompile 'org.springframework.boot:spring- Boot-starter-test' testCompile 'io.rest-assured:rest-assured:4.0.0' testCompile' org.springframework.security:spring-security-test'}
Build again or fail:
Ydx@ydx-PC:$ gradle build
Picked up _ JAVA_OPTIONS:-Dawt.useSystemAAFontSettings=gasp
> Task: backend:compileTestJava FAILED
/ home/ydx/Documents/Project/spring_boot/spring-boot-vuejs-master/backend/src/test/java/de/jonashackt/springbootvuejs/controller/BackendControllerTest.java:59: error: unable to access TypeRef
.body () .as (Long.class)
^
Cannot find the class file for io.restassured.common.mapper.TypeRef
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task': backend:compileTestJava'.
> Compilation failed; see the compiler error output for details.
Forget the back end and fiddle with the front-end project. Because the npm command is not called with gradle, it is executed directly:
Npm install
As a result, node-sass was not installed successfully-_-| |
Have to install it manually:
Cnpm install-save-dev node-sass
Execute after success:
Npm run serve
O (∩ _ ∩) O ha, successfully started.
Of course, only the front end is started, and the back end is still paralyzed% > _
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.