随笔分类 - Spring
摘要:声明式: dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-aop
阅读全文
摘要:只扫描@Repository, 必须关闭默认Filter @ComponentScan(value = {"io.vent.venial"}, includeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION, classes
阅读全文
摘要:package io.jot.memento; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.sp
阅读全文
摘要:Config: package io.jot.memento; import org.springframework.context.annotation.Configuration; import org.springframework.core.MethodParameter; import o
阅读全文
摘要:@InitBinder package io.jot.memento; import org.springframework.format.Formatter; import java.text.ParseException; import java.text.SimpleDateFormat; i
阅读全文
摘要:package io.jot.memento; import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.support.DefaultListableBea
阅读全文
摘要:java -jar --add-exports=java.base/sun.net.util=ALL-UNNAMED .\sentinel-dashboard-1.8.4.jar --server.port=9090 注解支持 · alibaba/Sentinel Wiki · GitHub int
阅读全文
摘要:持久化到MySQL: spring.datasource.platform=mysql ### Count of DB: db.num=1 ### Connect URL of DB: db.url.0=jdbc:mysql://127.0.0.1:3306/ssm?characterEncodin
阅读全文
摘要:@Component(value = "customBeanName") public class CustomComponentBean implements BeanPostProcessor{ @Override public Object postProcessAfterInitializa
阅读全文
摘要:@Mapper,最终 Mybatis 会有一个拦截器,会自动的把 @Mapper 注解的接口生成动态代理类。当然,前提是,映射器(Mapper.xml)必须满足动态代理的条件:1.namespace与接口的全限定类名相同2.id名与接口中方法名一致 <?xml version="1.0" encod
阅读全文
摘要:配置类: package us.transcode.thymeleaf.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configur
阅读全文
摘要:MVC: package us.transcode.thymeleaf.exception; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerExceptio
阅读全文
摘要:spring: datasource: type: com.alibaba.druid.pool.DruidDataSource url: jdbc:mysql://localhost:3306/thymeleaf?characterEncoding=UTF-8 driver-class-name:
阅读全文
摘要:<!-- https://mvnrepository.com/artifact/com.github.ulisesbocchio/jasypt-spring-boot-starter --> <dependency> <groupId>com.github.ulisesbocchio</groupI
阅读全文
摘要:${AnsiColor.BRIGHT_GREEN} ${AnsiStyle.BOLD} _______ _______ _ __________________ _______ _______ _______ ( ____ \( ___ )( ( /|\__ __/\__ __/( ____ \|\
阅读全文
摘要:<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <!--增加JVM参数--
阅读全文
摘要:https://stackoverflow.com/questions/17866996/how-to-access-plain-json-body-in-spring-rest-controller
阅读全文
摘要:spring: mvc: view: prefix: /servlet/static/ # 不加context-path suffix: .html static-path-pattern: /static/** servlet: path: /servlet load-on-startup: 1
阅读全文