小编Tob*_*ias的帖子

从数组中删除元素(Java)

是否有任何快速(和漂亮的)方式从Java中删除数组中的元素?

java arrays element

141
推荐指数
6
解决办法
83万
查看次数

svn:MKACTIVITY 403禁止

我在尝试提交到svn存储库时遇到此错误:

svn: MKACTIVITY of '/svn/Demo/!svn/act/e2e65cfa-...4165f': 403 Forbidden (http://svn....com:8088)
Run Code Online (Sandbox Code Playgroud)

知道为什么吗?我google了很多,但找不到适合我的解决方案.

svn

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

在Eclipse中搜索JavaDoc

有没有办法只在javadoc注释中搜索(通过Eclipse)?我只是想在javadoc评论中找到文字...

eclipse search javadoc

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

Spring MVC还是Wicket?

我对Spring MVC有很长的(并且很满意)经验,但最近我对Wicket感兴趣.

我的问题还在于如何处理(使用Wicket)DI,事务管理,JDBC连接以及所有这些内容?可以将Springsource套件的某些部分与Wicket混合使用吗?Wicket&Weld?Wicket&Guice?

wicket spring-mvc

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

JSF:重定向到url作为POST而不是GET

我有一个JSF页面,通过context.getExternalContext().redirect(url);url的位置重定向.喜欢login.jsf?token = foobar

我现在想要的是通过POST而不是通过GET请求发送令牌.所以它没有出现在url中,JSF可以实现吗?

jsf post redirect get request

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

在Eclipse中查找和替换文本

我正在使用eclipse IDE.我需要通过将文本generate ="always"替换为generate ="never"来修改数千个hbm.xml文件.请告诉我最简单的方法.

eclipse replace

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

Spring Boot Admin使用HTTP而不是HTTPS Actuator端点

在Spring Boot Admin(SBA)服务器上注册后,客户端的一些执行器得到了解决,http://springapplication.com/actuator而不是https://springapplication.com/actuator.为什么它将端点更改为HTTP并且不会保留在HTTPS?可定制吗?

这是一些日志和Java/YML文件.

日志:

2018-07-02 06:13:27.683  INFO 3194 --- [-client-epoll-7] d.c.b.a.server.services.StatusUpdater    : Couldn't retrieve status for Instance(id=0d47f12b0a94, version=57, registration=Registration(name=springbootapplication-Name, managementUrl=https://springbootapplication.com/actuator, healthUrl=https://springbootapplication.com/actuator/health, serviceUrl=https://springbootapplication.com, source=http-api), registered=true, statusInfo=StatusInfo(status=UP, details={}), statusTimestamp=2018-07-02T05:06:08.423Z, info=Info(values={}), endpoints=Endpoints(endpoints={httptrace=Endpoint(id=httptrace, url=http://springbootapplication.com/actuator/httptrace), flyway=Endpoint(id=flyway, url=http://springbootapplication.com/actuator/flyway), loggers=Endpoint(id=loggers, url=http://springbootapplication.com/actuator/loggers), health=Endpoint(id=health, url=https://springbootapplication.com/actuator/health), env=Endpoint(id=env, url=http://springbootapplication.com/actuator/env), heapdump=Endpoint(id=heapdump, url=http://springbootapplication.com/actuator/heapdump), scheduledtasks=Endpoint(id=scheduledtasks, url=http://springbootapplication.com/actuator/scheduledtasks), mappings=Endpoint(id=mappings, url=http://springbootapplication.com/actuator/mappings), beans=Endpoint(id=beans, url=http://springbootapplication.com/actuator/beans), configprops=Endpoint(id=configprops, url=http://springbootapplication.com/actuator/configprops), threaddump=Endpoint(id=threaddump, url=http://springbootapplication.com/actuator/threaddump), metrics=Endpoint(id=metrics, url=http://springbootapplication.com/actuator/metrics), conditions=Endpoint(id=conditions, url=http://springbootapplication.com/actuator/conditions), auditevents=Endpoint(id=auditevents, url=http://springbootapplication.com/actuator/auditevents), info=Endpoint(id=info, url=http://springbootapplication.com/actuator/info), jolokia=Endpoint(id=jolokia, url=http://springbootapplication.com/actuator/jolokia)}), buildVersion=null)
Run Code Online (Sandbox Code Playgroud)

Application.yml(服务器):

server:
  port: 5100
spring: 
  security:
    user:
      name: admin
      password: password
Run Code Online (Sandbox Code Playgroud)

SecuritySecureConfig.java(服务器):

import org.springframework.context.annotation.Configuration; …
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc spring-boot spring-boot-admin

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

在ant任务中使用eclipse类路径

我想使用Ant来提供JAR文件,如何在Ant任务中使用Eclipse类路径?

Greets,Tobias

java eclipse ant

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

在Java中构造函数之前初始化final变量

有没有在Java构造函数中使用final变量的解决方案?问题是,如果我初始化最终字段,如:

private final String name = "a name";
Run Code Online (Sandbox Code Playgroud)

那么我不能在构造函数中使用它.Java首先运行构造函数然后运行字段.有没有一个解决方案允许我访问构造函数中的最后一个字段?

java variables constructor final initialization

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

在unmarshal期间使用JAXB格式化XML

我想在使用JAXB解组时格式化XML文档.Unmarshal看起来像:

Unmarshaller u = createAndsetUpUnmarshaller(enableValidation, evtHandler, clazz);
return u.unmarshal(new ByteArrayInputStream(stringSource.getBytes()));
Run Code Online (Sandbox Code Playgroud)

编组可以通过以下方式格式化代码:

marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
Run Code Online (Sandbox Code Playgroud)

但是对于unmarchal进程来说这是不可能的......任何想法如何在解组过程中(或之后)使用JAXB格式化XML字符串?

顺便说一下:我在这里看了一些关于漂亮打印的帖子,但我想用JAXB做到这一点!

java xml pretty-print jaxb

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