View compose deps
implementation "androidx.compose.ui:ui:$compose_version" | |
implementation "androidx.compose.material:material:$compose_version" | |
implementation "androidx.ui:ui-tooling:$compose_version" | |
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-beta01' |
View bbbb.html
<html> | |
<body> | |
<div title="foo"> | |
</div> | |
</body> | |
</html> |
View pom-exclusions.xml
<exclusions> | |
<exclusion> <!-- declare the exclusion here --> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-stdlib</artifactId> | |
</exclusion> | |
</exclusions> |
View .gitignore
# security related stuff | |
*.pem | |
clean-install.conf | |
# generated - spa.jsp and tc/index.jsp | |
war/src/main/webapp/tc/index.jsp | |
war/src/main/webapp/spa.jsp | |
tout/ |
View env vars
reg query HKEY_CURRENT_USER\Environment |
View gist:0316254768d5b84fd9f9e6ce4f5d2add
management.endpoints.web.exposure.include=* | |
management.endpoint.shutdown.enabled=true | |
endpoints.shutdown.enabled=true | |
curl -X POST localhost:8080/actuator/shutdown |
View gist:3e665c42c04d6da6a6c2da2b7ab9f431
/* | |
java.version Java version number | |
java.vendor Java vendor specific string | |
java.vendor.url Java vendor URL | |
java.home Java installation directory | |
java.class.version Java class version number | |
java.class.path Java classpath | |
os.name Operating System Name |
View ControllerAdvice
@ControllerAdvice | |
public class RestErrorHandler { | |
@ExceptionHandler(NotFoundException.class) | |
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) | |
@ResponseBody | |
public Object processValidationError(NotFoundException ex) { | |
String result = ex.getErrorMessage(); | |
System.out.println("###########"+result); | |
return ex; |
View mvn kotlin spring
<plugin> | |
<groupId>org.jetbrains.kotlin</groupId> | |
<artifactId>kotlin-maven-plugin</artifactId> | |
<configuration> | |
<compilerPlugins> | |
<plugin>jpa</plugin> | |
<plugin>spring</plugin> | |
</compilerPlugins> | |
<args> | |
<arg>-Xjsr305=strict</arg> |
View fetchNewId
fun fetchNewId(ps: PreparedStatement): Int { | |
val rs = ps.generatedKeys | |
return rs.use { rs1 -> | |
if (rs1.next()) { | |
rs1.getInt(1) | |
} else { | |
throw IllegalStateException() | |
} | |
} | |
} |
NewerOlder