小编JDG*_*ide的帖子

Tomcat是否需要JDK或JRE?

我读过很多与Tomcat和Java运行时相关的文章和帖子.我很困惑,需要帮助.任何人都可以清楚我对Tomcat是否需要JDK或JRE的疑问?

提前致谢.

tomcat java-ee

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

如何禁用RabbitMQ默认tcp监听端口 - 5672

我已经为RabbitMQ rabbitmq.config文件配置了新的端口号,即带有SSL的5671.

现在我要禁用默认端口,即5672.

配置文件如下: -

[
  {rabbit, [
     {ssl_listeners, [5671]},
     {ssl_options, [{cacertfile,"/ay/app/xxx/softwares/rabbitmq_server-3.1.1/etc/ssl/cacert.pem"},
                    {certfile,"/ay/app/xxx/softwares/rabbitmq_server-3.1.1/etc/ssl/cert.pem"},
                    {keyfile,"/ay/app/xxx/softwares/rabbitmq_server-3.1.1/etc/ssl/key.pem"},
                    {verify,verify_peer},
                    {fail_if_no_peer_cert,false},

                   {ciphers,[{dhe_rsa,aes_256_cbc,sha},
 {dhe_dss,aes_256_cbc,sha},
 {rsa,aes_256_cbc,sha}]}

                    ]

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

现在它在端口5671和5672上工作.但是我需要禁用端口5672.给出一些意见或建议.

提前致谢.

rabbitmq

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

无法垃圾收集所需数量的图像。想要释放 6283487641 字节,但释放了 0 字节

我搜索了很多网站和文章,但没有找到完美的答案。我正在使用eks 版本 1.18。我可以看到一些 Pod 被“驱逐”,但是当尝试检查节点时,我可以看到错误“(从类似事件组合):无法垃圾收集所需数量的图像。想要释放 6283487641 字节,但释放了0 字节”。

有什么办法可以找到失败的原因吗?或者如何解决这个问题?任何建议都是非常受欢迎的。

在此输入图像描述

我可以看到磁盘“覆盖”文件系统在几个小时内几乎已满。我不确定发生了什么事。下面的屏幕截图显示了我的内存利用率。

在此输入图像描述

amazon-ec2 nodes kubernetes amazon-eks eksctl

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

什么是JAVA的POJO和DOJO?

我对POJO有很多怀疑.用一个小例子寻求一个清晰的定义.

java pojo

12
推荐指数
2
解决办法
9万
查看次数

在java中查找两个给定日期之间的所有月份名称

我需要两个给定日期之间的所有月/年名称.我需要这个仅仅放在java上.

示例:

Input Date:

    date 1- 20/12/2011 
    date 2- 22/08/2012

Now ,my expected result should be :- 

        Dec/2011
        Jan/2012
        Feb/2012
        Mar/2012
        Apr/2012
        May/2012
        Jun/2012
        Jul/2012
        Aug/2012
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮助我.提前致谢.

java

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

NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor

我是Spring和hibernate的新手.我不知道我在哪里做错了.我使用spring 4.0.2和Hibernate 3与eclipse和tomcat.

项目结构: -

在此输入图像描述

图书馆

在此输入图像描述

在web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>SimpleSpringHibApp</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>


   <!-- Spring Functionality -->


    <servlet>
        <servlet-name>Employee</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Employee</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/Employee-servlet.xml</param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
  </web-app>
Run Code Online (Sandbox Code Playgroud)

员工-servlet.xml中

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:lang="http://www.springframework.org/schema/lang"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
        http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">


   <context:component-scan base-package="com.manoj.springprac" />

   <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
      <property name="prefix" …
Run Code Online (Sandbox Code Playgroud)

java hibernate spring-mvc

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

我们可以从Servlet中的destroy()方法调用service()方法吗?

这是我几天前遇到的面试问题之一:

是否可以从中调用该service()方法destroy()

提前致谢.

java methods service servlets java-ee

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

无法启动RabbitMQ

我用Google搜索了这么多,没有得到任何正确答案.所以,我发布这个问题以获得更好的结果.

我已经杀了RabbitMQ服务器进程.

现在当我试图再次启动它时,它显示出来了

命令

rabbitmqctl start_app
Run Code Online (Sandbox Code Playgroud)

错误

{error_logger,{{2013,11,4},{11,26,8}},"Cookie file /ngs/app/ttet/.erlang.cookie must be accessible by owner only",[]}
{error_logger,{{2013,11,4},{11,26,8}},crash_report,[[{initial_call,{auth,init,['Argument__1']}},    {pid,<0.18.0>},{registered_name,[]},{error_info,{exit,{"Cookie file /ngs/app/curot/.erlang.cookie must be accessible by owner only",[{auth,init_cookie,0,[{file,"auth.erl"},    {line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,297}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},    {line,227}]}]},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,321}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.16.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,24},{reductions,401}],[]]}
{error_logger,{{2013,11,4},{11,26,8}},supervisor_report,[{supervisor,{local,net_sup}},        {errorContext,start_error},{reason,{"Cookie file /ngs/app/ttet/.erlang.cookie must be accessible by owner only",[{auth,init_cookie,0,[{file,"auth.erl"},{line,285}]},{auth,init,1,[{file,"auth.erl"},{line,139}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,297}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{offender,[{pid,undefined},{name,auth},{mfargs,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2013,11,4},{11,26,8}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2013,11,4},{11,26,8}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}
Run Code Online (Sandbox Code Playgroud)

崩溃转储被写入: erl_crash.dump

Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
Run Code Online (Sandbox Code Playgroud)

Erlang在跑 .是否需要杀死Erlang进程.

[ttet@addr:17.566.98.656 Erlang]$:/ngs/app/ttet> ps -ef | grep erlang
ttet    13813 10547  0 11:57 pts/0    00:00:00 grep erlang
ttet    32155     1  0 Oct08 ?        00:00:14 …
Run Code Online (Sandbox Code Playgroud)

rabbitmq erl

7
推荐指数
2
解决办法
5665
查看次数

线程"main"中的异常java.lang.UnsatisfiedLinkError"

当我运行智能卡读取程序时会出现此异常.我的设备未连接.请帮我.

java smartcard

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

字符串常量池 vs 字符串池

我对这两件事感到困惑。我需要帮助。请消除我的疑问,字符串常量池和字符串池是否是同一个概念。我在面试时遇到了这个问题。我已经阅读了很多网站和博客,但我的疑问没有消除。请消除我的疑虑。

提前致谢。

java

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

Maven Release Build Skip测试用例失败 - Jenkins

我正面临使用maven发布版本的Jenkins构建问题.原因是测试用例失败了.我试图跳过测试用例,但是它失败了.

我詹金斯设置的屏幕截图: -

在此输入图像描述

记录: -

    ationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testReadNotCancelled(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testReadNotCancelledNullReturn(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testSaveUserPasswordReset(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource
  testSaveUserPasswordChange(uk.com.xxx.yyy.sdp.bizservice.user.domain.dao.UserDaoIntegrationTest): org.springframework.mock.jndi.SimpleNamingContext cannot be cast to org.apache.commons.dbcp.BasicDataSource

    Tests run: 232, Failures: 1, Errors: 135, Skipped: 3

    [ERROR] There are test failures.
Run Code Online (Sandbox Code Playgroud)

有什么我想念的,请建议.任何意见将是有益的.请帮帮我.

maven maven-release-plugin jenkins

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

java.lang.ClassNotFoundException:org.springframework.expression.ExpressionParser

我是春天的新手,不知道我在哪里弄错了.我正在使用带有eclipse和tomcat的spring 4.0.2 jar.

所有Jar文件:

spring-aop-4.0.2.RELEASE
spring-beans-4.0.2.RELEASE
spring-context-4.0.2.RELEASE
spring-context-support-4.0.2.RELEASE
spring-core-4.0.2.RELEASE
spring-jdbc-4.0.2.RELEASE
spring-jms-4.0.2.RELEASE
spring-orm-4.0.2.RELEASE
spring-test-4.0.2.RELEASE
spring-tx-4.0.2.RELEASE
spring-web-4.0.2.RELEASE
spring-webmvc-4.0.2.RELEASE
commons-logging-1.1.3
Run Code Online (Sandbox Code Playgroud)

的index.jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
  <h2>Spring Home Page</h2>

  <form name="frmTravel" method="get" action="/SimpleSpringApp/travell">
    Travel Name : <input type="text" name="tvlName" />
    <input type="submit" value="Submit"/>
  </form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

的success.jsp:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" …
Run Code Online (Sandbox Code Playgroud)

java spring-mvc

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

NSIS安装后如何创建桌面和开始菜单的快捷方式?

在此输入图像描述

我是 NSIS 新手。我正在尝试在安装后(即完成页面之前)添加以下页面样式。有人可以建议,我们是否可以做一个自定义页面并添加必要的复选框、单选按钮和程序组?或任何其他建议。

以下是我的页面顺序:

!insertmacro MUI_PAGE_DIRECTORY
  
  ;Custom page for selecting service name to restart.
  Page custom nsDialogsSelectService ngDialogSelectServicePageLeave 
  
  ; variable and text for the app data dir
  !define MUI_DIRECTORYPAGE_VARIABLE $appDataDir
  !define MUI_PAGE_HEADER_TEXT "Choose Data Directory"
  !define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which to install application data for ${PRODUCT_FULL} ${PVERSION}."
  !define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will install data directory need todo.  To install in a different folder, click Browse and select another folder.  Click Next to Continue."
  !define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Destination Folder"
  !insertmacro MUI_PAGE_DIRECTORY …
Run Code Online (Sandbox Code Playgroud)

nsis modern-ui

0
推荐指数
1
解决办法
1486
查看次数