qchen qchen
3年前
枚举Enum的使用
1、为什么使用枚举?以博客网站为例,文章有三种状态:草稿、审核和发布,可将其定义为静态常量:javapublicclassBlogStatuspublicstaticfinalintDraft1;//草稿publicstaticfinalintReview2;//审核publicstaticfi
Wesley13 Wesley13
4年前
java读取自定义的.properties 配置文件 中的key
  /读取.properties配置文件@parampropertiesUrl配置文件的路径@return配置文件中的keyvalue值/publicstaticMap<String,StringgetPrope
子非鱼 子非鱼
3年前
springboot(一)入门
一、maven构建springboot1、需求:搭建SpringBoot工程,定义HelloController.hello()方法,返回”HelloSpringBoot!”。2、实现步骤:1.创建Maven项目springboothelloworld2.导入SpringBoot起步依赖xmlorg.springframewo
翼
5年前
uniapp中全局变量globalData使用
使用uniapp开发时,可以通过在app.vue中定义全局变量,在每个页面内通过globalData获取1、app.vue文件的写法<scriptexportdefault{globalData:{loginSta:false},onLaunch:function(){
Stella981 Stella981
4年前
C# WinForm窗体控件Panel修改边框颜色以及边框宽度方法
CWinForm窗体控件Panel修改边框颜色以及边框宽度方法1.新建组件这里可以自定义一个Panel控件起名为PanelEx !(https://oscimg.oschina.net/oscnet/99045
Wesley13 Wesley13
4年前
CSS 样式注意、常识
padding的值,不能为负数。使用absolute后,在定义好width和height,使用border的width和height会变大、变宽。设置好看的细线 .thinBorder:after{  content:'';  width:100%;  display:block;  
Stella981 Stella981
4年前
ES6入门六:class的基本语法、继承、私有与静态属性、修饰器
基本语法继承私有属性与方法、静态属性与方法修饰器(Decorator) 一、基本语法1classGrammar{2constructor(name,age){//定义对象自身的方法和属性3this.namename,
Stella981 Stella981
4年前
Spring Security 常见错误
登陆时提示用户已锁定。Useraccountislocked由于自定义用户对象实现了UserDetails接口,需要将接口默认方法返回值改为true即可。publicclassAuthUserDetailsimplementsUserDetails{}登陆时提示Ba
Easter79 Easter79
4年前
Spring支持多数据源的@Transactional事务注解
1、配置事务注解驱动、每个数据源对应的事务管理器,并定义“限定符”<tx:annotationdriven/    <bean id"transactionManager1" class"org.springframework.jdbc.DataSourceTransactionManager"  ... 
Wesley13 Wesley13
4年前
@SessionAttributes 和 @SessionAttribute的区别
@SessionAttributes和@SessionAttribute的区别SpringMVC中有两个长得非常像的注解:@SessionAttributes和@SessionAttribute。我们先看下@SessionAttributes的定义:@SessionAttributes用于在请求之间的HTTPServlet会话中存储m