摘要: service iptables stop GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '<root-password>' WITH GRANT OPTION flush privileges; ./nginx -s reload重 阅读全文
posted @ 2018-10-06 14:45 637 阅读(117) 评论(0) 推荐(0) 编辑
摘要: public class LambdaMap { private Map<String, Object> map = new HashMap<>(); @Before public void initData() { map.put("key1", "value1"); map.put("key2" 阅读全文
posted @ 2018-09-18 14:08 637 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 微服务sudo pmset -a GPUSwitch 0 //强制使用集显sudo pmset -a GPUSwitch 1//强制使用独显sudo pmset -a GPUSwitch 2//自动切换模式 阅读全文
posted @ 2018-07-29 19:03 637 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 在测试类上加两个注解 @RunWith(SpringRunner.class) @SpringBootTest public class UserDaoTest { @Autowired private UserDao userDao; @Test public void testAddUser() 阅读全文
posted @ 2018-07-29 17:52 637 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 自定义配置springboot starter的步骤 1、配置一个类,配置类里面需要装配好要提供出去的类 2、使用1️⃣@enable,配置@import注解使用 2️⃣/META-INF、spring.factories 配置 org.springframework.boot.context.pr 阅读全文
posted @ 2018-07-29 07:00 637 阅读(96) 评论(0) 推荐(0) 编辑
摘要: AOP开发流程 1、加入依赖 spring-boot-starter-aop 自动开启AOP支持 2、写一个Aspect,封装横切关注点(日志、监控等),需要配置通知(前置、后置、环绕、异常...)和切入点(那些包的哪些方法等) @Before("execution(* com.lsq.spring 阅读全文
posted @ 2018-07-28 21:55 637 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1、加载驱动 2、配置application.properties spring.datasource.driverClassName=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://192.168.0.104:3306/qiqisx 阅读全文
posted @ 2018-07-28 20:15 637 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 如何优化定制容器 阅读全文
posted @ 2018-07-27 15:39 637 阅读(72) 评论(0) 推荐(0) 编辑
摘要: resource/src/webapp下的文件可以直接访问,以下为四个静态资源的路径,可以通过配置项修改 "classpath:/META-INF/resources/", "classpath:/resources/", "classpath:/static/", "classpath:/publ 阅读全文
posted @ 2018-07-27 11:21 637 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 规定请求方式 RequestMapping(value="/hello" Method=RequestMethod.GET) @RequestMapping(value="/hello" Method="Request.Method.GET") @ResponseBody public String 阅读全文
posted @ 2018-07-26 15:08 637 阅读(88) 评论(0) 推荐(0) 编辑