解决SpringBoot静态资源不加载问题
spring.resources.static-locations=classpath:/static/
上述并不是 完全好用
例如:将css、js、images放进static里,可默认加载
而在
templates
中的页面引入外部资源:
<script src="js/mui.min.js"></script>
控制台显示sql运行,方便调优
logging.level.com.wochat.mapper=debug
开启二级缓存
https://blog.csdn.net/Dongguabai/article/details/81107069
1.Mapper上,@CacheNamespace
@CacheNamespace
public interface UserMapper {
}
2.将对象实现序列化
import java.io.Serializable;
public class User implements Serializable{//序列化
}
3.二级缓存开启成功,控制台出现缓存命中率,0.5、0.6666666666666666、0.75等
Cache Hit Ratio [com.wochat.mapper.UserMapper]: 0.6666666666666666