我正在尝试在本地计算机上的服务器应用程序(JIRA)前面设置 apache。有点基于: https: //mimiz.github.io/2017/05/18/Configure-docker-httpd-image.html
apache 和服务器应用程序都作为 docker 容器运行。
启动我的服务器应用程序工作正常,我可以访问 web-ui:
http://localhost:8087
Run Code Online (Sandbox Code Playgroud)
但是当我启动 apache 并尝试在浏览器中访问它时:
http://localhost:80
Run Code Online (Sandbox Code Playgroud)
我得到:
Service Unavailable
Run Code Online (Sandbox Code Playgroud)
当我查看日志时,它说:
H00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
[Mon Apr 01 09:08:50.408757 2019] [mpm_event:notice] [pid 1:tid 140140879032384] AH00489: Apache/2.4.38 (Unix) configured -- resuming normal operations
[Mon Apr 01 09:08:50.409320 2019] [core:notice] [pid 1:tid 140140879032384] AH00094: Command line: 'httpd -D FOREGROUND'
[Mon Apr 01 09:09:53.094495 2019] [proxy:error] …Run Code Online (Sandbox Code Playgroud) 根据本指南:
https://docs.opsmanager.mongodb.com/current/tutorial/install-simple-test-deployment/
我正在尝试在OpenShift中运行MongoDB和MongoDB Ops Manager。我已经manged到dockerize的MongoDB和MongoDB操作管理员和MongoDB都运行成功侦听端口27017,在所有接口:
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0
Run Code Online (Sandbox Code Playgroud)
我还设法初始化了MongoDB Ops Manager,这意味着以下步骤已成功完成(包括连接到我的mongodb实例):
Generating new Ops Manager private key...
Starting pre-flight checks
Successfully finished pre-flight checks
Migrate Ops Manager data
Running migrations...[ OK ]
Start Ops Manager server
Instance 0 starting..................[ OK ]
tput: No value for $TERM and no -T specified
Starting pre-flight checks
Successfully finished pre-flight checks
Start Backup Daemon...[ OK ]
Run Code Online (Sandbox Code Playgroud)
但随后突然失败:
tail -f /opt/mongodb/mms/logs/mms0.log
...
2019-04-25T14:30:42.616+0000 [main] INFO com.xgen.svc.mms.svc.ping.PingRequest$Observable …Run Code Online (Sandbox Code Playgroud) 某种程度上基于本指南:
我创建了一个多模块 Maven 项目,其中一个子模块是我的后端,另一个子模块是我的前端。当我首先构建整个项目时,前端是“构建”,然后它的dist/资源被复制到后端,然后构建,我可以成功启动我的 Spring Boot 后端并java -jar target/backend-1.0.0-SNAPSHOT访问它localhost:8080
根据我在后端实现的控制器,这是有意义的:
@RestController
public class GreetingController {
private static final String template = "Hello, %s!";
private final AtomicLong counter = new AtomicLong();
@RequestMapping("/greeting")
public Greeting greeting(@RequestParam(value = "name", defaultValue = "World") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template, name));
}
@RequestMapping("/")
public Greeting root(@RequestParam(value = "name", defaultValue = "Root!") String name) {
return new Greeting(counter.incrementAndGet(), String.format(template, name));
}
}
Run Code Online (Sandbox Code Playgroud)
如果我改为访问:http://localhost:8080/index.html我最终会进入我的 …
我有一个使用hibernate-annotations 3.4.0.GA的maven项目A,它使用slf4j-api 1.5.5版(通过pom.xml文件中的依赖树检查).进一步的项目A将slf4j-log4j12版本1.4.2指定为依赖项.
我有另一个依赖项目A的maven项目B.在项目BI中指定了以下依赖项:
slf4j-api version 1.6.1,
logback-core version 0.9.24
logback-classic version 0.9.24
Run Code Online (Sandbox Code Playgroud)
从命令行使用maven构建良好.但是当我从eclipse启动配置运行项目时,我得到:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/mm/.m2/repository/org/slf4j/slf4j-log4j12/1.4.2/slf4j-log4j12-1.4.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/mm/.m2/repository/ch/qos/logback/logback-classic/0.9.24/logback-classic-0.9.24.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.
SLF4J: Your binding is version 1.5.5 or earlier.
SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x
Run Code Online (Sandbox Code Playgroud)
从这条消息中我指出我需要将项目A中的绑定升级到1.6.x,但是我没有看到它是如何可能的,因为它包含在hibernate依赖项中.
是否可以在运行项目B时切换绑定(更新类路径信息),以便它使用1.6.1版本而不是hibernate项目中的版本?
在插件中,我在plugin.xml文件中定义了一个命令.我想将工具栏中"Open Perspective"按钮的Eclipse默认图像/图标添加到此命令.
在eclipse中,我试图激活Shift+Alt+F1图标上的Plugin-in Spy(),它给出了以下信息:
The contributing plug-in:
org.eclipse.pde.ui (3.6.1.v20110210_r362)
Run Code Online (Sandbox Code Playgroud)
但我找不到该插件中用于指定按钮的图像的任何信息.我看到其他图像使用以下方式指定:
$nl$/icons/obj16/plugin_javasearch.gif
Run Code Online (Sandbox Code Playgroud)
怎么做我:
1)找到用于"Open Perspective"按钮的图标?
2)指定我想在我自己的plugin.xml文件中使用该图标作为我自己的命令?
以下是我目前对命令的定义:
<menuContribution
allPopups="false"
locationURI="base.application.menuContribution1">
<toolbar
id="base.application.perspective">
<command
commandId="openPerspective"
icon=" IWorkbenchGraphicConstants.IMG_ETOOL_NEW_PAGE"
style="push">
</command>
</toolbar>
</menuContribution>
Run Code Online (Sandbox Code Playgroud) 我遵循了这个指南:
http://www.gradle.org/docs/current/userguide/custom_plugins.html
使用以下结构/文件创建独立的gradle插件:
my-gradle-plugin
> src
> main
> java
> com
> mygroup
> MyGradlePlugin.groovy
> build.gradle
> settings.gradle
Run Code Online (Sandbox Code Playgroud)
build.gradle:
apply plugin: 'groovy'
dependencies {
compile gradleApi()
groovy localGroovy()
}
apply plugin: 'maven'
repositories {
mavenCentral()
}
group = 'com.mygroup'
version = '1.0.0-SNAPSHOT'
Run Code Online (Sandbox Code Playgroud)
MyGradlePlugin.groovy:
package com.mygroup
import org.gradle.api.*
class MyGradlePlugin implements Plugin<Project> {
void apply(Project project) {
print " project.name " + project.name + "\n"
print " project.dependencies " + project.dependencies + "\n"
// How do we …Run Code Online (Sandbox Code Playgroud) 我试图在Windows 7上使用org.apache.commons.io版本2.4读取文件到字符串.
String protocol = url.getProtocol();
if(protocol.equals("file")) {
File file = new File(url.getPath());
String str = FileUtils.readFileToString(file);
}
Run Code Online (Sandbox Code Playgroud)
但它失败了:
java.io.FileNotFoundException: File 'C:\workspace\project\resources\test%20folder\test.txt' does not exist
Run Code Online (Sandbox Code Playgroud)
但如果我这样做:
String protocol = url.getProtocol();
if(protocol.equals("file")) {
File file = new File("C:\\workspace\\resources\\test folder\\test.txt");
String str = FileUtils.readFileToString(file);
}
Run Code Online (Sandbox Code Playgroud)
我工作得很好.因此,当我手动键入带有空格/空白的路径时,它可以正常工作,但是当我从URL创建它时它不会.
我错过了什么?
我已经克隆了我的 repo,并希望将我所有的远程分支(origin/*)推送到我配置的新远程。我试过了:
git push anotherRemote --all
Run Code Online (Sandbox Code Playgroud)
但它只会推送我从中制作本地副本的那些。当我输入:
git branch -r
Run Code Online (Sandbox Code Playgroud)
我看到位于我的另一个遥控器上的所有分支(我没有创建本地副本)。我如何将这些推送到我的anotherRemote?
我看过这篇文章:http: //jenkins-ci.org/content/summary-report-git-repository-disruption-incident-nov-10th
它描述了用户意外触发git push --force存储库过时状态的事件.
当然,这需要一些清理来恢复原始状态分支.但是,由于Git从不删除信息,因为据我所知,这种清理过程总是可行的.
所以,即使你重新推出,推入--force(以及其他可能重写历史记录的操作)原始提交仍然在那里,他们只需要找到正确的?
简而言之,git中的任何(破坏性)操作实际上都会删除数据?
我现在已经多次听到过这种情况,Git提供了数据完整性.但是,这是什么意思?
我知道git中的所有对象都是使用SHA-1校验和访问的,并且该校验和是根据文件的内容计算的.这意味着如果文件有更改,您将获得不同的校验和.
但是,它如何提供数据完整性?如果我查找一些基于校验和(密钥)的数据,如果找不到它(如果它已经以某种方式被破坏)将git返回错误.我假设使用git时数据仍然会被破坏 - 磁盘读取错误等.
不要在这里真正看到与SVN的区别,或者在Git中实际上是如何提供数据完整性的.