Mark Iantorno
07/15/2020, 12:38 PMJS Client and JVM Server | Gradle
new project setup in IntelliJ, will this provide the project structure necessary for these requirements? Or is there a better starter project to use? Also, has anyone had experience doing this kind of dual purpose project? One that needs to be deployed as a stand-alone server with a front end, and also needs to be packaged as an application that can be run locally without internet?
Any advice would be greatly appreciated. I think I have a good idea on where to start after reading though a bunch of the documentation, I just want to make sure I’m not missing anything.jimn
07/23/2020, 2:35 AMError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: kotlin.KotlinPackage. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Slackbot
07/25/2020, 4:12 AMSlackbot
07/29/2020, 2:00 PMReddyTintaya
07/30/2020, 5:10 PMRaphael Ndonga
08/02/2020, 11:41 AMGopal Kalyanaraman
08/04/2020, 1:39 PMJilles van Gurp
08/04/2020, 3:51 PMsean
08/07/2020, 3:16 PMeddMX
08/07/2020, 6:10 PMNizan
08/16/2020, 2:40 PMMarkus Loide
08/18/2020, 11:13 AMjava.lang.NoClassDefFoundError: Could not initialize class kotlin.reflect.jvm.internal.impl.builtins.jvm.JavaToKotlinClassMap
. Without posting the full stacktrace, the problem arises from the SpringApplication.run
method, so it's not some personal code that is running it. (I'm using Spring Boot 2.2.x for this)Sushant Gawali
08/19/2020, 4:44 AMAyodele
08/21/2020, 11:59 AMMarcel Champagne
08/22/2020, 1:32 AM14 fun Application.module(testing: Boolean = false) {
15 val client = HttpClient(CIO)
16 val htmlContent = client.get<String>("<https://en.wikipedia.org/wiki/Main_Page>")
17 }
But I the the following error
Error:(16, 30) Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public inline operator fun <K, V> Map<out String, [ERROR : Explicit type argument expected for V]>.get(key: String): [ERROR : Explicit type argument expected for V]? defined in kotlin.collections
public operator fun MatchGroupCollection.get(name: String): MatchGroup? defined in kotlin.text
Lars Krog-Jensen
08/23/2020, 5:38 AMAlexa_Gal
08/24/2020, 8:42 AMDosExe
08/24/2020, 1:36 PMclass BeansInitializer : ApplicationContextInitializer<GenericApplicationContext> {
override fun initialize(context: GenericApplicationContext) {
beans().initialize(context)
}
}
2. Set context.initializer.classes=com.package.BeansInitializer in application.properties
It helped a little bit, now some of the beans are created, but all beans with @ConfigurationsProperties are still not created.Jilles van Gurp
08/25/2020, 10:43 AMRyan Simon
08/25/2020, 11:10 PMreferencedOn
. These are properties that are fetched lazily.
object ClassEquipments : IntIdTable("class_equipments") {
val equipmentId = integer("equipment_id").entityId().references(Equipments.id)
val classId = integer("class_id").entityId().references(Classes.id)
val createdAt = timestamp("created_at").default(Instant.now())
val updatedAt = timestamp("updated_at").default(Instant.now())
init {
index("ce_class_id_equipment_id", true, classId, equipmentId)
}
}
class ClassEquipmentEntity(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<ClassEquipmentEntity>(ClassEquipments)
var equipmentId by ClassEquipments.equipmentId
var classId by ClassEquipments.classId
val createdAt by ClassRatings.createdAt
var updatedAt by ClassRatings.updatedAt
val equipment by EquipmentEntity referencedOn Equipments.id
val clazz by ClassEntity referencedOn Classes.id
}
Our transformation extension looks like this
fun ClassEquipmentEntity.toModel(): ClassEquipment = ClassEquipment(
id = id.value,
equipmentId = equipmentId.value,
classId = classId.value,
clazz = clazz.toModel(),
equipment = equipment.toModel(),
updatedAt = updatedAt.offsetDateTime,
createdAt = createdAt.offsetDateTime
)
We convert everything at once. If we always wanted a clazz
and an equipment
this would be fine. There are times, however, that we don't want these objects.
Now, this could be a question of premature optimization, but I'm wondering if anyone has been able to have a nice data class representation of a domain model that also allows the flexibility to load relationships on demand?
Or maybe this approach is flawed somehow? Really curious to hear from anyone familiar with this. Thanks in advance!muliyul
08/27/2020, 4:09 PMAsyncResponse
to a suspend function (supporting resource suspend
functions transparently).
Existing:
class SomeResource {
@GET
fun someMethod(@Suspended asyncResponse: AsyncResponse) { ... }
}
Desired:
class SomeResource {
@GET
suspend fun someMethod() { ... }
}
Mathias Rørvik
08/28/2020, 10:25 PMJan Špidlen
08/29/2020, 8:45 AM?:
for a nullable list I get this... (see screenshot). Known issue?Ayodele
08/29/2020, 9:10 AM@Mapper
@Component
interface UserMapper {
fun toUserDTO(user: User): UserDTO
fun toListOfUserDTO(users: List<User>) : List<UserDTO>
fun toUser(userDTO: UserDTO) : User
fun toListOfUser(userDTOs: List<UserDTO>) : List<User>
}
and i'm using it in my contoller
@Autowired
lateinit var userMapper: UserMapper
It gives this error, please help
***************************
APPLICATION FAILED TO START
***************************
Description:
Field userMapper in com.scienta.backend_rated_ng.controller.AuthController required a bean of type 'com.scienta.backend_rated_ng.mapper.UserMapper' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.scienta.backend_rated_ng.mapper.UserMapper' in your configuration.rrva
09/02/2020, 10:00 AMAlexJuca
09/02/2020, 4:05 PMShalaga44
09/05/2020, 1:57 PMfun main() {
embeddedServer(
Netty, watchPaths = listOf("jvmMain"), port = 8080,
module = Application::myModule
).start(wait = true)
}
fun Application.myModule() {
routing {
get("/") {
call.respondHtml(HttpStatusCode.OK, HTML::index)
}
static("/static") {
resources()
}
}
}
fkrauthan
09/06/2020, 10:17 PMfkrauthan
09/07/2020, 12:23 AMEmmanuel Oga
09/08/2020, 3:39 AM