Use the –server-config param:
./standalone.sh --server-config=standalone-some_other_config.xml
Articles, notes and random thoughts on Software Development and Technology
Use the –server-config param:
./standalone.sh --server-config=standalone-some_other_config.xml
Not all jars can be located in the default maven repo. org.jboss jars for example can be picked up from JBoss’ own repo.
To add an additional repo to your pom.xml, add a section like this:
<repositories> <repository> <id>JBoss Repo</id> <url>https://repository.jboss.org/nexus/content/repositories/releases</url> <name>JBoss Repo</name> </repository> </repositories>
To map a default Spring MVC view to a URL, for example to map the default URL, /, add this to your webmvc-config.xml file to define a static view, i.e. a view not using an explicit Controller:
<mvc:view-controller path="/" view-name="index"/>
You can change the view-name attribute to point to any other view if you need to have a default other than /views/index.jspx .
Note that using the web.xml welcome file only works for a real file, and doesn’t work to map to a Spring MVC view URL:
<welcome-file-list><welcome-file>/index</welcome-file></welcome-file-list>
By default, after you’ve added Spring Security to your Roo app with ‘security setup’, you get an example config in a applicationContext-security.xml file like this:
<http auto-config="true" use-expressions="true"> <form-login login-processing-url="/resources/j_spring_security_check" login-page="/login" authentication-failure-url="/login?login_error=t"/> <logout logout-url="/resources/j_spring_security_logout"/> <!-- Configure these elements to secure URIs in your application --> <intercept-url pattern="/choices/**" access="hasRole('ROLE_ADMIN')"/> <intercept-url pattern="/member/**" access="isAuthenticated()" /> <intercept-url pattern="/resources/**" access="permitAll" /> <intercept-url pattern="/**" access="permitAll" /> </http>
The default pattern matching approach is to use Ant style path matching. If you need to be more specific for what URLs you need to define security against, then you can change to use regex style pattern matching by adding this attribute to the <http> element:
<http ... path-type="regex" ... >
Now, let’s say you need to have different roles for creating verses listing member records – Spring Roo uses a couple of GET parameters to distinguish between these actions, so using regex you can match on these like this:
<intercept-url pattern="/member?form" access="hasRole('ROLE_ADMIN')" /> <intercept-url pattern="/member?page.*" access="hasRole('ROLE_USER')" />