当我声明名称中带有点的 ENV 变量时,它们设置不正确。对于我要进行 dockerizing 的框架,需要设置此变量:
framework.config.location
Run Code Online (Sandbox Code Playgroud)
Dockerfile
ENV JAVA_HOME=/opt/java/jre1.8 \
framework.config.location=$HOME/framework/config
RUN echo $framework.config.location && \
cd $framework.config.location
Run Code Online (Sandbox Code Playgroud)
.config.位置
/bin/sh: 1: cd: 无法 cd 到 .config.location
我从指定我的REST API的yaml文件生成Java 8代码。使用一些我想摆脱的sw大批注生成的模型。有可能吗?也许在不久的将来有可能吗?
其余模型将通过Camle路线行驶,因此我想使用jaxrs注释(如果有)。
我正在使用openapi 3.0.0版本,所以我必须使用最新的swagger maven codegen插件(我在maven存储库中找到了3.0.0-rc1)
我只是不想在类中大张旗鼓地使用特定的注释。我用了:
<generateModelDocumentation>false</generateModelDocumentation>
Run Code Online (Sandbox Code Playgroud)
生成的模型:
import io.swagger.annotations.ApiModel; //THIS IS NOT COMPILING and i dont need annotated models, just simple pojo classes or maybe some jaxb annotations instead swagger specific..
import io.swagger.annotations.ApiModelProperty;
/**
* The requested data to the service.
*/@ApiModel(description = "The requested data to the service.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.java.JavaClientCodegen", date = "*****")
public class MyCustomRequest {
........
}
Run Code Online (Sandbox Code Playgroud)
pom.xml插件:
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>3.0.0-rc1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/swagger/MyCustomSpecification.yaml</inputSpec>
<language>java</language>
<configOptions>
<dateLibrary>java8</dateLibrary> …Run Code Online (Sandbox Code Playgroud) 问题
项目使用 RMI 时 Spring 4.3.3 和 Java 8 的问题。应用程序在使用 RMI 向其他应用程序发送事件时抛出异常。它运行良好(应用程序已有几年历史)但在 Weblogic 服务器上安装了一些补丁后它坏了。
编码
应用程序使用 spring-context
org.springframework.context.support.AbstractApplicationContext
private void publishEvent(final ApplicationEvent event) {
taskExecutor.submit(new Runnable() {
@Override
public void run() {
publisher.publishEvent(event);
}
});
}
Run Code Online (Sandbox Code Playgroud)
日志
> 2019-10-01 10:42:14,366 ERROR .c.b.i.i.ImportServiceImpl - An unexpected error occurred during the synchronous import process.
org.springframework.remoting.RemoteLookupFailureException: Lookup of RMI stub failed; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.InvalidClassException: filter status: REJECTED
at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.java:215)
at org.springframework.remoting.rmi.RmiClientInterceptor.getStub(RmiClientInterceptor.java:237)
at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:258)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) …Run Code Online (Sandbox Code Playgroud)