I have a DAO class(the following code), which have a reference of entityManager.
After spring inject the value of entityManager, I want to use that value to create another class object.
In the...
Type: Posts; User: tomcatacec; Keyword(s):
I have a DAO class(the following code), which have a reference of entityManager.
After spring inject the value of entityManager, I want to use that value to create another class object.
In the...
The following class is my @ModelAttribute:
public class AddUser {
private String email;
private String password;
private String confirmPassword;
....
}
In my jsp code, the error...
I want to inject a integer value from my properties file into my controller class.
My Controller class:
@Controller
public class TestController {
@Value("${task.page.size}")
private int...
Thanks for your information.
If I already have the following configuration, can I reuse the propertyConfigurer bean?
<bean id="propertyConfigurer"...
My workaround:
change annotation into xml.
In xml, we can use value="${...}".
But when I use @Inject, how can I inject the value from properties file?
Thanks.
I defined the timer as the following:
@Scheduled(fixedDelay=5000)
public void doSomething() {
...
}
How can I read the interval:"5000" from a properties file?
Or I have to use XML...
My controller class:
@Controller
@RequestMapping("/test/form")
public class FormController {
@Resource(name="supportedLanguages")
private List<String> supportedLanguages;
...
Finally, the following code works fine.
<http auto-config="false" entry-point-ref="loginUrlAuthenticationEntryPoint">
<custom-filter position="FORM_LOGIN_FILTER" ref="myAuthenticationFilter"...
The following MyAuthenticationFilter class is my own Filter:
public class MyAuthenticationFilter extends UsernamePasswordAuthenticationFilter {
...
}
In my application context file, I try...
my problem solved.
thanks.
The following code works fine:
In my applicationContext xml:
<bean id="userTR" class="arden.transaction.UserTR" p:userDao-ref="userDao"/>
In My java code:
@Transactional(readOnly = true)...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
...
In my previous project, I use the following way to display jasperreports:
views.properties
accountReportPdf.class=org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView...
When I use fieldErrorCount without parameter, it works fine.
<spring:hasBindErrors name="editUserCommand">
<c:out value="${errors.fieldErrorCount}"/>
</spring:hasBindErrors>
When I use...
Finally, I add 3 lines in attemptAuthentication() of AuthenticationProcessingFilter class and replace original class in jar file.
Now, everything works fine.
If I can config...
The following is my spring security configuration:
<?xml version="1.0" encoding="UTF-8"?>
<b:beans xmlns="http://www.springframework.org/schema/security"
...
If I change localeResolver from CookieLocaleResolver into AcceptHeaderLocaleResolver:
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver"/>
Then I...
My spring application context:
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
<property name="cookieName" value="clientlanguage" />...
I am using JmsInvokerServiceExporter, which works fine. But client will be blocked, I read lingo homepage, which supports asynchronous invocation.
If JmsInvokerServiceExporter already supports this...