Java Compilation Errors in 'demo1' Module: Missing Packages and Symbols
The error messages indicate that there are missing packages and symbols in your Java code. Here is a summary of the errors:
-
In 'IndexController.java':
- The packages 'org.springframework.stereotype' and 'org.springframework.web.bind.annotation' are missing.
- The symbol 'Controller' and 'GetMapping' cannot be found.
-
In 'LoginController.java':
- The packages 'org.apache.ibatis.annotations', 'org.springframework.beans.factory.annotation', 'org.springframework.stereotype', and 'org.springframework.web.bind.annotation' are missing.
- The symbols 'Controller', 'RestController', 'RequestMapping', and 'Autowired' cannot be found.
-
In 'User.java':
- The package 'lombok' is missing.
- The symbol 'Data' cannot be found.
-
In 'IUserDao.java':
- The package 'org.springframework.stereotype' is missing.
- The symbol 'Repository' cannot be found.
-
In 'Demo1Application.java':
- The packages 'org.mybatis.spring.annotation', 'org.springframework.boot', 'org.springframework.boot.autoconfigure', 'org.springframework.stereotype', and 'org.springframework.web.bind.annotation' are missing.
- The symbols 'Controller', 'MapperScan', and 'SpringBootApplication' cannot be found.
- The symbol 'RequestMapping' cannot be found in the class 'Demo1Application'.
- The variable 'SpringApplication' cannot be found.
-
In 'Pages.java' and 'Result.java':
- The package 'lombok' is missing.
- The symbol 'Data' cannot be found.
-
In 'LoginModelImpl.java':
- The packages 'org.springframework.beans.factory.annotation' and 'org.springframework.stereotype' are missing.
- The symbol 'Component' and 'Autowired' cannot be found.
-
In 'LoginServiceImpl.java':
- The packages 'org.apache.commons.lang3', 'org.springframework.beans.factory.annotation', and 'org.springframework.stereotype' are missing.
- The symbol 'Service' and 'Autowired' cannot be found.
- The method 'getUserName()' and 'getPassword()' cannot be found in the class 'User'.
- The variable 'StringUtils' cannot be found.
To resolve these errors, make sure you have the correct dependencies and packages imported in your code.
原文地址: https://www.cveoy.top/t/topic/fywh 著作权归作者所有。请勿转载和采集!