LMLPHP后院

spring boot jpa 多个数据源配置

ory", transactionManagerRef = "barTransactionManager", basePackages = { "com.lmlphp.nb.domain.p" }) public class BarConfig { @Bean(name = "barDataSource") @ConfigurationProperties(prefix="bar.datasource") p...

Spring Boot Jpa 使用原生 SQL 和动态分页

使用 Jpa 分页报个错:Cannot use native queries with dynamic sorting and/or pagination in method public abstract org.springframework.data.domain.Page Jpa 的原生 SQL 对命名没有严格的要求,如下示例:package com.lmlphp.test; import org.s...

PHP 5.5 新特性关键字 yield

ator 类中的方法拥有和 Iterator 接口一样的语义,但是生成器对象有一个特殊的方法: send()。 <?php class Generator implements Iterator { public function rewind(); // 返回到迭代器的第一个元素。 public function valid(); // 返回false如果迭代器已经关闭,否则返回true public fu...

springboot mybatis 多数据源配置

tis.bar.mapper", "com.lmlphp.nb.mybatis.bar.model"}, sqlSessionFactoryRef = "barSqlSessionFactory") public class MybatisBar { @Value("${bar.datasource.url}") private String url; @Value("${bar.datasource.use...

PHP5.3新特性static与self区别

called class in a context of static inheritance. 该功能相当于 get_class($this); 。如下代码示例: <?php class A { public static function who() { echo __CLASS__; } public static function test() { static::who(); // Here co...

PHP数组式访问接口ArrayAccess

j['index'] = $value, unset($obj['index']) 时,会分别触发这些方法。接口摘要如下: <?php ArrayAccess { /* 方法 */ abstract public boolean offsetExists ( mixed $offset ) abstract public mixed offsetGet ( mixed $offset ) abstract p...

解决 springboot Interceptor @Autowired null

y; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration public class InterceptorConfig extends WebMvcConfigurerAdapter { @Override public void addInterceptors(Int...

Laravel框架之Migration使用教程

isan make:migration add_columnName_to_tableName_table --table=tableName up down 方法的常用写法: // 连接其他数据库 public function up() Schema::connection('name_dw')->create('dw_team_main_community_daily', function (Bluep...

使用PHP包管理器Composer创建LMLPHP项目

composer require leiminglin/lmlphp 下载后生成如下目录结构: composer.json composer.lock vendor 比如我们将 WEB 目录命名为 public,就放在当前目录下,在 public 目录下创建 index.php 文件,内容如下: <?php require __DIR__.'/../vendor/autoload.php'; define(...

Linux下screen命令使用教程

ogram is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any lat...
2024-04-26 21:50:39 1714139439 0.022665