Tag Archives: Springboot Error

Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers

Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers

Error parsing template [index], template may not exist or may not be accessible by any configured template parsers

The problem here is that the index is not found, I checked it, and the path of the index is wrong


@Controller
public class shrioController {
    @RequestMapping({"/","/index"})
    public String toIndex(Model model){
        model.addAttribute("msg","hello,Shiro");
        return "index";
    }
}

image
The index path here should be “/templates/index”

[Solved] Springboot Error: sprintgboot Unknown column ‘name’ in ‘field list’

When querying data using springboot + mybati plus, an error occurs springgboot unknown column 'field name' in 'field list'

Baidu hasn’t found a solution for a long time. Finally, it found that there was a problem with the setting of database field name


When the database configuration is correct and automatic map mapping is enabled, an error is still reported.

After checking for a long time, I finally found that there was a problem with the setting of the database field name

For example, the field name of my database is LastName. If the variable name in the JavaBean is LastName, an error will be reported.

Changing the database field name to underline or non hump name successfully solves the problem

[Solved] Springboot Error: found character ‘@’ that cannot start any token. (Do not use @ for indentation)

Delete the spaces in POM. XML

And then suddenly, it’s good to delete the space again

On August 14, 2019, this problem occurs again:

After deleting the space, be sure to reintroduce the Maven package. This time, the package will be used well

Springboot Error: Failed to configure a DataSource: ‘url’ attribute is not specified and no embedd

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

Cannot configure datasource: the ‘URL’ property is not specified, and the embedded datasource cannot be configured.

Obviously, you don’t configure some attributes of datasource in your application, such as address value, database driver, user name, password,

As we all know, the biggest advantage of springboot is automatic configuration: so we just need to give it the value of the configuration file, and it will be automatically configured. Configure in application.properties In the file

Then I will give you some of the most basic configuration information of springboot

#Accessing the root path

#app name
spring.application.name=springboot-demo

#port
server.port=8080

#encode
server.tomcat.uri-encoding=utf-8

#database
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/sql_test
spring.datasource.username=root
spring.datasource.password=123456
spring.datasource.max-idle=10
spring.datasource.max-wait=10000
spring.datasource.min-idle=5
spring.datasource.initial-size=5

#session
server.servlet.session.timeout=30m

Of course, you can not configure it, but you need to declare it

Just start the class header declaration:

@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})