Error reason:
Dao in impl implementation class forgot to inject
solution:
Add @Resource annotation and inject it into class
Tag Archives: Error report summary
Error resolving template [index], template might not exist
Problem: error resolving template [index], template may not exist
Solution:
1. Check the project structure first and check whether the location of the static resource file is misplaced
2. Check if the thymeleaf dependency in pom.xml is imported correctly
At first, I only imported the following dependencies, but it reported an error
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
3. Change to the following, just download it again
<!-- thymeleaf -->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-java8time</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
IDEA generates Spring Boot project error: error: read timed out
Error: read timed out
Solution: click file settings
2) http proxy – > Click auto detext proxy settings
3) click Check connection to pop up the following box and enter https://start.spring.io Click OK
4) the following figure shows success
5) just create a new project.
[Solved] Error creating bean with name ‘accountService‘: Unsatisfied dependency expressed through field
Error creating bean with name ‘accountService’: Unsatisfied dependency expressed through field ‘accountDao’;
Spring integration mybatis error:
Warning: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'accountDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountDao' defined in file [D:\myJava\MyProject\springSSM_day06\target\classes\com\itheima\dao\AccountDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [bean.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found
Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accountService': Unsatisfied dependency expressed through field 'accountDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountDao' defined in file [D:\myJava\MyProject\springSSM_day06\target\classes\com\itheima\dao\AccountDao.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [bean.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'javax.sql.DataSource' for property 'dataSource': no matching editors or conversion strategy found
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639)
Error code location: value = datasource
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<property name="driverClassName" value="${jdbc.driver}"></property>
<property name="url" value="${jdbc.url}"></property>
<property name="username" value="${jdbc.username}"></property>
<property name="password" value="${jdbc.password}"></property>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" value="dataSource"></property>
<property name="typeAliasesPackage" value="com.itheima.domain"></property>
</bean>
Reason: because we use the factory to create Dao objects, we need to get connections from the data connection pool objects, so we can’t use value binding
value for binding strings
ref for binding objects
The correct is as follows: use ref to get the object
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="typeAliasesPackage" value="com.itheima.domain"></property>
</bean>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘serviceImpl‘
Problem description
It can be seen from the error report that the class file of serviceimpl is missing
This problem may be caused by the absence of idea and the production of corresponding class files. You can go to the target package
Solution
Refresh Maven project
Project startup error: outofmemoryerror [How to Solve]
2. configurate tomcat的vm option
-server -Xms512m -Xmx2048m -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=512m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8
3 Set the compile size
Settings -> Build, Execution, Deployment -> Complier -> Build process heap size VM options
4 Check the VMs that come with Idea
Help – >Edit Custom VM Options
[Solved] Uncaught ReferenceError: axios is not defined
Uncaught ReferenceError: axios is not defined
npm install --save axios vue-axios
PS: it is impossible to add Axios alone. It needs to be combined with Vue Axios. The plug-in only integrates Axios into vue.js.
Error reason & Solution:
//wrong
axios.post(...)
//right
this.axios.post(...)
[Solved] ModuleNotFoundError: No module named ‘_polyiou‘
Problem recurrence
//install swig
sudo apt-get install swig
swig -c++ -python polyiou.i
python setup.py build_ext --inplace
//report error
ModuleNotFoundError: No module named '_polyiou'
Solution:
Swig is not installed correctly. Because there are python2 and python3 in the environment, the command to install swig is modified as follows
sudo apt-get install swig
swig -c++ -python polyiou.i
python3 setup.py build_ext --inplace