When I write entiti classes, I’m highlighting fields with an error: this inspection controls whether the persistence orm annotations .

When I want to make Assign Data Source I have it there just in the Data Source field is <none> . Project configurations: Application-context.xml

 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="jpaVendorAdapter" ref="jpaVendorAdapter" /> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/university_test" /> <property name="username" value="root" /> <property name="password" value="root" /> </bean> <bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="MYSQL" /> <property name="databasePlatform" value="org.hibernate.dialect.MySQL5Dialect" /> <property name="showSql" value="false" /> <property name="generateDdl" value="false" /> </bean> 

Just in case: (dispatcher-servlet.xml)

  <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <context:component-scan base-package="com.student.mark.controller" /> <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" /> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> 

web.xml:

  <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/config/application-context.xml </param-value> </context-param> <listener> <listener- class> org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>application</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/dispatcher-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>application</servlet-name> <url-pattern>/</url-pattern> 

Update An example of an error on the screen, just an empty date date field:

enter image description here

  • It is not very clear that you do not work. As I understand it, you are using some kind of development environment (which one would be nice to add to the description and tag) and it displays an error to you on some kind of entity field. Perhaps it is also worth giving an example of this class. - Slava Semushin
  • I use the idea. What error gives over the field, I threw in the question. example of the @Column(name="firstName") private String firstName; field @Column(name="firstName") private String firstName; - raviga
  • @SlavaSemushin updated the issue with the screen - raviga
  • @DimaKhodan did you solve the problem? - T. Kudaibergen

0