我正在尝试在Spring Boot网站上调整REST控制器示例.不幸的是,当我尝试访问localhost:8080/itemURL 时,我遇到以下错误.
{
"timestamp": 1436442596410,
"status": 404,
"error": "Not Found",
"message": "No message available",
"path": "/item"
}
Run Code Online (Sandbox Code Playgroud)
POM:
<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>4.0.0</modelVersion>
<groupId>SpringBootTest</groupId>
<artifactId>SpringBootTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<javaVersion>1.8</javaVersion>
<mainClassPackage>com.nice.application</mainClassPackage>
<mainClass>${mainClassPackage}.InventoryApp</mainClass>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${javaVersion}</source>
<target>${javaVersion}</target>
</configuration>
</plugin>
<!-- Makes the Spring Boot app executable for a jar file. The additional configuration is needed for the cmd: mvn spring-boot:repackage
OR mvn spring-boot:run -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>${mainClass}</mainClass>
<layout>ZIP</layout>
</configuration>
<executions>
<execution>
<goals> …Run Code Online (Sandbox Code Playgroud) 在计划外系统重新启动后,我的所有Notepad ++ temp(和未保存的)选项卡都消失了.
我将来如何避免这种情况?我不想用文件名显式保存每个临时文件.
是否有NP ++插件,每当我编辑活动标签或每隔X分钟时,它会保存我的会话?
或者是NP ++的等效(和舒适)编辑器,它自动自动存储它的会话?
关于Jenkins中的Java Builds我遇到了问题.
我解决的错误如下:
Unable to locate the Javac Compiler in:
C:\Jenkins\jre\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
我JDK1.6和JDK1.7项目,所以我需要两个JDK安装.对于我的默认Java JDK,我使用1.6作为JAVA_HOME变量,指向C:\Program Files\Java\jdk1.6.0_45.对于1.7版本也是如此,但是在一个单独的变量(JAVA_HOME7)中.该PATH变量包含\bin两个JDK版本的附加内容.
在Jenkins中,我还为JDK添加了两个版本,并添加了辅助变量.如果我为项目设置具体版本(例如JDK1.7),那么它的构建没有任何问题.不幸的是,我有很多构建项目,所以手动设置它会很费时间.
我不明白错误路径的调用或变量在C:\Jenkins\jre\..\lib\tools.jar哪里设置以及我可以在哪里修改它...
詹金斯版本:1.509.4
任何提示或建议如何解决这个问题?
我有一个关于以下场景的问题.当我对图像进行后期处理时,我获得了一个轮廓,不幸的是两次连接,如您在底线所示.为了明确我想要的只是外线.因此我放大并标记了线条,我想要大图像.

我想从这个选择中得到的只是外面部分,我在下一张图片中标记为绿色.对不起我糟糕的绘画技巧.;)

我正在使用MatLab和IPT.所以我也尝试了解bwmorph和hbreak选项,但它引发了一个错误.
我该如何解决这个问题?如果你成功了,请告诉我一些关于它的事情吗?先感谢您!
诚挚
matlab octave morphological-analysis mathematical-morphology
我有一个浮点指针(数组),代表一个图像.它的元素数量和索引的宽度*高度.图像不像矩阵,它的原点在左上角.相反,它的原点位于左下方,就像在carthesian坐标系中一样.达到最大宽度后,它开始在左侧的下一行.
所以我想有效地将这个数组转换为2D矩阵(可选:opencv).
我该如何以良好有效的方式做到这一点?我该如何将其转换回来?
提前致谢.
我已经找到了可能的解决方案,该解决方案在https://dzone.com/articles/using-markdown-syntax-javadoc中进行了描述,该解决方案基于https://github.com/Abnaxos/pegdown-doclet。这使得markdown支持可以替代用Javadoc编写丑陋的HTML标签。
在GitHub页面上,还有一个“ markdown-compatible-tooltip”解决方案作为使用IntelliJ中的CTRL + Q工具提示的插件,效果很好,达到50%。
仅举一个例子,Javadoc当前的外观:
/**
* This enum gives you insight for various person characteristics.
* <p>
* This could be the following:
* <ul>
* <li>introvert</li>
* <li>extrovert</li>
* </ul>
*/
public enum PersonTypes {
...
}
Run Code Online (Sandbox Code Playgroud)
因此,如果您将工具提示/鼠标悬停在IDE中的类上就可以了。但是,由于HTML标记和其他宏的原因,如果您直接位于相关类中,则很难阅读。这只是一个非常简单的示例,没有任何Javadoc特定的宏。
因此,如上文网站所述,我想直接用源代码中的Markdown语法替换Javadoc内容。应用于示例,这看起来像:
/**
* This enum gives you insight for various person characteristics.
*
* This could be the following:
*
* - introvert
* - extrovert
*
*/
public enum PersonTypes {
...
}
Run Code Online (Sandbox Code Playgroud)
PersonTypes …
对于C++或C#中的optaplanner/drools planner,是否有类似的替代品?我只发现了2007年的一个非常古老的C#端口.或者你如何解决C++/C#中的NP-hard优化问题?
c++ optimization constraint-programming drools-planner optaplanner
关于Spring Boot REST Controller的单元测试,我遇到了@RequestMapping和应用程序属性的问题。
@RestController
@RequestMapping( "${base.url}" )
public class RESTController {
@RequestMapping( value = "/path/to/{param}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE )
public String getStuff( @PathVariable String param ) {
// implementation of stuff
}
}
Run Code Online (Sandbox Code Playgroud)
我正在使用该应用程序的多个配置文件,因此有多个application-{profile}.properties文件。在每个文件中,base.url都会设置并显示属性值。我还有一个不同的Spring Context Configuration进行测试,只有一个Bean与生产版本有所不同。
我的单元测试使用JUNit和Mockito / RestAssured如下所示:
@ActiveProfiles( "dev" )
@RunWith( SpringJUnit4ClassRunner.class )
@SpringApplicationConfiguration( classes = SpringContextConfigTest.class )
public class RESTControllerTest {
private static final String SINGLE_INDIVIDUAL_URL = "/query/api/1/individuals/";
@InjectMocks
private RESTController restController;
@Mock
private Server mockedServer; // needed for …Run Code Online (Sandbox Code Playgroud) 我试图理解Matlab中的2D和3D绘图功能,关于图像处理过滤器,如盒子图,高斯,墨西哥帽等等......
我只获得了过滤器的内核,例如带有每个单元的系数的5x5矩阵.ezsurfc不会工作,我不明白.冲浪而不是工作,但我不知道网格,以及如何使其更细粒度和光滑?
我对冲浪的理解是,我需要为每个参数提供相同的尺寸,那么如何在不使我的内核成为20x20甚至更大的情况下进行操作呢?我的想法是,我得到了一个类似于示例的输出,我发布了.我提到过滤器的20x20网格掩模,因为它看起来平滑度和扁平化需要的系数多于5x5 ...我是对还是完全错了?
我已经尝试了以下matlab代码,laplace过滤器的示例:
[x,y] = meshgrid(1:1:5); %create a 5x5 matrix for x and y (meshes)
z = [0 1 2 1 0; 1 3 5 3 1;2 5 9 5 2; 1 3 5 3 1;0 1 2 1 0]; % kernel 5x5
surf(x,y,z);
Run Code Online (Sandbox Code Playgroud)
这给了我输出:

那么如何从5x5内核信息中生成精细的粒度2D和3D图?非常感谢提前!
PS:希望我的代码缩进不会搞砸......否则随意编辑 - 这是我在StackOverflow上的第一篇文章.:-)
我想得到的,就像这两个例子:

java ×4
c++ ×2
matlab ×2
rest ×2
spring-boot ×2
convolution ×1
eclipse ×1
javadoc ×1
jenkins ×1
markdown ×1
maven ×1
notepad++ ×1
octave ×1
opencv ×1
optaplanner ×1
optimization ×1
plot ×1
plugins ×1
spring ×1
text-editor ×1
unit-testing ×1