4237 shaares
2 results
tagged
spring
How To Test a spring.datasource.url
like jdbc:mysql://localhost:3306/my_table
:
git clone https://github.com/julianhyde/sqlline && cd sqlline
mvn package -Dmaven.test.skip=true
cp .../mysql-connector-java-5.1.40.jar target/
export CLASSPATH=$PWD/target/sqlline-1.4.0-SNAPSHOT-jar-with-dependencies.jar:$PWD/target/mysql-connector-java-5.1.40.jar
bin/sqlline
!connect jdbc:mysql://localhost:3306/my_table $user $password
Since Spring 4.1, it is really easy to enable JSONP on an API controller:
@RestController
@RequestMapping(value = "/")
public class MyController {
@ControllerAdvice
static class JsonpAdvice extends AbstractJsonpResponseBodyAdvice {
public JsonpAdvice() {
super("callback"); // name of the query parameter to use
}
}
@RequestMapping(value = "/", method = RequestMethod.GET)
public MyAPIResult getStuff(...) {
...
}
}
There is no RFC …