This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Clip of server.xml file with multiple hosts that need | |
// environment variables for Grails to pull in. | |
<Host name="foo1.com" appBase="foo1" ...> | |
... | |
</Host> | |
<Host name="foo2.com" appBase="foo2" ...> | |
... | |
</Host> | |
<Host name="foo3.com" appBase="foo3" ...> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This usual method of external configuration won't work since | |
// each Host will point to the same applicationConfig file | |
grails.config.locations = [ "file:/path/to/applicationConfig.groovy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
try { | |
exConfig = ((Context)(new InitialContext().lookup("java:comp/env"))).lookup("grailsExtConfFile") | |
} catch (Exception e) { | |
println("External configuration lookup failed: " + e) | |
} | |
grails.config.locations = ["${exConfig}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
if (Environment.current in [Environment.DEVELOPMENT, Environment.TEST]) { | |
exConfig = "file:/path/to/local/applicationConfig.groovy" | |
} else { | |
try { | |
exConfig = ((Context)(new InitialContext().lookup("java:comp/env"))).lookup("grailsExtConfFile") | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebMvcSecurity | |
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Bean | |
public ServiceProperties serviceProperties() { | |
ServiceProperties serviceProperties = new ServiceProperties(); | |
serviceProperties.setService("https://localhost:8443/cas-sample/j_spring_cas_security_check"); | |
serviceProperties.setSendRenew(false); | |
return serviceProperties; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<security:user-service id="userService"> | |
<security:user name="joe" password="joe" authorities="ROLE_USER" /> | |
... | |
</security:user-service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestCasAuthenticationUserDetailsService implements AuthenticationUserDetailsService { | |
@Override | |
public UserDetails loadUserDetails(Authentication token) throws UsernameNotFoundException { | |
List<GrantedAuthority> authorities = new ArrayList<>(); | |
authorities.add(new SimpleGrantedAuthority("ROLE_USER")); | |
return new User("joe", "joe", authorities); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/JacobASeverson/udp-reactor.git | |
cd udp-reactor/ | |
./gradlew build | |
java -jar build/libs/udp-reactor-0.0.1-SNAPSHOT.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n 'Success!' | nc -4u -w1 localhost $UDP_SERVER_PORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/JacobASeverson/vertx-fatjar-example.git | |
cd vertx-fatjar-example/world-mod/ | |
./gradlew install |
OlderNewer