小编naa*_*eya的帖子

谷歌现在处理whatsapp消息传递

我看到有许多线程

如何在不打开WhatsApp的情况下发送whatsApp消息?

所有答案都会导致以下两种选择:

  1. 打开whatsApp - >选择联系人.意图中设置的消息将发送给该​​联系人.
  2. 打开具有特定联系人的whatsApp - >手动粘贴意图中设置的消息并点击发送.

因此,WhatsApp没有提供直接发送消息以在后台完全联系的选项.

如果是这样,那么GoogleNow如何能够获得whatsApp的这个不可用的服务?

如果它是在谷歌或whatsApp中打开的新服务,我可以获得指针,以便我可以在我的应用程序中使用它吗?

android android-notifications whatsapp google-now

13
推荐指数
1
解决办法
1582
查看次数

如何在带有maven的WAR,WEB-INF/lib目录中包含特定的jar

这是我的pom.xml,试图在WEB-INF/lib目录中创建一个包含特定3个库的WAR文件.

我将它们包含在<packagingIncludes>标记中,并将它们打包在lib目录中,但所有.class文件都被忽略.

我无法使用,<packagingExcludes>因为依赖项目有许多第三方罐子,并且不受我的控制.

这里有什么问题,或者有什么方法可以忽略除3个特定罐子外的所有罐子?

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>1.0</modelVersion>
<parent>
    <groupId>frmId</groupId>
    <artifactId>frm</artifactId>
    <version>1.5.9</version>
</parent>
<artifactId>frmw</artifactId>
<packaging>war</packaging>
<build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </resource>
    </resources>
    <plugins>
    <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <warSourceDirectory>src/main/webapp</warSourceDirectory>
                <packagingIncludes>WEB-INF/lib/frm-fl*.jar,WEB-INF/lib/frm-bean*.jar,WEB-INF/lib/frm-facade-${ffm.fpi.version}.jar</packagingIncludes>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.fortify.ps.maven.plugin</groupId>
            <artifactId>sca-maven-plugin</artifactId>
             <version>${maven-sca-plugin.version}</version>
        </plugin>
    </plugins>
</build>
<dependencies>
    <dependency>
        <groupId>com.fi.ps</groupId>
        <artifactId>frmc-fl</artifactId>
        <version>${project.version}</version>
    </dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)

java maven-plugin maven

6
推荐指数
1
解决办法
2万
查看次数

docker-compose 命令不适用于 Mac

我按照这里的说明安装了 docker,从 docker-hub 下载

https://docs.docker.com/docker-for-mac/install/
Run Code Online (Sandbox Code Playgroud)

但是当我运行时出现docker-compose此错误

pyenv: docker-compose: command not found

The `docker-compose' command exists in these Python versions:
3.6.5/envs/myenv
Run Code Online (Sandbox Code Playgroud)

此外,docker-compose 在 /Users 下可用

which docker-compose
/Users/<username>/.pyenv/shims/docker-compose
Run Code Online (Sandbox Code Playgroud)

在此链接中,不需要明确安装 docker-compose for mac,因为它是 docker for desktop mac 的一部分。

https://docs.docker.com/compose/install/
Run Code Online (Sandbox Code Playgroud)

我的安装有问题吗?

macos docker pyenv docker-compose

6
推荐指数
3
解决办法
4729
查看次数

如何在没有硬编码JNDI名称的情况下配置Java消息驱动Bean和Websphere Activation规范?

我们有一个MDB监听队列读取数据并将数据发送到另一个队列

@MessageDriven(
        activationConfig = { @ActivationConfigProperty(
                propertyName = "destinationType", propertyValue = "javax.jms.Queue"
        ) }, 
        mappedName = "jms/dataQ")
public class DataMDB implements MessageListener {

@Resource(name="jms/dataQueueConnectionFactory")
private ConnectionFactory connectionfactory;

@Resource(name="jms/dataDestinationQ")
private Destination destination;

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

和一个带有bean配置的XML(ibm-ejb-jar-bnd.xml)

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://websphere.ibm.com/xml/ns/javaee"
    xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee   http://websphere.ibm.com/xml/ns/javaee/ibm-ejb-jar-bnd_1_0.xsd"
    version="1.0">

<message-driven name="DataMDB">
        <jca-adapter activation-spec-binding-name="eis/dataListenerMDB"
            destination-binding-name="jms/dataQ" />
        <resource-ref name="jms/dataQueueConnectionFactory"
            binding-name="jms/dataQueueConnectionFactory" />
        <resource-env-ref name="jms/dataDestinationQ"
            binding-name="jms/dataDestinationQ" />
    </message-driven>

</ejb-jar-bnd>
Run Code Online (Sandbox Code Playgroud)

WebSphere上此MDB的激活规范和激活规范

WAS激活规范

正如我在Google上看到的示例,这是MDB和WAS激活设置的典型示例.

我们这里有一个问题,因为这里看到的所有JNDI名称都是在Java代码anotations和ibm-ejb-jar-bnd.xml文件中硬编码的.

那么有没有一种方法可以将这些JNDI名称带到EJB项目之外,因此我们可以为所有客户构建一个项目,并且客户可以自由地拥有其标准JNDI名称.

另外,我们必须为每个客户建立不同的.ear,这是不理想的.

在此先感谢大家.欢迎任何想法.

ejb jndi message-driven-bean websphere-8

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

WebSphere Application Server JVM参数未正确读取

我们使用WebSphere 7-Application服务器来部署项目,这个应用程序服务器给出了像这样的简单JVM参数,

–Dsecurityresource=/web/sharedLibraries/security_config.xml -DConfig=/web/properties/Config.ini
Run Code Online (Sandbox Code Playgroud)

但是当尝试启动应用程序服务器时,会抛出本机错误(native_stderr.log),因为

<?xml version="1.0" ?>

<verbosegc version="GA24_Java6_SR15_20131016_1337_B170922_CMPRSS">

<initialized>
  <attribute name="gcPolicy" value="-Xgcpolicy:optthruput" />
  <attribute name="maxHeapSize" value="0x100000000" />
  <attribute name="initialHeapSize" value="0xc0000000" />
  <attribute name="compressedRefs" value="true" />
  <attribute name="compressedRefsDisplacement" value="0x0" />
  <attribute name="compressedRefsShift" value="0x3" />
  <attribute name="pageSize" value="0x10000" />
  <attribute name="requestedPageSize" value="0x10000" />
</initialized>

Exception in thread "main" java.lang.NoClassDefFoundError: Dsecurityresource=.web.sharedLibraries.security-config.xml
Caused by: java.lang.ClassNotFoundException: Dsecurityresource=.web.sharedLibraries.FalconCluster.security-config.xml
    at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:677)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
</verbosegc>
Could not find the main class: Dsecurityresource=/web/sharedLibraries/security-config.xml.  Program will exit.
Run Code Online (Sandbox Code Playgroud)

JVM参数在WebSphere中的以下位置给出.

Servers > Server Types > WebSphere …
Run Code Online (Sandbox Code Playgroud)

java jvm noclassdeffounderror jvm-arguments websphere-7

3
推荐指数
1
解决办法
1万
查看次数