int s = 3 ; System.out.println(s ==0 ? "一般" : s ==1 ? "不满意" : s == 2 ? "满意" : s ==3 ? "超棒!" : "未知"); 输出 "超棒!"; ...
分类:
编程语言 时间:
2020-07-14 13:43:35
阅读次数:
67
Spring-AOP 代理模式基本概念 为什么要学习代理模式,因为AOP的底层机制就是动态代理! 代理模式: 静态代理 动态代理 学习aop之前 , 我们要先了解一下代理模式! 静态代理 静态代理角色分析 抽象角色 : 一般使用接口或者抽象类来实现 真实角色 : 被代理的角色 代理角色 : 代理真实 ...
分类:
编程语言 时间:
2020-07-14 11:52:22
阅读次数:
64
mbp 启停查询ssh sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist sudo launc ...
分类:
其他好文 时间:
2020-07-14 11:50:09
阅读次数:
62
基本知识:JDK动态代理是java.lang.reflect.*包提供的方式,它必须借助一个接口才能生成代理对象. 步骤: 1、首先建一个接口类,并提供一个实现类: public interface ISubject { public int add(int a, int b); } public ...
分类:
编程语言 时间:
2020-07-14 01:03:22
阅读次数:
100
在使用ajax发送请求时,如果发送的JSON数据是一个类中的不同属性,在Controller方法中使用@RequestBody会直接封装进该类中 例如: 前端部分代码 JavaScript 1 <script language="JavaScript"> 2 function login(){ 3 ...
分类:
编程语言 时间:
2020-07-13 21:28:14
阅读次数:
259
gcc get.c -o get -lpthread #include <unistd.h>#include <stdlib.h>#include <fcntl.h>#include <sys/types.h>#include <semaphore.h>#include <stdio.h>int m ...
分类:
其他好文 时间:
2020-07-13 21:19:06
阅读次数:
104
String str5 = "293陕西力拓888"; System.out.println(str5.startsWith("293")); System.out.println(str5.endsWith("888")); if(str5.startsWith("293")) { System. ...
分类:
其他好文 时间:
2020-07-13 18:25:51
阅读次数:
48
在学习Java的时候经常看到说通过Final修饰的东西是不可以修改的 那么今天我们来看下通过Final修饰的字符串可能修改嘛 final String s = "abc"; 目的是将它修改成akc,就是修改了中间的字符 到这里大家先回顾下学习反射的知识,在编写一个类的时候,每 个类里面都是有属性存在 ...
分类:
其他好文 时间:
2020-07-13 16:48:31
阅读次数:
97
1.前言 JDK (Java Development Kit)是由Sun公司提供给Java程序猿的开发工具包,处理提供必要的运行环境,主要的的提供工具是编译和运行,也就是javac 和 java。 2.使用javac 和java 前提:JDK的系统环境配置完好 测试:一个入门java程序:Hello ...
分类:
其他好文 时间:
2020-07-13 15:33:21
阅读次数:
85
使用 Navicat for MySQL 通过跳板机登录 Mysql 时(使用 SSH 通道) 报错如下: SSH : Expected key exchange group packet from Server 一直处于正在连接状态,无响应 连接属性配置: 配置确认没有错误,实际上需要在跳板机上的 ...
分类:
其他好文 时间:
2020-07-13 15:24:15
阅读次数:
194