草庐IT

single-page-application

全部标签

java - 碧 Jade 报告 : How to add font not in the application classpath

我正在尝试使用一种字体,它没有安装在我的本地操作系统上,带有JasperReports。jasper报表是这样使用的:名为Corbel的字体被导出为字体扩展(使用iReport),并包含在我系统的文件夹中的文件(Corbel.jar)中。我使用如下代码将此扩展添加到应用程序的类路径中:ClassLoadercl=newURLClassLoader(newURL[]{newURL("file:///D:/path/to/Corbel_jar_folder/")});param=newHashMap();param.put(JRParameter.REPORT_CLASS_LOADER,c

java - 使用 Java 在 Selenium WebDriver 中使用 PageObjects、Page Factory 和 WebDriverWait

我一直在使用SeleniumWebDriver为我参与的一些项目实现功能测试。我正在尝试将页面对象设计模式与页面工厂一起使用来分解我的定位器。我还创建了一个静态WaitTool对象(单例),它使用可选的超时参数实现了多种等待技术。我当前的问题是我想在PageFactory尝试初始化WebElements之前使用我的等待方法。我想等待的原因是PageFactory可能会在页面元素可用之前尝试初始化页面元素。这是一个示例PageObject:publicclassSignInPageextendsPageBase{@FindBy(id="username")@CacheLookuppriv

java - Spring 安全 : Ignore login page by using a special URL parameter

我目前有一个看起来像这样的设置:spring-security.xml:web.xml:springSecurityFilterChainorg.springframework.web.filter.DelegatingFilterProxyspringSecurityFilterChain/*这一切似乎都按预期工作,但是,在特殊情况下,如果用户传入特殊token,我希望绕过登录页面。因此,目前,如果用户转到诸如/dog之类的url,他们将看到登录页面,如果他们传入foo/bar的凭据,那么他们将登录后看到/dog对应的页面。我希望能够使用诸如/dog?token=abcd这样的URL

java - Spring Data 网页分页 "page"参数不起作用

我正在尝试让SpringData的Web分页正常工作。在这里描述:http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/repositories.html#web-pagination这是我的Java(SpringWebMVC@Controller处理程序方法):@RequestMapping(value="/list",method=RequestMethod.GET)publicStringlist(@PageableDefaults(value=50,pageNumber=0

java.lang.IllegalStateException : Failed to load property source from location 'classpath:/application.yml' 错误

SpringCloud项目出现以下错误。在这个项目中,除了从GIT读取.properties文件外,我没有做任何特别的事情。请指导此处还有哪些需要更正的地方?java.lang.IllegalStateException:Failedtoloadpropertysourcefromlocation'classpath:/application.yml'atorg.springframework.boot.context.config.ConfigFileApplicationListener$Loader.load(ConfigFileApplicationListener.java:

JavaEE6 : using @Asynchronous to speed up the web application. 什么时候?

好想虐@Asynchronous为了加速我的Web应用程序,因此我想更多地了解这一点,以避免错误地使用此注释。所以我知道这个带注释的方法中的业务逻辑将在一个单独的线程中处理,所以用户不必等待。所以我有两种方法可以持久化数据publicvoidpersist(Objectobject){em.persist(object);}@AsynchronouspublicvoidasynPersist(Objectobject){em.persist(object);}所以我有几个场景我想问一下这些场景中的哪一个是不行的1.BisnotdependonAAa=newA();asynPersist

java - IntelliJ 调试 : Suspend whole VM then step on single thread

我正在调试一个有很多线程的应用程序。我的断点设置为暂停整个VM。当线程遇到其中一个断点时,我想使用StepOver。但这似乎会恢复整个虚拟机,直到该步骤完成。如果我可以只步进遇到断点的单个线程,那将非常有帮助。在IntelliJ11.1/Java6中有什么方法可以做到这一点吗?(希望我没有遗漏一些明显的东西......) 最佳答案 此功能已在IntelliJ16中添加(他的回答中引用的CrazyCoder问题已解决)更多细节在这里:https://blog.jetbrains.com/idea/2016/02/intellij-id

java - 如何在 WAR 文件中添加 weblogic-application.xml

能否请您告诉我是否可以将weblogic-application.xml添加到WAR文件中,如果可以,那么如何做。 最佳答案 不,它不能。如果您这样做,则不会考虑。它需要在ear-file/META-INF中weblogic-application.xml文件是SunMicrosystems的application.xml部署描述符的特定于WebLogicServer的部署描述符扩展。您可以在此处配置应用程序中引用的共享JavaEE库和EJB缓存等功能。此信息适用于WLS10.3.x更多详情:http://docs.oracle.c

java - Selenium 网络驱动程序 : Page factory initialization using paths relative to other elements?

我正在尝试使用页面工厂@FindBy注释在SeleniumWebdriver中编写一个页面对象。页面对象用于侧边栏,包含页面对象需要与之交互的所有元素的父WebElement以这种方式初始化:@FindBy(xpath="//div[contains(@class,'yui3-accordion-panel-content')andchild::div[.='Sidebar']]")WebElementsidebar;然后我想要相对于此sidebar元素的搜索输入。有没有办法引用sidebar元素?我可以将整个路径复制并粘贴到开头:@FindBy(xpath="//div[contai

java - Tomcat : HikariCP issue when deploying two applications with DB connection

我试图在同一个tomcat7实例上部署两个WAR文件(app1.war和app2.war)。我收到此错误:UnabletoregisterMBean[HikariDataSource(HikariPool-0)]withkey'dataSource';nestedexceptionisjavax.management.InstanceAlreadyExistsException:com.zaxxer.hikari:name=dataSource,type=HikariDataSource如果我在tomcat上只部署了一个应用程序,我就不会出现这个错误。有办法解决这个问题吗?