小编ang*_*okh的帖子

如何在ebean和play 2中使用blob?

这是实体包含blob类型:

@Entity
@Table(name="image_info")
public class ImageInfo extends Model {

    .......

    @Constraints.Required
    private Blob image;

    .......
}
Run Code Online (Sandbox Code Playgroud)

$ play -DapplyEvolutions.default = true run

我收到如下错误:

[warn] c.j.b.ConnectionPartition - BoneCP detected an unclosed connection and will now attempt to close it for you. You should be closing this connection in your application - enable connectionWatch for additional debugging assistance.
[error] c.a.e.s.t.r.ImmutableMetaFactory - Was unable to use reflection to find a constructor and appropriate getters forimmutable type interface java.sql.Blob.  The errors while looking for …
Run Code Online (Sandbox Code Playgroud)

blob ebean playframework-2.0

5
推荐指数
1
解决办法
4297
查看次数

播放html表单以提交带参数的GET请求

我有一个玩GET路线,如何在scala html表单中使用它?

路线

GET  /service/register  controllers.WebRegister.register(plan?="")
Run Code Online (Sandbox Code Playgroud)

scala html

@form(action = routes.WebRegister.register, 'style -> "width: 320px;") {
       <fieldset>
           <input type="hidden" name="plan" value="FREE" id="plan">
       </fieldset>
       <div class="form-actions plan-form peer-btn-center peer-m-v-t">
            <input type="submit" data-icon='&#xe6660;' class="btn btn-primary btn-large" value="Sign Up">
       </div>
}
Run Code Online (Sandbox Code Playgroud)

它给了我一个错误:

在类ReverseWebRegister中缺少方法寄存器的参数; [error]如果要将其视为部分应用函数,请使用"_"跟随此方法

playframework-2.0

5
推荐指数
1
解决办法
6516
查看次数

将项目移动到快速桥接项目后,"LOG_INFO"宏重新定义了警告

我收到了几个这样的警告:

Swift compiler warning:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler

/Myfolder/Pods/Headers/CocoaLumberjack/DDLog.h:176:9: 'LOG_INFO' macro redefined
/Myfolder/Pods/Headers/CocoaLumberjack/DDLog.h:177:9: 'LOG_DEBUG' macro redefined
Run Code Online (Sandbox Code Playgroud)

警告在Projet-Bridging-Header.h中抱怨DDLog.h

#import "DDLog.h"
#import "DDASLLogger.h"
#import "DDTTYLogger.h"
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

objective-c swift xcode6 objective-c-swift-bridge cocoalumberjack

5
推荐指数
1
解决办法
1113
查看次数

5
推荐指数
1
解决办法
1803
查看次数

清理/ var / log / nginx日志文件

我在/ var / log和/ var / log / nginx下有超过10.0G的日志。如何安全清洁?

7.8G / var / log / nginx / custom 2.0G / var / log / nginx 2.0G / var / log

logging nginx

5
推荐指数
1
解决办法
5931
查看次数

无法找到参数lgen的隐式值:shapeless.LabelledGeneric.Aux

我是Shapeless的新手.我有利用了无形的"自动类型类派生"的辅助类(https://gist.github.com/negator/fbbcd1b2ce9a85b762b7)帮我填充JSON读取和写入.

import play.api.libs._
import json._

import shapeless.{ `::` => :#:, _ }
import poly._

object SReads extends LabelledTypeClassCompanion[Reads] {
  object typeClass extends LabelledTypeClass[Reads] {

    def emptyProduct: Reads[HNil] = Reads(_ => JsSuccess(HNil))

    def product[F, T <: HList](name: String, FHead: Reads[F], FTail: Reads[T]) = Reads[F :#: T] {
      case obj @ JsObject(fields) =>
      for {
        head <- FHead.reads(obj \ name)
        tail <- FTail.reads(obj - name)
        } yield head :: tail

        case _ => JsError("Json object required")
      }

    def project[F, G](instance: …
Run Code Online (Sandbox Code Playgroud)

scala sbt shapeless playframework-2.4

5
推荐指数
1
解决办法
793
查看次数

Kubernetes:列出节点的所有 pod 和 pod 状态

我想列出节点的 Pod 和 Pod 雕像,例如。

Node A
Pod1 Status
Pod2 Status

Node B
Pod1 Status
Pod2 Status
Run Code Online (Sandbox Code Playgroud)

我可以使用一个kubectl命令来实现此目的吗?

kubernetes kubectl

5
推荐指数
1
解决办法
1914
查看次数

播放2.3 requireJs优化和shim多个模块

这是我目前为Play 2.2.x requireJS设置的.它会在2.3之后继续工作吗?我在2.3文档中的任何地方都找不到requireJs或requireJsShim.

  requireJs ++= Seq("mainAccount.js", "mainOrg.js", "mainPublic.js"), // This tells Play to optimize this file and its dependencies
  requireJsShim += "build.js", // This tells Play to read the RequireJS "shim" configuration from build.js
  requireJsFolder := "js"
Run Code Online (Sandbox Code Playgroud)

requirejs-optimizer playframework-2.3 sbt-web

4
推荐指数
1
解决办法
2108
查看次数

播放2.4值routesImport不是对象play.Play.autoImport.PlayKeys的成员

从2.3迁移到2.4后,我收到此错误.我应该使用哪种正确的导入声明?

error: value routesImport is not a member of object play.Play.autoImport.PlayKeys
    PlayKeys.routesImport += "se.radley.plugin.salat.Binders._",
Run Code Online (Sandbox Code Playgroud)

我有这些导入声明:

import sbt._
import Keys._
import play.Play.autoImport._
import PlayKeys._
import WebKeys._
Run Code Online (Sandbox Code Playgroud)

playframework-2.4

4
推荐指数
1
解决办法
1597
查看次数

curl命令中-D后的单破折号是什么意思?

-D -是什么意思?我只在 curl 文档中发现了-C -

curl -s -D - \
  -H "Referer:https://yahoo.com" \
  "https://something.com"
Run Code Online (Sandbox Code Playgroud)

curl

4
推荐指数
1
解决办法
801
查看次数