我在我的Ubuntu OS上使用了2个容器:Gitlab-ce和gitlab-runner
容器名称是:gitlab_gitlab_1和gitlab_gitlab-runner_1
我通过访问我的gitlab应用程序 gitlab.localhost.com:801
我用这个命令成功注册了一个跑步者:
docker exec -it gitlab_gitlab-runner_1 gitlab-runner register --non-interactive --url http://gitlab_gitlab_1 --registration-token _wgMgEx3nBocYQtoi83c --executor docker --docker-image alpine:latest
Run Code Online (Sandbox Code Playgroud)
然后,当我开始工作时,我收到此错误消息:
Running with gitlab-runner 10.7.1 (b9bba623)
on 589a617ee407 12ba77f7
Using Docker executor with image alpine:latest ...
Pulling docker image alpine:latest ...
Using docker image sha256:3fd9065eaf02feaf94d68376da52541925650b81698c53c6824d92ff63f98353 for alpine:latest ...
Running on runner-12ba77f7-project-1-concurrent-0 via 01196621a827...
Cloning repository...
Cloning into '/builds/root/test'...
fatal: unable to access 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.localhost.com/root/test.git/': Could not resolve host: gitlab.localhost.com
ERROR: Job failed: exit code 1
Run Code Online (Sandbox Code Playgroud)
在这两个容器中,我都可以访问主机名gitlab.localhost.com …
我试图用一个布尔字段来保持一个doctrine实体,其值为0或1.
当该属性设置为true时,它将其保存为数据库中的"1".但是当它的'false'或'0'时,它将它保存为数据库中的NULL.
如何解决此问题仅保存为1或0?
我使用的属性的注释如下:
@ORM\Column(name="substitute", type="boolean", nullable=true)
Run Code Online (Sandbox Code Playgroud)
当我将nullable设置为false时,我不能坚持它,因为它仍然想要设置为null.
谢谢
当我坚持它时,字段值为0
尝试1 @ORM\Column(name ="substitute",type ="boolean",options = {"default":"0"}))
错误:无法保存null
尝试2 @ORM\Column(name ="substitute",type ="boolean",nullable = true,options = {"default":"0"}))
不起作用,它仍然在基础上保存null
信息1
实际插入查询试图插入0.但是我收到此错误"ORA-01400:无法插入NULL(\"MYBASE \".\"MYTABLE \".\"SUBSTITUTE \")"
信息2
与另一个实体相同
class TestEntity
{
/**
* @ORM\Column(name="test_entity_id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="substitute", type="boolean")
*/
private $isSubstitute = false;
}
Run Code Online (Sandbox Code Playgroud)
坚持
$test = new TestEntity();
$test->setIsSubstitute(false);
$em->persist($test);
Run Code Online (Sandbox Code Playgroud)
结果
request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\NotNullConstraintViolationException: "An exception occurred while executing 'INSERT INTO TestEntity (test_entity_id, substitute) …Run Code Online (Sandbox Code Playgroud) 我无法使我的验证约束$form->isValid()起作用。即使我输入的长度小于 10,书名也始终有效...
在我的 AppBundle\Resources\config\validation\book.yml 上
AppBundle\Entity\Book:
properties:
bookName:
- NotBlank: ~
- Length:
min: 10
Run Code Online (Sandbox Code Playgroud)
都不来自 formBuilder
$builder->add('bookName', TextType::class, array(
'constraints' => new Length(array('min' => 10))))
Run Code Online (Sandbox Code Playgroud)
这是我的framework.validation配置
framework:
validation: ~
Run Code Online (Sandbox Code Playgroud)
默认配置是
framework:
validation:
enabled: true
enable_annotations: false
Run Code Online (Sandbox Code Playgroud)
需要帮助请。
谢谢
我有一个'产品'列表,我希望将其显示为使用html模板的行表列表.
html模板看起来像:
<tr th:fragment="productTemplate">
<td th:text="${productName}">product name</td>
<td th:text="${productprice}>product price</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
这是我做的:
<table>
<tr th:each="product : ${products}" th:substituteby="product :: productTemplate" th:with="productName=*{name}, productPrice=*{price}" />
</table>
Run Code Online (Sandbox Code Playgroud)
如果我使用th:include,将会嵌套到每个tr
如果我使用th:substituteby,替换具有优先权th:each
我找不到另一种方法来替换我的循环项目.
有人有解决方案吗?
如何在多重选择中绑定枚举列表?
这是我的类属性(使用getter/setter):
private List<Color> colors;
Run Code Online (Sandbox Code Playgroud)
这是我的jsp:
<form:select id="colors" path="colors" multiple="true">
<form:option value="" label="..."/>
<form:options items="${Color.values}" />
</form:select>
Run Code Online (Sandbox Code Playgroud)
我无法将枚举值作为数组,因为它是空的.
谢谢阅读.
我在窗口环境中工作,我在网络上有一个远程git存储库.使用创建
git init --bare
Run Code Online (Sandbox Code Playgroud)
然后我在我的本地克隆项目,我可以继续提交和推送.但是,在某个时刻,我不能再推出以下错误:
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (21/21), 1.93 KiB | 0 bytes/s, done.
Total 21 (delta 15), reused 0 (delta 0)
remote: error: object directory /SERVER/Apps/myApp.git/objects does not exist; check .git/objects/info/alternates.
remote: fatal: unresolved deltas left after unpacking
error: unpack failed: unpack-objects abnormal exit
To //SERVER/Apps/myApp.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to '//SERVER/Apps/myApp.git' …Run Code Online (Sandbox Code Playgroud) 我试图找到一个javascript库来动画元素,就像在这里完成的方式.请查看介绍,然后从顶部菜单中应用一些过滤器,并尝试调整浏览器窗口的大小.
我没有找到任何完成像这样的流体布局的东西.那里使用的那种动画有名字吗?你知道怎么编码吗?
spring ×2
symfony ×2
binding ×1
docker ×1
doctrine ×1
doctrine-orm ×1
enums ×1
git ×1
gitlab-ci ×1
java-ee ×1
javascript ×1
jquery ×1
jsp ×1
networking ×1
php ×1
templates ×1
thymeleaf ×1
validation ×1
windows ×1