当前位置:网站首页>BUG_ me

BUG_ me

2022-04-23 16:50:00 Kramer_ one hundred and forty-nine

front end

filter

about url-pattern It can take the following forms :

/xxx/xxx.do
/xxx/*
/*
*.do

JS Use in el expression

stay JavaScript Use in EL expression ,El The expression must use a string .
stay html Some can be used directly .

Methods triggered by dynamically generated elements

Methods triggered by dynamically generated elements , The argument must be a string .

The binding event

1、
Bound to events js The code is written in $(function() {….}) It means after the page is loaded , Execute binding code .
Written in $(function() {….}) Outside, the binding event is executed when the page is loaded , May not load dom perhaps jquery Object is bound to the event first .

2、
Dynamically generated html Fragments cannot be bound by ordinary events .
grammar :$( Need a valid outer element of the bound element ).on( How to bind Events , Binding element required , Callback function )

Back end

Spring Web project ,Invalid bound statement (not found)

xml The file may not have been put in target/classes In this classpath . for example XXXDao In bag XXXdao.xml Missing file .
This problem will not occur in local projects .
terms of settlement : stay pom.xml Add... To the document

  <build>
    <!-- The purpose is to src/main/java In the directory xml The file is included in the output result . Output classes Directory -->
    <resources>
      <resource>
        <directory>src/main/java</directory><!-- directory -->
        <includes><!-- Including... In the directory .properties,.xml All the files will be scanned -->
          <include>**/*.properties</include>
          <include>**/*.xml</include>
        </includes>
        <filtering>false</filtering>
      </resource>
    </resources>
  </build>

SpringBoot Integrate MyBatis,url have a problem

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

take application.properties Switch to application.yml
Or change the coding method of the whole project to UTF-8, Then write again in yellow .

SpringBoot Project upload file size

The default upload file size is 1MB, An error will be reported when transmitting a larger file .
application.properties Increase the configuration :

spring.servlet.multipart.max-file-size=20MB #  Single file is the largest 20MB
spring.servlet.multipart.max-request-size=20MB #  Single request maximum 20MB

compiler

IDEA from git Import the project , Display only jsp Wait for the documents .

Need from File–Project Structure–Modelus, Add items manually , Choose the right template .

IDEA jar The bag is not complete

Need from File–Project Structure–Modules On the right side Dependencies, Add dependencies manually

database

1、MyBatis encounter “@P0” There are grammar errors nearby when
hold # Switch to $

2、 When using fuzzy queries
1、 stay Java Well written in ”%xxx%“, In the incoming mapper Inside xml The mapping file
2、mapper The mapping file like '%' #{xxx} '%' Double quotation marks can also be used here , But there must be a space between
3、mapper The mapping file like '%${xxx}%'

版权声明
本文为[Kramer_ one hundred and forty-nine]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231359460545.html