Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.7k views
in Technique[技术] by (71.8m points)

idea 导入 spring boot 项目,build失败

image.png

Clearing build system data...
Executing pre-compile tasks...
Loading Ant Configuration...
Running Ant Tasks...
Cleaning output directories...
Running 'before' tasks
Checking sources
Copying resources... [ahh]
Parsing java... [ahh]
java: Errors occurred while compiling module 'ahh'
javac 11 was used to compile java sources
Finished, saving caches...
Compilation failed: errors: 3; warnings: 0
Executing post-compile tasks...
Loading Ant Configuration...
Running Ant Tasks...
Synchronizing output directories...
2020/12/17, 9:43 PM - Build completed with 3 errors and 0 warnings in 5 s 706 ms
/Users/lidashuang/Projects/ahh/src/main/java/com/weavi/ahh/controller/UserController.java:4:52
java: package com.sun.org.apache.xpath.internal.operations does not exist
/Users/lidashuang/Projects/ahh/src/main/java/com/weavi/ahh/controller/UserController.java:131:19
java: cannot find symbol
  symbol:   class Bool
  location: class com.weavi.ahh.controller.UserController
/Users/lidashuang/Projects/ahh/src/main/java/com/weavi/ahh/controller/UserController.java:4:52
java: package com.sun.org.apache.xpath.internal.operations does not exist
/Users/lidashuang/Projects/ahh/src/main/java/com/weavi/ahh/controller/UserController.java:131:19
java: cannot find symbol
  symbol:   class Bool
  location: class com.weavi.ahh.controller.UserController

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

看上去是java sdk 版本的问题,你要导入的包名只存在于JDK8,高版本的已移除,
把项目的 SDK 从高版本降至 1.8. 对 IntelliJ, 从 File --> Project Structure 里设置。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...