Home > Back-end >  Springboot can start but the input address is error
Springboot can start but the input address is error

Time:01-28

This is the log and project code brothers look




CodePudding user response:

XML is that under the resources

CodePudding user response:

This error is usually the inside of the XML namespace id or statements do not agree with the Java file name

CodePudding user response:

1, your springboot startup class mapper scan path is the
2, changed the yml the classpath inside the path to the absolute path to write complete
3, if not solve, can have a try in the pom file with the




The SRC/main/java
True


The SRC/main/resources
True




Are colleagues before I use eclipse startup to normal, I use the idea to start out of the question, the Internet is the cause of two development tools maven set the difference?? Specific didn't understand

CodePudding user response:

The
reference 2 floor? Response:
this error is usually the inside of the XML namespace id or statements do not agree with the Java file name

Is the Alt + enter generated in the XML

CodePudding user response:

reference 1/f, understand amidst a reply:
XML should under the resources

To put or that and a question

CodePudding user response:

reference SKA_LYZ reply: 3/f
1, your springboot start class mapper scan path is the
2, changed the yml the classpath inside the path to the absolute path to write complete
3, if not solve, can have a try in the pom file with the




The SRC/main/java
True


The SRC/main/resources
True




Are colleagues before I use eclipse startup to normal, I use the idea to start out of the question, the Internet is the cause of two development tools maven set the difference?? Specific didn't understand


Have tried

CodePudding user response:

Add @ Mapper annotations try at Mapper interfaces there

CodePudding user response:

refer to 6th floor Gong_xuesong response:
Quote: refer to the third floor SKA_LYZ response:
1, your springboot start class mapper scan path is the
2, changed the yml the classpath inside the path to the absolute path to write complete
3, if not solve, can have a try in the pom file with the




The SRC/main/java
True


The SRC/main/resources
True




Are colleagues before I use eclipse startup to normal, I use the idea to start out of the question, the Internet is the cause of two development tools maven set the difference?? Specific didn't understand


All tried whatever use


Compile the project starts to see have target inside your XML document

CodePudding user response:

In starting the classes I add @ MapperScan (com. Weiyi. Context. "mapper") this is the path to

CodePudding user response:

refer to the eighth floor SKA_LYZ response:
Quote: refer to the sixth floor Gong_xuesong response:
Quote: refer to the third floor SKA_LYZ response:
1, your springboot start class mapper scan path is the
2, changed the yml the classpath inside the path to the absolute path to write complete
3, if not solve, can have a try in the pom file with the




The SRC/main/java
True


The SRC/main/resources
True




Are colleagues before I use eclipse startup to normal, I use the idea to start out of the question, the Internet is the cause of two development tools maven set the difference?? Specific didn't understand


All tried whatever use


Compile the project starts to see in the target your XML file



Is this?

CodePudding user response:

Resources to create a new folder, mapper file copied on resources
Note the folder is new, and can only be level 1 level 1
Package created will be com. Aa. User
Directory structure is com/aa/user

CodePudding user response:

 
# MyBatis
Mybatis:
# search specified package alias
TypeAliasesPackage: com. Weiyi
# configuration mapper scanning, find all the mapper. The XML mapping file
MapperLocations: classpath * : mapper/* */* mapper XML
  • Related