Home > Back-end >  The IDEA of using velocity templates????
The IDEA of using velocity templates????

Time:10-07

Create a Spring in the IDEA the Boot program, use the Spring initializr, cannot choose velocity (tips below 1.4 version can use), the version switch to 1.3.8, after project built in pom. About velocity templates in XML error (red font), the following figure, how is this to return a responsibility excuse me?

If use 1.5.3 version does not show red font error, but cannot be used. The vm template file, as follows: to establish the Controller
 @ Controller 
Public class IndexController {
.
.
.
@ RequestMapping (value={} "/vm" https://bbs.csdn.net/topics/
Public String news () {
Return "news." vm;//have established news. Vm file
}
}

Start tomcat, run in the browser address bar type: localhost: 8080/vm display 404 error, is this why?

CodePudding user response:

Do I know how to solve? Encounter with cannot use. Vm template of this problem,,,

CodePudding user response:

The landlord to change a high version
https://mvnrepository.com/artifact/org.apache.velocity/velocity

 & lt; ! - https://mvnrepository.com/artifact/org.apache.velocity/velocity - & gt; 

Org. Apache. Velocity
Velocity
1.7 & lt;/version>

CodePudding user response:

Do I know how to solve? Encounter with cannot use. Vm template, this problem,

CodePudding user response:

The building Lord, please the problem solved? How to deal with

CodePudding user response:

Remove the return news. At the end of the vm. The vm

CodePudding user response:

. Remove vm,., vm. Vm is removed,
  • Related