There is a doc http://static.springsource.org/spring/docs/2.5.6/reference/testing.html how to add IoC support to junit tests using xml-configuration, but I can not find example for java-based configuration...
For example, I have java-based bean:
public class AppConfig
{
@Bean
public Test getTest() { return new Test(); }
}
And...
Hi,
In my spring webapplicaiton I would like the user to confirm the deletion of an item before actually do it. I've looked for a simple example using dojo, but so far I didn't come up with a solution that suits such a simple and common use case.
Any hints?
...
Hi all,
I am trying to setup spring web flow. I am using spring 2.5 jars and swf 2.0.8 jar
Here is my configuration file:
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="order" value="1" />
<property name="mappings">
<props>
<prop key="index.htm">indexController</prop>
</pro...
I get an error when trying to set up Spring MVC validation.
javax.validation.ValidationException: Unable to find a default provider
I read in the documents that the default provider they use is the hibernate-validator. Do I need to include this library to get validation to work? Is it okay to include this library even though i'm not...
When I compile my spring mvc app, I get this in the output:
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_17\bin;......
What exactly should I use in production that this is referring to?
...
Hello Overflowers,
I am working with Spring and Hibernate. I have an object which was retrieved from the database with HibernateTemplate.
When I modify this object Hibernate is making inserts into the database before the data is ready to be inserted, the result is a lot of database errors along the line of "cannot insert NULL into ......
Is there any kind of out-of-the-box transaction management support for pure DAO in Spring framework?
...
When you mark something with the Autowire annotation, you are saying you want this particular e.g. class to be automatically wired for DI.
Now where exactly do you set the target class to be used in the Autowire?
reference: http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#beans-annotation-conf...
I am having trouble linking to a style sheet from a jsp page. I believe it has something to do with my directory structure which is:
WEB-INF
|-- css
| |-- main.css
|
|-- jsp
|-- login.jsp
I have tried various forms of the standard html link tag such as:
<link href="css/main.css" rel="stylesheet" type="text/css" medi...
Just looking at the petclinic sample application, and trying to learn form handling.
It seems the form maps to an entity 1:1 correct? Is there any other configuration that has to be done, or will spring just know that all the form inputs map to the entity because that is what was added to the model in the GET request?
@Controller
@Req...
I am trying to setup an edit form for my User object. I have automatic binding from the form to the user object working fine.
I'm wondering how do I prevent malicious users from binding to fields of my User object that I don't want them to?
For example, my user object has userName, and it also has points. When they click edit user, I...
The question says it all. In spring security 2.x we can set the custom values to the user in the userattributes. Is there a similar/alternate way of doing the same in spring secuirty 3.0??
...
So I created a simple web app using maven, the pom.xml is setup in Eclipse just fine.
I added apache commons, spring 3.0 as a dependancy.
I created a test controller using annotations, and a jsp file.
In eclipse, I only see a Run option, and no build option. With maven2 pom.xml setup etc., is just clicking on Run enough to build the p...
I'm using a Jboss5/Spring/Struts implementation, and I'm not familiar enough with JSP technology to know how to do this. Is this even possible?
...
I am using eclipse, with maven2 plugin.
I am trying to setup a simple annotations based spring 3 mvc web application.
So I went to RunAs and clicked on 'maven build', I set the goal as 'compile'.
When it compiles, I get the error message:
E:\dev\eclipse\springmvc2\src\main\java\web\HomeController.java:[5,1] annotations are not support...
Hi All,
I'm wondering how wordpress.com or google group host multiple applications for different party. For wordpress, I guess it will create a subdomain for each user and configured a virtual host in Apache for this installation. Of course, a database is installed for this user (or tables with prefix). Will the wordpress application ne...
I am using eclipse with maven2 plugin.
Maven created a /src folder, so I created my HomeController.java file in the following path:
/src/main/java/web/HomeController.java
When I compile using the RunAs mavin build, with a goal set to 'compile', I get the error:
E:\dev\eclipse\springmvc2\src\main\java\web\HomeController.java:[5,1] can...
Using eclipse with maven plugin, how should I setup my build so it deploys to tomcat?
I'm not sure if I have to do this in 1 or 2 steps, but I want to compile my spring mvc (3) application and deploy to my local tomcat.
Right now I just mapped the RunAs -> Maven build to a 'compile' goal type.
I'm very new to do this so not sure how...
I'm putting the data into database with simpleJdbcTemplate.
simpleJdbcTemplate.update("insert into TABLE values(default)");
I dont want to put any data because i dont need it for my unit test purpose.
How can i get the id from the inserted row? I can retriev the current sequence value but if somebody else will do a insert then i will...
Greetings,
In my domain model,
'Family' has many 'SubFamily's
'SubFamily' has many 'Locus's
and relationships are bi-directional with lazy-loading.
ie. 'Locus' can access in parent 'SubFamily' using alocus.getSubFamily();
Down below snippet I have given the DAO method to retrieve a Locus .
In my webapplication (Wicket based)
I g...