Running tests in Spring Boot

I have this test class I've generated a Spring Boot web application using Spring Initializr, using embedded Tomcat + Thymeleaf template engine, and package as an executable JAR file. Technologies used : Spring Boot 1.4.2.RELEASE, Spring 4.3.4.RELEASE

spring boot: string application properties of a starter?

I'm developing a spring boot app and starter. I want the starter to hold common properties and code. In my starter I have an file. I have defined a @Profile("dev") in the starter. When I start my app using the dev prof

Access from

I need to access properties from in max-size=3 alert.error=You can only save {max-size} items. Not working: {max-size}, #{max-size}, ${max-size} I am aware of this

Resolve profile-based properties file in spring tests

Into my spring RootConfig class I use properties file based on my spring profile: @Configuration @PropertySource("classpath:properties/") @PropertySource("classpath:properties/app-${}.properties") @C

Spring Autowiring and Thread Safety

I am new to Spring and recently created a test RESTful web service application. I am following the Spring @Autowiring way of injecting the beans. Below is my code and a question: @Service public class HelloWorld { @Autowired private HelloWorldDaoImpl

Switch Between Spring MongoDb Databases

I have a case, where I need to switch between the mongo databases using Spring mongodata (Version: 1.6.2). Currently, I have default database configured in db-config.xml with mongo template, and have annotated repositories; Need is to switch from one

Can you give me an example of a frameless addiction injection?

I want to reduce the coupling between two components, then I thought of dependency injection, but for a long time, I just use Spring to implement this. But now, I am working in a project which is not suitable to use this framwork(it is too heavy). So

Spring MVC validation ignored

I have Spring MVC app on Tomcat. I'm trying to add validation in it. For some reason my validation is ignored and not checked. Here is my POJO import org.hibernate.validator.constraints.Range; public class Goal { @Range(min = 1, max = 15) private int

Icon Fonts, Thymeleaf and XML Spring

I'm trying to use Icomoon web icon font in a Spring Thymeleaf application. The recommended method is to set a data-icon attribute in an HTML tag. The css then sets font family and content using the following selector [data-icon]:before. The icons are

Validation in Primefaces 4.0 blocks the application

I am having an issue with prime faces 4.0. I implement a Java web application using spring and hibernate framework,prime faces 4.0 ,JSF. I have a form which contains several tabs. I used require="true", for validation of text boxes. So if a mand

The import can not resolve the error

In my Spring web application i am trying to import below given imports to annotate my class as @Configuration and method as @Bean import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; But i a

How can i save a header value in camel using spring DSL

This seems like it should be simple, pardon the pun. I'm trying to log a header in camel within a spring DSL route. I've seen the answer for Java DSL but I've been searching in vain for how to make it work in spring DSL. I've tried: <log message="

Spring tests ignored when running with maven

I'm trying to run JUnit tests on a spring project on Maven build or install. The test class in src/main/test: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:mvc-dispatcher-servlet.xml", "classpath:app

Hibernate Annotations to create a relationship

I've got 3 classes, one superclass and two subclasses. Each subclass has a collection of the other subclass and I want to map a one to many relationship between them. My superclass is person, and the subclasses are called referrer and broker. The rel

spring how to write config to support 2 database

i try to config a data source ----> mysql the other data source ----> h2 in memory (embedded ) with the following config: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" p:driverClassName="com.mysql.

Maven: How to keep an addiction?

I'm new to Maven. I recently learned it to solve some dependency issues I'm having with a Java and Spring WebApp. I've been trying maven out on a small sample webapp. The webapp uses JSTL tags. I found it necessary to put these tags in pom.xml: <depe

Spring transactions with Objectify and Appengine

I am using appengine with Objectify to access my datasource. I use Spring for my business layer. In order to play with data I use the objectify-appengine-spring factory. I would like to use annotation based local transactions. Do you know about an ex

JUnit + Derby + Spring: drop in db memory after each test

In my unit tests I autowired some DataSources, which use URLs like jdbc:derby:memory:mydb;create=true to create an in-memory DBs. To drop an in-memory Derby db you have to connect with: jdbc:derby:memory:mydb;drop=true I would like this to happen aft

JMS query / response model in grails

I am creating a grails web app which makes use of JMS messaging. I have installed the JMS plugin for grails and using activemq as the messaging provider. I want to implement a request/response pattern in grails. I was successfully able to send a mess

How to freeze or disable an update entry form

I wonder if it is possible for me to freeze or disable the entire update form? I have an input h:form with a check box in it. when users check the box, I would like to freeze or disable the entire form so that disallow users from changing inputs. Tha